Hi There,
I have a signal that I wish to calculate the running standard deviation of PnL.
Has anyone got any suggestions on how to code this up?
Cheers
Calculating Standard Deviation on Live Trading
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Calculating Standard Deviation on Live Trading
One strategy would be to use the ELCollections.dll and create a list in which you store the P&L of each trade once it is closed (if that's what you're looking to analyze). The ELCollections has a built-in standard deviation function that can calculate the standard deviation of any ELCollections list, so as long as you get the data into a list, the actual standard deviation calculation is very straightforward (and you can specify how many trades back to look, etc.)
You can learn more about the ELCollections.dll at:
viewtopic.php?t=2483
The ELCollections "pack" has a good user's guide that explains how to use it. If you need more guidance on how to do this, just let me know.
You can learn more about the ELCollections.dll at:
viewtopic.php?t=2483
The ELCollections "pack" has a good user's guide that explains how to use it. If you need more guidance on how to do this, just let me know.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Calculating Standard Deviation on Live Trading
You can put the Bollinger Band on the PnL. BB is std dev.Hi There,
I have a signal that I wish to calculate the running standard deviation of PnL.
Has anyone got any suggestions on how to code this up?
Cheers