[Build 115] Yearly average profit percentage not calculated correctly for portfolio

Yearly average profit percentage is not correctly calculated for a portfolio of projects in the Retester. 

If the initial capital for 1st strategy is $10k and it makes a profit of $500 per year (5%), and the 2nd strategy also makes $500 per year (5%), then the average profit percentage of the portfolio should be 5% ($1000 profit from an initial capital of $20k). Currently, I noticed it doesn't calculate this correctly. This issue may be present in drawdown percentage calculation too. 


Also, there should be an option where the user is allowed to calculate the profitability of the entire portfolio with a single initial capital of $10k instead of $10k separately for each of the strategies. That way, 2 different strategies in a portfolio can open positions within the same account of $10k (if one strategy has an open position on the same instrument, another strategy should not open a new position on the same instrument even if there is a signal, thus the portfolio maintains only one open position on an instrument at a time even while getting multiple entry signals from different strategies in a portfolio.) This feature would allow the user to calculate how much a portfolio can make with a single account instead of splitting capital for each of the strategies. 

Attachments
No attachments
  • Votes +4
  • Project StrategyQuant X
  • Type Feature
  • Status Fixed
  • Priority High

History

jk
#1

Jay

06.12.2018 12:13

Task created

KL
#2

kainc301

11.12.2018 20:23
In addition to the first point, the yearly average profit % gets skewed when using % risk. For example, I may start with a 20k balance and a 2% per trade risk factor might net 100k in the 5th year of testing. This 100k will be factored into the % average and weight it higher. So this may result in a 500% Avg yearly return. However, that 5th year of testing may have had an initial balance of 100k at the beginning of the year, which means the account only grew 100% in that year. The average % yearly return should be based on performance from year to year instead of measuring the change in % from the first year's initial capital.  


Regarding the second point, I have suggestions about how to address this issue between splitting account balances between strategies here https://roadmap.strategyquant.com/tasks/sq4_2131 

I have been hoping this would be addressed for a long time. It is good to have flexible options. If this is being addressed, please have a look at my comments on this topic. 

KL
#3

kainc301

11.12.2018 20:23
Voted for this task.
HH
#4

Hans

10.02.2019 13:57
Voted for this task.
MF
#5

Mark Fric

29.08.2019 09:52
some of the things you want will be possible when we'll add true portfolio retesting. 


For now, we are "only" merging strategy results, there are some things that cannot be simulated properly like this, like your request to ignore some signals when other strategy already placed trade. 

We could skip this trade in portfolio merging, but in reality it would behave totally different, because when you skip one trade all subsequent trades could be different.

TB
#6

Tomas Brynda

29.08.2019 10:18

Type changed from Bug to Feature

We will add an option to select either shared initial balance or separate balances when calculating stats in next release
KL
#7

kainc301

29.08.2019 16:13
Sweet! 


Also please allow a combination of other combined portfolios. This can be done by allowing that option to be applicable for subsequent combinations while retaining previously calculated values.


For example say I have 50 strategies to be used on 10 different accounts. I'd want to combine a set of individual strategies for each specific account, which becomes its own portfolio for that account, but I will also want to combine the portfolios of different accounts to make a larger portfolio that views all 10 different accounts combined into one balance without affecting the recalculation of risk management for the individual portfolios.


When two portfolios of different accounts are combined, SQ should combine them without the trade balances affecting each other (i.e. if strategies were used on risk % per trade and each portfolio traded every strategy at a % of the combined balance of the new portfolio. This should not happen. % risk per trade should only apply to the initial portfolio created.) This is very important in how the final stats are calculated. There needs to be a way to switch between portfolios that consist of separate accounts (the way Quant Analyzer is now) and portfolios that were calculated as if all 50 strategies belonged to one account and combine them in a hierarchical way.


This would be amazing. Thank you for the hard work..

Rr
#8

Partizanas

15.10.2019 14:55
Voted for this task.
KP
#9

CooleRnax

19.10.2019 03:32
Voted for this task.
MF
#10

Mark Fric

30.10.2019 08:42

Status changed from In progress to Fixed

Added possibility to specify if Initial capital for portfolio is taken from first startegy or it is a sum for all strategies.
KL
#11

kainc301

30.10.2019 19:54
Thank you for implementing this for combining strategies. Can portfolios be combined as well in the manner mentioned above? 

Votes: +4

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please