Hi,
I wish to carry out an optimisation to find optimal inputs when applied to a basket of instruments.
I do not want to optimise each constituent instrument individually (Don't want multiple strategies, instruments and signals).
Therefore, the solution seems to be one strategy, multiple instruments and one signal.
However I can't see a way to define commission rules for each instrument under the one strategy.
Is there any way I can define each instruments commission rules whilst only optimising one signal's inputs?
Thanks!
Portfolio Backtester Multiple commission rules per strategy?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Portfolio Backtester Multiple commission rules per strat
Hello Wilkinsw,
If you have 1 strategy with 1 signal and a number of symbols to backtest, the commission rules will be common for each symbols, since commissions are configured for each strategy, not each signal/symbol.
If you have 1 strategy with 1 signal and a number of symbols to backtest, the commission rules will be common for each symbols, since commissions are configured for each strategy, not each signal/symbol.
Re: Portfolio Backtester Multiple commission rules per strat
Sorry, it's been a year. This is still something I need. In fact need it even more, hence I'm back here again! Is it part of the MC 9.0?
To reiterate........
I want to optimize one signal applied to a basket of instruments.
I need to specify slippage and commission for each constituent instrument, as they vary from each other.
I can't see a way of doing this.
Please advise.
Thanks
To reiterate........
I want to optimize one signal applied to a basket of instruments.
I need to specify slippage and commission for each constituent instrument, as they vary from each other.
I can't see a way of doing this.
Please advise.
Thanks
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Portfolio Backtester Multiple commission rules per strat
Hello Wilkinsw,
Commission rules are configured per strategy. The only way to have individual commission per signal/symbol is creating individual strategies.
Commission rules are configured per strategy. The only way to have individual commission per signal/symbol is creating individual strategies.
Re: Portfolio Backtester Multiple commission rules per strat
For a basket of 5 instruments:
If my signal has 5 inputs I want to optimise, then by having 5 seperate strategies, each with its own instrument, then.......
I'll have 25 optimisable inputs, no?
If my signal has 5 inputs I want to optimise, then by having 5 seperate strategies, each with its own instrument, then.......
I'll have 25 optimisable inputs, no?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Portfolio Backtester Multiple commission rules per strat
That is correct.For a basket of 5 instruments:
If my signal has 5 inputs I want to optimise, then by having 5 seperate strategies, each with its own instrument, then.......
I'll have 25 optimisable inputs, no?
Re: Portfolio Backtester Multiple commission rules per strat
So using correct costs per instrument means I have to optimize 25 instead of 5 variables. From both a statistical and time point of view this will give a highly undesirable outcome.
Has this changed for the most current version of MC?
If not could you see why this is needed?
Slippage in particular varies greatly per instrument. If I run an optimization on a basket the results are as good as useless if I've simply used an average basket slippage assumption. The optimisation will incorrectly migrate towards an area that fully exploits the underestimated instrument and avoids the overestimated instrument.
It's a major flaw. Is a solution in the pipes??
Thanks.
Has this changed for the most current version of MC?
If not could you see why this is needed?
Slippage in particular varies greatly per instrument. If I run an optimization on a basket the results are as good as useless if I've simply used an average basket slippage assumption. The optimisation will incorrectly migrate towards an area that fully exploits the underestimated instrument and avoids the overestimated instrument.
It's a major flaw. Is a solution in the pipes??
Thanks.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Portfolio Backtester Multiple commission rules per strat
This behavior has not been changed in MultiCharts 9.0. At the moment changing that is not something that is in our to-do list, though this suggestion is a reasonable one. Please submit a feature request to the Project Management of our web site so other users can vote for it: https://www.multicharts.com/pm/So using correct costs per instrument means I have to optimize 25 instead of 5 variables. From both a statistical and time point of view this will give a highly undesirable outcome.
Has this changed for the most current version of MC?
If not could you see why this is needed?
Slippage in particular varies greatly per instrument. If I run an optimization on a basket the results are as good as useless if I've simply used an average basket slippage assumption. The optimisation will incorrectly migrate towards an area that fully exploits the underestimated instrument and avoids the overestimated instrument.
It's a major flaw. Is a solution in the pipes??
Thanks.
Re: Portfolio Backtester Multiple commission rules per strat
Please vote for the specified change to the portfolio backtester/optimizer:
http://www.multicharts.com/pm/viewissue ... no=MC-1708
http://www.multicharts.com/pm/viewissue ... no=MC-1708
Re: Portfolio Backtester Multiple commission rules per strategy?
Please Please Please. Let's get this sorted MC:
If I have a basket of instruments in PT, with greatly varying tick values and volatilities, commissions etc, and one signal applied (which I'm optimizing), I need costs per fill to be instrument specific and not signal specific. Otherwise the optimization will be steered by any biases (will over aggressively trade the underestimated cost instrument and under trade the overestimated cost instrument).
I suggest either:
-add the costs section to the dropdown menu when the user right clicks each instrument (and this will override the strategy level costs specified).
-or allow the user to specify a factor of QM specified "instrument default costs" under strategy level "commission rule".
I prefer the first option personally.
There's just a few details that need sorting in PT to make it a great back testing tool. IMO these are: instrument specific commission rules (detailed here) and bar magnifier. Sort them both out and I'd be happy to pay extra for a premium version of PT!
https://www.multicharts.com/pm/public/m ... es/MC-1708
If I have a basket of instruments in PT, with greatly varying tick values and volatilities, commissions etc, and one signal applied (which I'm optimizing), I need costs per fill to be instrument specific and not signal specific. Otherwise the optimization will be steered by any biases (will over aggressively trade the underestimated cost instrument and under trade the overestimated cost instrument).
I suggest either:
-add the costs section to the dropdown menu when the user right clicks each instrument (and this will override the strategy level costs specified).
-or allow the user to specify a factor of QM specified "instrument default costs" under strategy level "commission rule".
I prefer the first option personally.
There's just a few details that need sorting in PT to make it a great back testing tool. IMO these are: instrument specific commission rules (detailed here) and bar magnifier. Sort them both out and I'd be happy to pay extra for a premium version of PT!
https://www.multicharts.com/pm/public/m ... es/MC-1708
Re: Portfolio Backtester Multiple commission rules per strategy?
Multicharts?
You could just add some new keywords that allow commission to be set in the signal (and let it be additive to what is also specified in strategy properties [but the user would probably set the to zero if using keywords instead]):
How easy will that be to implement? I would say that is is essential.
If MC really wanted to show off they could allow the user to set costs based on fill types:
This way we can both accurately model instrument trading costs and strategy trading style costs and prevent a PT optimisation from being steered towards cost related biases.
You could just add some new keywords that allow commission to be set in the signal (and let it be additive to what is also specified in strategy properties [but the user would probably set the to zero if using keywords instead]):
Code: Select all
if symbol=xxxx then set_cost_per_contract=10
else if symbol=yyyy then set_cost_per_contract=10
else raiseruntimeerror("symbol not found!");
If MC really wanted to show off they could allow the user to set costs based on fill types:
Code: Select all
if symbol=xxxx then begin
set_resting_aggressor_cost_per_contract=10; {resting stop triggered and filled}
set_passive_cost_per_contract=2; {resting limit order filled}
set_nextbar_aggressor_cost_per_contract=15; {aggressor next bar fill (typically a market order, but could be a marketable limit or converted stop order too}
end else if symbol=yyyy then begin
set_global_cost_per_contract=10; {sets a default cost of a fill, should the fill subtypes not be specified by the user (as with symbol "xxxx")}
end else begin
raiseruntimeerror("symbol not found!");
end;
This way we can both accurately model instrument trading costs and strategy trading style costs and prevent a PT optimisation from being steered towards cost related biases.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Portfolio Backtester Multiple commission rules per strategy?
Hello wilkinsw,
This improvement is not as trivial as it seems. Unfortunately at the moment we cannot fit it into our roadmap.
This improvement is not as trivial as it seems. Unfortunately at the moment we cannot fit it into our roadmap.
Re: Portfolio Backtester Multiple commission rules per strategy?
Hi there, I was looking for something else but I found your inquiry. I think there is a workaround if you want to do what you want (far from optimal but could work).
1- Create fist strategy in portfolio with first instrument - In this strategy you have the optimizable variable
2- Create second strategy in the same portfolio - this strategy is a copy of the first strategy but instead of using an input you use an external variable.
With the first strategy, you populate the external variable with the value of the optimized input. The second strategy use it after.
The only thing I'm not sure is if the optimizer will populate the external output at the right time for it to be used by the second strategy... might worth the shot
1- Create fist strategy in portfolio with first instrument - In this strategy you have the optimizable variable
2- Create second strategy in the same portfolio - this strategy is a copy of the first strategy but instead of using an input you use an external variable.
With the first strategy, you populate the external variable with the value of the optimized input. The second strategy use it after.
The only thing I'm not sure is if the optimizer will populate the external output at the right time for it to be used by the second strategy... might worth the shot
Re: Portfolio Backtester Multiple commission rules per strategy?
I'm not following what this has to do with changing commission rules behavior in Portfolio trader, as per the OP?Hi there, I was looking for something else but I found your inquiry. I think there is a workaround if you want to do what you want (far from optimal but could work).
1- Create fist strategy in portfolio with first instrument - In this strategy you have the optimizable variable
2- Create second strategy in the same portfolio - this strategy is a copy of the first strategy but instead of using an input you use an external variable.
With the first strategy, you populate the external variable with the value of the optimized input. The second strategy use it after.
The only thing I'm not sure is if the optimizer will populate the external output at the right time for it to be used by the second strategy... might worth the shot