to apply position scrambling already during parameter optimization
this is an excellent idea, although i wouldn’t know how to code it either. Best would be if Random Position were one of the optimization options built into the engine (along with gain, drawdown etc)
Another thing I’m experimenting with, is to move this idea of alternative entries out of the testing zone and into live trading. So I make alternative versions of the same algo that are just different enough to keep them out of synch, so that each sees different trades. For example, one with a % TS, another with ATR TS. Even if they take the same trade, they will exit at different places so usually one or the other will be off market and ‘available’. Obviously the basic structure has to be sufficiently sound that the alternatives still work comparably well.
one with a % TS, another with ATR TS.
Yes I often do above … 4 versions running on Demo Forward Test having same entry, but different exit criteria.
Most times, the version 1 comes out best … probably due to less specific criteria producing less curve fitting.
nonetheless – You have basically described my SEB testing technique. For example if I create a strategy on the daily chart and it passes the SEB test then I put it on forward live test with 6 strategies that can each only open a trade on one day of the week. So I have a Monday strategy, a Tuesday strategy and so on. Unless a trade is open for more than a week I will get every possible trade available.
On an hourly strategy the ideal is to have a strategy for every hour but 24 strategies on demo annoyingly takes up pretty much all of our allowance for running strategies in demo live.
Another option is to have two strategies, one that opens on only even barindex bars and the other only on odd numbered bars. At least this way we have two strategies slightly out of sink. We do still however miss a lot of possible trades but not as many as if we had just one strategy on forward test.
The even odd barindex is interesting. Could be useful for short timeframes. Can you code that for us please vonasi? Would greatly appreciate it
Can you code that for us please vonasi?
I already did way back in the early days of this topic! I called it Robustness Tester Lite.
Strategy Robustness Tester
to apply position scrambling already during parameter optimization
this is an excellent idea, although i wouldn’t know how to code it either.
It could be possible by using arrays. Each different random entry pattern gets an index number in the array, and then you add up all positions from different entry patterns by cumulating them (defparam cumulateorders = true). Then you manage them with partial closings. This means : you add up all different possibilities of the robustness tester in one single, large system by using arrays and position cumulation.
All
set stop ploss sl
and
set target pprofit tp
would have to be replaced by
sell at positionprice - sl stop
sell at positionprice + tp limit
and there are a few other complications when going over the zero threshold in total position size.
But as long as v11 yields chaotic results in the parameter optimization of cumulating systems, this will not be doable, I think.
So I have a Monday strategy, a Tuesday strategy and so on
Vonasi, you are a genius. I didn’t pay attention to the SEB idea as I use short TFs and it wouldn’t be practical. But 5 copies of the same algo running each day of the week is a v interesting idea, see attached.
The first image shows the global performance.
This offers a wealth of data to pick over – number of trades, comparative gain per trade etc.
Interesting that Thursday is notably the worst (over those 6 years), and friday the best. Which means that in many cases, poor trades taken on a thursday would be blocking the possibility of better trades to be taken on a friday.
If I understand the idea behind the VRT correctly (not 100% sure about this point), wouldn’t the following tip be enough to check the robustness of an algo ? :
Replacing this :
If c1 then
buy 1 contract at market
endif
If c2 then
sellshort 1 contract at market
endif
By this :
If c1 then
exitshort at market
buy 1 contract at market
endif
If c2 then
sell at market
sellshort 1 contract at market
endif
I don’t understand your post Roger or what at all it has to do with robustness testing.
Both of your codes do exactly the same thing. An order in the opposite direction closes all currently opened orders anyway.
This offers a wealth of data to pick over – number of trades, comparative gain per trade etc.
It would be great if we could combine all this wealth of extra data. If we could run six strategies in the optimiser (one for each day) and then combine their results to give a combined equity curve that would be fantastic. I did suggest it to Nicolas but he didn’t think that PRT would be that enthusiastic so I’m left with the slow process of dragging results into Excel and sorting them to create my own equity curves.
Both of your codes do exactly the same thing.
Wow I did not know that. An order in the opposite direction closes the trade, ok, but then I did not know it took a new trade. Good to know !