«

»

Jul 23

The Beauty of Back Testing

I’ve embraced my inner nerd this weekend, and spent a great deal of time with my face in front of the computer, writing out reams of data by hand.  You see, I had an idea to make my life a little easier and hopefully more profitable.

I’ve been mucking around with FX this year in an effort to diversify away from equities, and while I had a brilliantly profitable month in May, it turned to absolute junk in June.  The main issue with my method was that it relied too heavily on my own input to generate signals through the use of trend lines.

The thing with using a trend line as part of your trigger is that you can pretty much draw a trend line to create any outcome you desire.  Don’t want to enter?  Funny how that trend line you just drew neatly misses the mark.

Even if you don’t mean to, your subconscious can have its evil way and screw things up.

So I need an entry that is totally price derived, and not manipulatable(?) by me. On Thursday I noticed a set of circumstances that seemed to be an interesting trigger into a trade, so set about testing it to see how it panned out in a stop-and-reverse kind of scenario.

It was crap.  It lost money and had way too much noise.  But after a couple of filters were added it’s come off quite nicely. Thankfully – after manually testing every entry and exit on the $AUDUSD since 1998 I was starting to feel like my eyeballs would fall out.

The thing I like about doing a manual back-test is that you get to feel the pain.  Perhaps that’s a little sadistic, but I think it’s important to sit through the ups and downs your system would have generated.

You live through each entry and exit as it would have happened and when you hit a huge patch of losses you start you feel uncomfortable that it’s not going very well.  You start to doubt if the system will even be profitable after this stupid clump of losers.

With computerised back-testing programs, you don’t get that.  You get to see very painlessly whether your idea works, but you don’t have to sit through each and every loss with anything invested.  Even having your afternoon invested in the outcome is enough to make you want it to be successful, and when you’re recording it and it feels like it might not be, it’s really disappointing and feels like a huge waste of time.

But its not.  There’s absolute gold to be found in back testing, even if the system is junk.

The first thing is that at least you get to find out it’s crap before it loses you all your money.

And in the happy event it rakes in the dough hand over fist, you get to have a sneak peak into the personality of your system.

For example, within the 14 years of data I tested, there was a huge run of 14 losses.  And a break-even was in there too, so 15 trades without a win.  On a daily system this could translate into a totally win-free year – yuck!!

When I was testing, I could feel myself getting frustrated.  I worried about what kind of effect the draw-down would have on the systems profitability, and if I would even be able to sit tight and trade through that kind of situation.

You hear all the time that you never know what’s just around the corner, and this testing experience really brought that home to me.  You need to be prepared to trade through 15 trades from hell – well, purgatory perhaps, since we’re capping our losses – to get through to the other side.

Because just like you don’t know when a nasty patch is before you, you also don’t know what comes right after those losses.

The thing is, that run was an outlier.  Prior to that freak run, the largest hit of losses was just five – nearly anyone can handle that and if I’d quit after loss 10 and ditched the system I’d have missed out on what was to follow – namely, two monstrous money-making wins.

I still have a lot of work ahead of me with this method – I need to test it on some other pairs, check the correlations and I also want to see if the method translates nicely onto shorter timeframes.

But it’s work I’m happy to do, because every minute I spend now figuring this out will translate into a method I know inside out, and have enough confidence in to pull the trigger time and time again.

***

Did you know you can get Rogue Traderette posts sent direct to your in-box? Sign up for FREE here!

You can also follow me on Twitter Facebook., or StockTwits.  I know, I’m everywhere. ;)

