Optimising – Curse or a Blessing??

Forums ProRealTime English forum General trading discussions Optimising – Curse or a Blessing??

Viewing 15 posts - 1 through 15 (of 77 total)
  • #66702

    A few of us on here have a habit of hijacking Threads by making comments not related to that specific Thread and then others comment further and so it gets out of hand.

    We will try our best to raise Threads on this Forum in future!

    So here’s one discussion that’s been going on recently, you would need to read forward 1 post and then back maybe 6 or 8 posts to  get the full pearls of wisdom from contributors! 🙂

    Vonasi wrote: Writing codes and testing them is a very good educational tool

    I agree, a good point well made (as usual) but I do think that newbie (or not so newbie coders can get sucked in by the optimiser and it can take a long long time coding, backtesting, demo running to understand the clear signs of curve fitting

     

    #66703

    Referring to what was written in the pathfinder thread, I also made the mistake in the beginning that I set new strategies live after a fancy looking backtest result without having run it on demo for some time. This most often proved as a stupid idea and lost money.

    Nowadays I usually run a strategy for several months on demo before I approve it for live trading. I’m still breaking this rule when I’m porting a successful strategy to another instrument. If I’m already running the same strategy with good results live on other instruments I often dare to put it live directly. This (so far) went well. 🙂

    1 user thanked author for this post.
    #66705

    That’s why I’m glad we now have a WF tool in the platform, still not perfect but at least usable to educate people about the danger of optimization, and because I’m already in this state of mind since a long time, I tried to teach people here about how to build something relevant enough to be considered as “robust”, since the beginning of the website. There is only way to go: build something you might feel reasonable for your risk aversion in an IN SAMPLE period and validate it in an Out Of Sample period, with WF, backtest, MonteCarlo or even demo trading.

    As Vonasi said in the pathfinder topic, even if most of strategies of the library seems curvefitted now, it is not necessary a waste of disk space on our website’s server. They are educational, that’s the way everyone’s learn and how I learned myself. One day you’ll have an edge and the next one your account will go red, that’s trading, not a promised land.. unfortunately. But hey! We still having fun! 😆

    3 users thanked author for this post.
    #66903

    I may add a few observations from my own optimizations, and comparison of their results in backtest and reality :

    • If an optimized backtest in a few cases yields super gains, but only for a few parameter combinations that emerge from a large sea of mediocre or bad results – do not trust it. These are probably over-optimized insular results.
    • If you do not understand (that is, if you cannot describe in simple words that your grandma could understand) why certain parameter combinations yield good results, do not trust them. They may be just accidentally working, because the curve fit is so good.
    • If you can tell why a certain result worked well in backtest, and why you may have traded this also in manual trading (e.g., if there is a simple reason, such as : price is already overbought, so I don’t buy now, I wait until price has come back), it may be good : when there is in addition a broad range of optimized parameter values where this is true.
    • Optimized parameter values that do not change much over time are usually statistically ok, but when they leap around wildly between different in-sample periods or between backtest and demo trading, they are probably not usable.
    3 users thanked author for this post.
    #66905

    One more :

    If you get good results for a broad range of parameter values, do not use the ones at the ends of the range, even if they may yield the best gain. This may be like standing at a cliff : The edge is the highest point, but one step further and you fall down.

    1 user thanked author for this post.
    #66974
    Leo

    I have a cuestion. If you optimise an strategy and tested for a period of time. After that period test, if you optimise it again you will get other parameters and then the circle start again?

    I test my strategies in real markets with Mini contracts  after a lot of testing the code in several markets and timeframes. I add a switch in my code if it loss like 2 times  it quits

    #66993

    The Walk Forward tool gives an indication as to how often you need to optimise by referring to the IS period length followed by acceptable OOS results? Hope that makes sense?

    Markets change, e.g very recently after the early Feb volatilty I noticed immediately that manual strategies I had successfully  been using for months were nowhere near as good.

    In my opinion traders had immediately got a lot more nervous and were not prepared to let a profit run more than 6 to 12 points before there was a sharp correction.

    And so – depending on Timeframe traded  – variable values would need to be re-optimised to compensate for changes in respective Markets?

    Just a few Thoughts
    GraHal

    #67022

    You can’t know the change of the market phases in advance, only in hindsight you can tell that there was a change – and would have needed other parameters.

    Maybe you can distinguish market phases on a very long-term basis (years), and differentiate between bull and bear markets that need different strategies and parameters.

    But when you need to re-optimize parameters regularly after a few months, it means that the system is not “robust”, as Nicolas would call it.

    In a way, you need to look for stable mediocrity that works well over longer times, instead of contantly re-optimizing systems to get super-stellar results for the last period, and then nothing with these parameters in the next period.

    1 user thanked author for this post.
    #67027

    instead of contantly re-optimizing systems to get super-stellar results for the last period, and then nothing with these parameters in the next period.

    It’s never as bad / clear cut as above (as I know you know! 🙂 ) but also there is our own trading psyche to take account of. I usually manually trade … quick in and out … scalping I guess or somewhere near and I tend to judge Auto Systems similar. If trade isn’t in profit in a a few minutes then I am judging the market structure and looking for reasons to close the system manually! 🙂

    I cant even make a cup of coffee without staring at the IG App on my phone if an Auto System is trading.

    Others start an AutoSystem and then leave it running … we are all different and I don’t think there is a one rule fits all, for example … stable mediocrity?

    Good Discussion
    GraHal

    #67032

    Every trader has his or her different ways of going about trading and your style @GraHal may work well for you but the main issue I would have with it is that nothing can be quantified. How do you not know that the system you just manually closed a bet on for a small loss or small win wouldn’t have had a huge win if you’d just left it running. Then BANG!  Sod’s law the next trade hits a huge loss in the blink of an eye before you had a chance to pull the plug on the strategy. You think it is a rubbish strategy when in fact it could be a winner.

    Sometimes it is better I think to just have a general look based on recent history and get a feel for where the markets are at. If we have just had five years in a row up then there is a strong chance that this year could be a down year. We have had four quarters in a row going up – how often has that happened and what is most likely to happen next – maybe this next quarter will be a downward correction and so on through the timeframes. This I think is a better quantifiable reason to not trade or pull the plug on a strategy rather than panic closing just because a trade is not in a profit within minutes. So often I have gone to bed depressed that a trade is in a loss only to wake up and find that it is in a big profit. Nine times out of ten if I close a trade early I have cut the profit short. Most of the time it is better to give a trade room and let it do what it has to do.

    This maybe of interest and kind of related to what I posted above – I am just working on an indicator/analysis tool to quantify the effect of runs of the same colour candle and calculate the probability of what is most likely to happen next based on history. With it we should be able to calculate a probability of what might happen next which could benefit our trading decisions. For example – did you know that since the start of PRT daily data the DAX has never had more than nine down days in a row and the probability of it going up after four down days in a row is over 62% and if it has gone up two days in a row then there is only a 51% chance that it will go up the next day and the average size of the down days will be bigger than the average size of the up days.

    Hopefully once I am happy with it I will post it to the library.

    2 users thanked author for this post.
    #67033

    Well, as long as you make money with your system, it works for you. That’s the final judgement.

    Stable mediocrity means for me : Be happy with average gains, as long as they drop in quite regularly. Do not dream of becoming a millionaire within months by writing and (re-)optimizing brilliant backtests, it has never worked (for me).

    This is just my personal advice to anyone reading here, newbie or not. From time to time, there may be born geniuses, but I am none.

    1 user thanked author for this post.
    #67046

    I agree verdi55 most would be better following the Stable mediocrity approach … maybe!? 🙂

    Vonasi you make it sound like a guess that I am closing a System. I am looking at recent highs and lows and very important … Elliott Waves (gets very little mention or attention on this site?) and Fibonacci retrace etc.

    If a System opens a short at around 60% retrace (down) following wave 3 of an uptrend then I sure as hell aren’t going to wait around while it goes back up through wave 5 and then an abc correction and maybe, just maybe  comes out with a decent profit?

    In the above example with a short  I would watch the price movement and when I judge the down momentum is slowing and there has been a 2nd failed attempt to get lower (often this would be at around a 70% retrace from a wave 3 high) then I would pull the plug on the System and immediately pop it back running again.

    I don’t want all the stress along the way on a short going up through wave 5, I’d rather get out with a smaller profit that I can see today / now and a smile on my face.

    That’s just me and my profile and I’d be the first to admit I am a little weird in many areas of my life! 🙂

    GraHal
    PS Your new same colour candle system sounds good Vonasi!
    I imagine the day of the week and day(s) of the month play a part also?

     

    #67053
    Leo

    Hey GraHal,

    if I have a feeiling that something is not going well for closing the trade manually then I do but I also stop all related system and then I Programm the criteria of why I felt like closing the trade, and optimise, test , etc, etc

    #67056

    Yes I would code it all in also if I was expert enough to do that, but there are so many factors I can’t do it.

    For example, there are a lot of Systems based on momentum. When a Fib retrace goes beyond 50% price  often picks up momentum immediately for a mad dash to the 61.8% overshoot (which I find so often is 70% + , 75% even … another discussion).  The System triggers on this mad dash momentum.

    But these Systems don’t have a small Take Profit, oh no often it is 60, 80, 100 + points and so there is profit during the mad dash and then the Elliott Wave continues and the profit turns to loss until eventually price hitch-hikes on a passing favourable trend and finishes in profit 100’s of bars later?

    To my way of thinking, when the conditions which trigger the trade entry are no longer valid then the trade should exit at the next best point (break even or as near as possible).

    So I guess I try and manually manage my way out of System failings like above. I also code my own Systems but – relative to most on here – my Auto-Systems are simple, but are getting more successful I am glad to say.

    GraHal

    #67060

    I think this curvefitting discussion is interesting. I have not been writing to much, but reading a lot!

    I’m trying to make some structure to my strategybuilding by making a document to follow. The main point is to “make sure” the strategy is robust. I can see that it’s a lot of stuff to do to test the strategy, but if you are to strict with the testing, all strategies will end as not robust. There’s a lot of tools to use!

    * IS (optimize manual or platform) with OOS confirmation (i.e. 50/50, 70/30)
    * platform’s walk forward testing
    * test the strategy on similar instruments
    * test the strategy with timeframes close to your original
    * test different optimizable parameters and see how the one’s close to the original performs
    * monte carlo with random trade order
    * monte carlo with different changes in parameters, trade length+++
    * test within a portfolio of strategies
    * demo testing
    * a lot more!

    Before this, you have to come up with a strategy to test and this would be one that makes sense to you and you fully understand. I can read that professionals say that maybe 1 in a 100 will pass. I think their point is that it’s not easy!

    I find this to be a really hard road to walk, but agree that everyone needs to find his/her’s own way. The hardest part for me know is just getting trading ideas, the rest is actually “easy”, lengthy hard work!

    Sidenote:
    As Nicholas has mentioned earlier I think it’s important to understand that the strategies in the library may be optimized for the whole period you are able to backtest. And that it is signal ideas for you to use in your own strategies. If you test the oldest strategies you may have a OOS period to test on.

Viewing 15 posts - 1 through 15 (of 77 total)

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