Calculating standard deviation of trades in portfolio
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Calculating standard deviation of trades in portfolio
Is there an easy way, using the Portfolio Backtester, to calculate the standard deviation per trade? I know I could export the entire Portfolio Report to Excel and do it manually, but I was wondering whether there is an easier way?
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Calculating standard deviation of trades in portfolio
Hello furytrader,
You can calculate the values in your script using the StandardDev function and print results to a file.
You can calculate the values in your script using the StandardDev function and print results to a file.
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Calculating standard deviation of trades in portfolio
Thanks Dave - so that value can be calculated for the entire portfolio? Can you give an example?
And by "entire portfolio", I do not mean each market + system in portfolio, but I mean for all the trades that occur within a portfolio in aggregate ... so, one standard deviation value for all the markets traded in a portfolio.
And by "entire portfolio", I do not mean each market + system in portfolio, but I mean for all the trades that occur within a portfolio in aggregate ... so, one standard deviation value for all the markets traded in a portfolio.
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Calculating standard deviation of trades in portfolio
furytrader,
Could you be more precise? I am not sure I am following you.
Are you referring to standard deviation based on Portfolio Strategy Performance values that can be retrieved using the following keywords: https://www.multicharts.com/trading-sof ... erformance ?
Could you be more precise? I am not sure I am following you.
Are you referring to standard deviation based on Portfolio Strategy Performance values that can be retrieved using the following keywords: https://www.multicharts.com/trading-sof ... erformance ?
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Calculating standard deviation of trades in portfolio
Sure, what I mean is that within a portfolio, there are a series of closed trades generated, each with either a profit or loss. I want to calculate the standard deviation of that string of closed trades.
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Calculating standard deviation of trades in portfolio
furytrader,
As far as I understand, you want to calculate standard deviation of a series of PnL values for each instrument (or entire portfolio). Unfortunately, there is no such sample code available.
You can use the Portfolio NetProfit to get PnL values and feed them into the StandardDev function.
If you want us to write this code for you as a custom project, please send a request to support@multicharts.com
As far as I understand, you want to calculate standard deviation of a series of PnL values for each instrument (or entire portfolio). Unfortunately, there is no such sample code available.
You can use the Portfolio NetProfit to get PnL values and feed them into the StandardDev function.
If you want us to write this code for you as a custom project, please send a request to support@multicharts.com
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Calculating standard deviation of trades in portfolio
What I ended up doing was exporting the data to Excel and analyzing it there - it was a lot easier than I expected.