And if you really liked the post, please spread it around a little – the share buttons are right below.

 

 

 

  • http://www.andrewcaldwell.org/blog Andrew Caldwell

    First off apologies for raiding your comments this morning! With say, your risk management for example, 15 losers in a row with 1% risk is only a 15% draw-down? But then again, trading w/ only 1% at a time would mean some hefty capital to be making any money…

    In your experience have you found that just using a combination of some of the simpler indicators is best?

    • http://www.roguetraderette.com/ Jessica Peletier

      No problem Andrew, I love it when people ask questions of each other here :)
      Keeping it simple is definitely best. I literally only use a MA and candles for my new method.

      Regarding risk levels, I would never risk more than 2% regardless of account size – it’s not a race and you’re better off adding to your account with savings to grow it if you want higher returns. Either that, or figure out a way to make your winners bigger :)

      • http://www.andrewcaldwell.org/blog Andrew Caldwell

        Just thought of this one while doing the dishes (glamourous trading life…)

        With your backtesting, if you’re satisfied with your results, would you be inclined to say “x” method/system works specifically with x/y currency pair and only for a certain time frame?

        I’m struggling to get my head around that certain methods would work across the board.

        • http://www.roguetraderette.com/ Jessica Peletier

          I tested my method across 5 pairs, all of which were profitable bar one – GBPUSD. My method is trend following, GBPUSD is a choppy rangebound pair, so no surprises there. I think a strategy needs to be robust, but certain pairs are better suited to certain methods. My method works better on longer timeframes, as it gets more false signals on shorter TF – but it still works.

  • Pingback: Best Of The StockTwits Blog Network 7-28-12 - bclundbclund

  • Pingback: Monday links: deterring corporate malfeasance | Abnormal Returns

  • Markus

    Hi Jess,

    your post are inspiring and fun, too.
    Besides this backtesting excerise, do you analyze your stats? And if yes, are you consistently profitable? I hope the questions are not too blunt, but it would great if you could share some of your performance stats.

    Cheers,
    Markus

    • http://www.roguetraderette.com/ Jessica Peletier

      Hi Markus, my FX is experimental in a small account, and while profitable so far definitely isn’t yet consistant. Hence the test – I’m looking to change my method.
      I do keep stats, but it’s too early to tell. 6 months of profitability does not consistancy make – ask me after I’ve been trading it full time for 5 years and then I’ll have an answer for you.

  • Max

    I have used a program call Forex Tester 2 for years, the total amount of backtesting time would probably equate to more time spent doing anything else trading related. Like yourself, I seem to pick a few things up over time that look highly profitable. It is amazing how you seem to spot the ideal entrys and exits when you scan a chart. What I found though with the manual backtesting was that my bias to knowing the future price tended to factor in on the trades. Ie, I would be long at times just because I knew that around the corner there was a 500 pip spike. That almost always early on busted my theory.

    What I liked about Forex Tester 2 was the ability to randomly jump into a point in the past at which point I would then allow the tick data to self generate essentially, to a small degree, represent and active live market that I would then trade, sometimes up to 5 hours plus. What I found was that after a few weeks of doing this I would have traded in a live type environment, that is a moving market were my decisions had to be made and thought out in real time, up to 5 years without a great deal of bias. I mean, unless I pushed the stop button, the markets moved and I had to focus on the real time.

    I could never go back to the manual handwritten back testing and thankfully I don’t have too. I cannot use the programs like you mention, they don’t offer any real clue as to something will work or not, they just help give you a scope of whether something over X period returns positive results and the real problem with that is that it is almost impossible to factor in all the variables. Even a written trading plan has tolerances for markets, you. With FT2 I get that dread of long drawdowns that come with just about every method of a period of time, you get the jubilation of new equity highs and you get all this without a sore wrist.

    Another great article and welcome to the Forex Arena, where you only get a limited amount of sleep on the weekend ;D

    • http://www.roguetraderette.com/ Jessica Peletier

      That sounds very cool! I suppose what I did was similar in that I jumped as far back as my data would allow, then scrolled forward – kind of a poor-mans version of your neat software. Yours sounds like way more fun though! May have to look into it if I find I’m not happy enough with these results.

      Thanks for your response, that’s really helpful. :)

    • http://www.andrewcaldwell.org/blog Andrew Caldwell

      Hi Max,

      I’ve just dived in to FXT2 yesterday, but have found all fo the tutorials to be about manual back-testing in the past. Is it possible to set up your buy and sell parametres (buy on an MA cross, or RSI above 50 etc..) and just have the trade data play out, and give you your stats at the end?

      Any advice would be appreciated,

      Andrew

  • http://twitter.com/mikeharrisNY Michael Harris

    Good job! A few more general details about the system, what you used for slippage and the backtesting platform would help. I am very careful with backtesting because several platforms I used in the past produced wrong results. Thus, I developed my own backtesting algo. The limitation of backtesting is that it can only be used to reject hypothesis on the basis that they did not work in the past. That is not very useful for the future because of TYPE I and TYPE II errors. If you are interested in some more details look in my blog for post “Proper Use of Back-testing”.

    • http://www.roguetraderette.com/ Jessica Peletier

      The system is very simple, just a run of 3 green or red candles through a MA to enter long or short, stop and reverse. Counter trend short triggers above MA ignored, and vice versa. A couple of small rules to prevent chop, and that’s it really. Protective stop 1ATR above/below MA as back-up risk management.

      I didn’t use a platform, literally eyeballed the charts and marked all triggers, then added it all up. I don’t account for slippage, but I reckon my own human error will make up for it.

      It’s not perfect, but nothing in the market ever is so it all works out in the end.