Extend definition about risk per contract in MM method

 This is a feature what I mentioned in the last coding session.


Development  process in my custom project :
      1. Develop robust strategies with fiexed one contract based on multiple markets, multiple time frames, multiple strategy types, multiple average # of bars.
      2. Through manual selection or correlation test, the subset of alternative strategies in the potrfolio is selected.
      3. Use Automatic retest task, batch process to add money management backtest and Monte Carlo trade manipulation analysis for every individual strategy . Continuously adjust unified initial capital and  MM method until it is in line with my risk control and profit requirement. 
      4. Merge portfolio through Createt portfolio task 
      In the Automatic retest task, SQ calculate risk per contract only according to built-in stoploss of strategy or mannual stoploss setting. Obviously, for 30 completely different kind of strategies, there are very different stoploss(maybe no built-in stoploss or based ATR), and Max history loss maybe lager than built-in stoploss. So I want to use a unified risk per contract which calculate based on order or strategy performance with fixed one contract. I don't want to set the risk per contract of every strategy one by one. So size of ervery strategy= percent/100*(initial capital+netprofit+openpositionProfit)/risk per contract of every strategy. 
       Then I want to try to expand the definition of risk per contrat. That can be such as Maximum historical loss , Maximum historical daily loss ,average of max 5 historic daily loss with fiexed one contract ,and so on. Note that the maximum historical daily loss must be calculated based on open profit/loss first. Sometimes i get this value from daily report of Multicharts. Could you please tell us the way to write these custom MM method. Or SQX directly builds in these money management method.
       Why use unified MM method? Because for large portfolio, unity means simplicity.
       Why use max daily loss ? Because it contains more information about open positions than the max historic loss per trade. And the time-based definition about risk per contract  is more standardized for the 30 strategies. Think about the portfolio of three strategies with  90pips, 250pips, 600pips of stoploss. If use stop loss as risk per contract,then create a portfolio. The psotion sizing of the three strategies after a long period of time will be very unbalanced. 
      
       By the way, this is not a portfolio approach to money management, this is simply batch money management for individual strategies. This means that each strategy gets an equal share of the money, the money available come from the profits of their own strategies, independent of other strategies. So it's not a team playing. And portfolio MM method is better than MM method in this task. Refer to the following two tasks.

  #
Attachments
  • Votes +5
  • Project StrategyQuant X
  • Type Feature
  • Status New
  • Priority Normal

History

b
#1

binhsir

24.02.2023 15:39

Task created

k
#2

Karish

24.02.2023 20:16
Voted for this task.
KB
#3

kbtech

26.02.2023 00:56
Voted for this task.
TH
#4

Tienha

26.02.2023 02:30
Voted for this task.
b
#5

binhsir

28.02.2023 03:23
Voted for this task.
MF
#6

Mark Fric

01.03.2023 14:11
this is quite complex request. I'll try to get to it, but I'm not sure when I'll be able to. 
I still don't quite follow how you want to compute the size.


Could you perhaps make a simple example - just 2 strategies in portfolio, how you'd compute MM for them?

b
#7

binhsir

05.03.2023 06:23

Attachment batch autoretest create protfolio custom project.jpg added

Attachment Max history daily loss.jpg added

Max history daily loss.jpg
(262.41 KiB)
batch autoretest create protfolio custom project.jpg
(354.44 KiB)
b
#8

binhsir

05.03.2023 06:30
Thanks, Mark, in this feature task, I just batch automatic retest for individual strategies with MM method, then merge them for portfolio.

I have sent email for a video and MM method tool with excel, please check it.


By the way, portfolio MM method is better than MM method in this task. referance :

 https://roadmap.strategyquant.com/tasks/sq4_9988

https://roadmap.strategyquant.com/tasks/sq4_9924

b
#9

binhsir

05.03.2023 06:32

Description changed:

 This is a feature what I mentioned in the last coding session.


Development  process in my custom project :
      1. Develop robust strategies with fiexed one contract based on multiple markets, multiple time frames, multiple strategy types, multiple average # of bars.
      2. Through manual selection or correlation test, the subset of alternative strategies in the potrfolio is selected.
      3. Use Automatic retest task, batch process to add money management backtest and Monte Carlo trade manipulation analysis for every individual strategy . Continuously adjust unified initial capital and  MM method until it is in line with my risk control and profit requirement. 
      4. Merge portfolio through Createt portfolio task 
      In the Automatic retest task, SQ calculate risk per contract only according to built-in stoploss of strategy or mannual stoploss setting. Obviously, for 30 completely different kind of strategies, there are very different stoploss(maybe no built-in stoploss or based ATR), and Max history loss maybe lager than built-in stoploss. So I want to use a unified risk per contract which calculate based on order or strategy performance with fixed one contract. I don't want to set the risk per contract of every strategy one by one. So size of ervery strategy= percent/100*(initial capital+netprofit+openpositionProfit)/risk per contract of every strategy. 
       Then I want to try to expand the definition of risk per contrat. That can be such as Maximum historical loss , Maximum historical daily loss ,average of max 5 historic daily loss with fiexed one contract ,and so on. Note that the maximum historical daily loss must be calculated based on open profit/loss first. Sometimes i get this value from daily report of Multicharts. Could you please tell us the way to write these custom MM method. Or SQX directly builds in these money management method.
       Why use unified MM method? Because for large portfolio, unity means simplicity.
       Why use max daily loss ? Because it contains more information about open positions than the max historic loss per trade. And the time-based definition about risk per contract  is more standardized for the 30 strategies. Think about the portfolio of three strategies with  90pips, 250pips, 600pips of stoploss. If use stop loss as risk per contract,then create a portfolio. The psotion sizing of the three strategies after a long period of time will be very unbalanced. 
      
       By the way, this is not a portfolio approach to money management, this is simply batch money management for individual strategies. This means that each strategy gets an equal share of the money, the money available come from the profits of their own strategies, independent of other strategies. So it's not a team playing. And portfolio MM method is better than MM method in this task. Refer to the following two tasks.

  #

E
#10

Emmanuel

16.08.2023 01:02
Voted for this task.

Votes: +5

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please