Technique help to reduce over-fitting

Forums ProRealTime English forum ProOrder support Technique help to reduce over-fitting

  • This topic has 63 replies, 12 voices, and was last updated 3 years ago by avatarPaul.
Viewing 15 posts - 46 through 60 (of 64 total)
  • #143401

    You are absolutely right, Nicolas & Vonasi. Thanks for the advice. I’ve oversold the idea 😉

    you will also introduce a form of over-fitting by avoiding bad months

    Indeed, I think a better use of it should be to avoid “extreme” bad month and “even more extreme” good month, where in total gain it looks nice. The code above should be used to avoid such scenario, and stop the test immediately.

    if the results are below what you would be happy to trade then quit the back test to save optimising time

    Yes, that’s the idea. If we do not like the system to have consecutive 3 weeks of loss, then stop further testing to make it faster.

    #143405

    To “compensate” this variable you can use a longer duration of backtesting 😉

    #143432

    Hi guys,

    I’m just a novice here still finding my way around but could the issues and differences detailed above just be due to differences in the 10.3 and 11 versions?

    At the moment we’re all speaking from our own different experiences on 10.3 and 11 and assuming each of us have the same version ?

    Either way thanks for all the valuable ideas and input it really helps me to think outside the box.

     

     

    #143438

    Hi,

    In my opinion, the information mentioned earlier is applicable to both v10.3 and v11. Although v11 may give more options on optimization, but we still need to look out how to not over fitting and how to optimize faster.

    #143444

    v11 s clearly better for optimization (2d, 3d (love it) and so on) but not available on IG sadly

    And sadly we will have always overfitting but we can minimize it. The purpose of it is to have the best correlation with OOS

    And I don’t remember this study on Quant where they try to calculate the correlation between overfitting and number of variables but their conclusion was there is always an overfitting

    #143708

    No loosers?

    Of course there is losers;- 87 % winners

    100 % winners on 100 000 units = Overfitting for me

    @dow jones LOL not even.

    I consider to sell an algo is a scam because it need always some work and retesting

    yet you sell algos on your website?

    #143720

    No @snucke sorry.

    For me it’s a scam to sell a n algo, because as a car it always need some work, some oil, some customization ..

    #155870

    Sharing the latest version, more complete. Insert it at the end of the strategy.

    I used it to make faster optimization…skipping some combinations that I anyway not interested to look at all, e.g. 10 consecutive weekly loss, no point to see this combination.

    Sometimes it is also useful during WFA, I have tried to adjust to fit for WFA, but not always accurate, mainly because each cycle of WFA, it restarts the computation, so if the duration of a single WFA being to short, then it will stop the test too early, unless you give more room to the parameter. It also depends on the frequency of the strategy.

    E.g. 200k bars for 1 min time frame, 5 iteration, 60/40, so the 1st iteration maybe just 2 months. If too little trades during the 2 months, e.g. if you apply volatility filter during March 2020, strategy trade only 2 trades and loss, then the return can be too little so back test stop. So depends on strategy, you might want to give more room to the parameter, like increase the maxconsecutiveweeklyloss to 3

     

    #156079

    need to adjust it lower, to something between 3 to 10, e.g. 5-21, 6-21. So I guess overall, need to apply accordingly to the goal of the strategy

    Please can you expand a little on this. I have been using VRT since yesterday and not getting great results 😟, but I wonder if it is because my strategies are faster than Vonsai and use more trades per day.

     

    i get between 2-3 trades per day on 1 minute timeframe, can you recommend VRT QTY and Random settings please?

    #156098

    I’m not sure if you grasp the mechanism of VRT test, but I think is important to know it first, and in short, ProBacktest is limited by the fact that once a trade is on market, it will not open another trade (unless you activate cumulateorders), so during a trade, you may have another signal, but not taken into account by ProBackTest. Those missing signal could have killed your strategy but you do not know as they were skipped. Thus, VRT is born, to tried to skip some barindex, in order to give opportunity for those missing trades to appear and see if they still work well. (though from software point of view, this can be improved by having multiple instances to monitor per trade, and consolidate each signal that are unique, but I doubt PRT will do that).

    I wonder if it is because my strategies are faster than Vonsai and use more trades per day.

    There is no problem if you have more trades per day. It is more about if during the VRT test, is your trades reduce drastically? E.g. from total 300 trades to become 50 trades. If it is reduce to 50 trades, are the trades still consistent? If yes, then your PRT result will be still good. If no, the chance of curve fit could be higher, it means you might have few big winners (in relative to your average gain), and since those big winners have disappeared in VRT, then weakness appear. And how big chance of those big winner to appear again in live trading? Without those big winners, is your profit become poor? This is quite subjective, because your strategy might be a scalper, thus more trades are in your strength…then you might consider to adjust the parameters.

    can you recommend VRT QTY and Random settings please?

    The game is the higher value of QTY, the less trades it will be, after you finalize with QTY, then you try to adjust Random so to have total 100 combinations (as PRT optimization window allows only 100 combinations), so you may adjust to your need, my recommendation is to have at least 100 trades for 1m TF. My preference for 1 min TF strategy is to get a score >60 in QTY 2-10/random 1-10, and further test it with QTY 2-5 /random 1-21 with >70, based on experience from my 1m strategy that have profit in live for sometime. To be honest, running VRT is already the last step, the difficult part is are you willing to give up your strategy if it scores badly, as you might have spent several weeks on it? So even it scores badly, maybe just put it in demo and let it run for sometimes and see. If VRT scores well, at least more confident to put it on live sooner… (and I can tell you for my 1m strategy, I have run many rounds of test, improve, test prove, in VRT, WFA, and other tests 🙂 )

    Hope it helps, and don’t hesitate to come back and share your opinion and new findings.

    2 users thanked author for this post.
    #156100

    Those missing signal could have killed your strategy but you do not know as they were skipped.

    and that’s why often strategies have a big stoploss (= many missing signals) and a smaller profit target and fail live.

     

    maybe if a strategy has a simple fixed stoploss & profittarget (1:1?) , you could test each signal simultaneously (and cumulative) with help of arrays in v11. Now if you have a high winratio, then it’s a true high winratio.

    Then after finding best settings go back to non cumulative, add additonal exits such as a trailingstop and the system will be more robust. Doubt it’s possible though.

     

    1 user thanked author for this post.
    #156122

    Thank you @DowJones, That is really really helpful, and also helps explains a few things I hadnt understood before – not because Vonasi didnt explain them, it just that I didnt understand them!

    One follow up question though… in Vonasi’s original thread he says..

    “…‘Qty’ from 2 to whatever you want and ‘Random’ from 1 to whatever you want (maximum = maximum qty value).”

    I understood this to mean that you must not exceed QTY with the random number, which would would make Q=2,5 and R=1,21 invalid?. Do you know why this is?

    I “thought” I had a good algo, but on high QTY (2,10+) tests it doesnt perform, however with Lower QTY, such as 2,5 it does (see attached)

    With no VRT, it produces 103 trades in my 200k backtest, with higher QTY values, and in all of the results with less than half the trades it performs poorly, however when trades are closer to the actual number it does well, any thoughts on this?

     

    also, is there a reason why you chose 21? and not 25 for Random (or higher)… I ran a test with QTY 2-5 and 1-25 (to get 100 results) and I think the results were pretty good?

     

    thanks again

    #156128

    Not all strategies are suitable for applying the VRT code to and also sometimes the VRT code is applied incorrectly. So without the actual code and seeing how VRT has been applied to it it is very difficult to comment much on the results.

    ‘Qty’ from 2 to whatever you want and ‘Random’ from 1 to whatever you want (maximum = maximum qty value).

    That is how it should be and the values should result in 100 or less optimisation results.

    There is no correct set of values – you need to capture as many trades as possible so more tests at more different RANDOM and QTY settings can only be a good thing.

    103 trades is not a lot. If they are not on the market for long then the VRT test might not find many new trades and so not tell you very much about your strategy. As I said VRT testing does not suit every strategy and if you have questions about the results then you have to look for reasons why you have those questions. We must question every strategy as much as possible to understand how it works as much as possible before we put a £1 on it.

    1 user thanked author for this post.
    #156131

    103 trades is not a lot.

    Yeah, sadly I can only access 100k bars of data from IG and as my algos run on 1 min I only get around 4 months of data.

    All said, your VRT is excellent and another tool for our arsenal, I just wish it was a little easier to understand for the newer algo coders here. It could just be me, but it certainly wasn’t obvious to me that using the “default” settings wouldn’t be suitable for all algos. I initially felt that just fiddling with the numbers would be curve fitting the anti-curve fitting tool, hah!

    Anyway, thanks again everyone. Great community here and all the quick responses from the regs/pros is much appreciated.

    #156133

    The best way to understand the VRT is to GRAPH TRADEON. That way you can see the ‘randomness’ that is in each test for allowing trades to open.

Viewing 15 posts - 46 through 60 (of 64 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login