How do i backtest?


“There is a great difference between knowing and understanding: you can know a lot about something and not really understand it” -Charles F. Kettering. With this let’s explore the importance of Backtesting. Market movements are random and unpredictable and if this is so why do we need to Backtest?

Backtesting helps me to get to know my stocks at a deeper level. If i need to trade a stock i would treat it as a friend, understand its character, the mood swings, what makes it ticks and why it moves in a particular manner. Backtesting our entries and exit will manage our risks as we undertake different strategies for different period. Backtesting also increases your confidence as you go through the emotional and psychological stresses without the physical monetary losses. How wonderful is that?

I’ll go through the steps i take as i Backtest a stock. For this educational purpose i would use BOOM.

1) Characteristics
Always look at a Year-to-date chart to understand the above. BOOM over a year period is a downward trending stock. Over the year it has 2 gap down period May and August. For this 2 period BOOM fails to fill up the gap and usually after a month of trying to fill up the gap it trend downwards. How does this knowledge help me in my trading? This translate to opportunities for me. If i manage to short BOOM and there was a gap down, what it means is i would need to switch to long at the first opportunity of that as from the previous backtest of the gap down it shows that it will try to fill up the gap which takes a month or half a month before it trends downward again.

The year high is 49.85 and the year low is 4.95 and currently it is trading at 11.44. So for the year the stock has decrease in value of at least 70% from its high. And it is off its low at about 130%. This gives me insight that it is trying to recover but it is a long way to reach the previous year high. Overall bearish outlook for the stock unless proven otherwise.

2) Support and Resistance level
At 11.44 now its approaching a 3 month high resistance of about 12.50. Should i trade now or should i wait. Where is my edge? From where it is trading now it is now 9% away from targeted support. Looking at the previous trading days 9% is within reach. So i will wait till it reach the support for my trade. At 12.50 i would place 2 orders to catch a breakaway upwards or downwards. Catching the breakaway always proves to be a profitable trade vs playing catching up with a trend. With the breakaway trades we are allowing the market to decide for itself the direction of the trend it wants to be in. Never predict the movement!

After identifying the first support level, identify the rest and this will give you a bigger picture as to how it moves. For BOOM it did try to make a break upwards 3 times during July to August before giving up. Likewise for October to February. Do you see a pattern now? Does this mean that at the current support level of 12.50 BOOM has a higher likelihood of trying it 3 times before it breaks down? Past information are just supplements to our trades. With the added knowledge we will be more prepared if we do get to short BOOM at the resistance. We need to be prepare for its upswing 3 times before it head lower down. This will allow us to be more nimble to the stock reactions.

3) Recent Trading days, What gives
At the current closing price of 11.44 i would usually draw a line back to help me analyze how it has been trading. Where it closes, we have 2 days of red bar 18 February and 19 February. After-which is a downward movement. Anything above 11.44 to the resistance of 12.50 is a struggling point, mainly sideways. So there is a higher possibility of the stock trending downwards below 11.44 and a higher chances of it trending upwards above 12.50. Will BOOM try to break the resistance 3 times before it moves to make a newer low? We will never know but i will be prepared for it if i am in short position. I will be prepared for 3 upward movement as it tries to break the 12.50 resistance.

Hope this helps and if you would like to share your opinion please do so within the comment box.




Other people also liked the following articles: Related Posts Related Websites
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit

5 Comments

  1. Ken Lau says:

    Every time I read this blog, my understanding deepens. No exception this time round.

    As a trader, I have been preconditioned to see certain signals each time we see any chart. Each time I see a chart, I will hastily draw a conclusion and busily draw lines and such on a chart.

    After reading this post it seems like I have been stereotyping these charts. This is just like one person stereotyping another when they first meet … and we often know that first impressions are deepest but often wrong.

    After removing my lines drawn previously and reading BOOM again with Imral’s notes, I begin to appreciate the counter more.
    Now, it is a must for me to review my other counters in the same way.

    Thank you Imral for sharing this.

  2. An interesting and useful analysis. Seems like it would definitely help to get to know a stock one is trading.

    I wonder if you also do backtesting - either automated or manually - looking at only one bar at a time, not the whole chart, so as to test out how well the trading strategy has performed in the past?

  3. Imral Sanjiman says:

    Hey Jackie most of my backtest are mainly manual. I would do a bar to bar backtesting and apply a simulated strategy to see if the trade works out. If it doesn’t i’ll further analyze what went wrong.

  4. David says:

    Great post. Sharp and clear points: I particularly agree with your stock as friend analogy. For those beginning the journey in trading, understanding a stock like a friend has its benefits - but it also has some shortcomings.

    What if that friend doesn’t hang out enough (e.g., behave in a pattern you’re likely to feel good about trading). Friends are trusted when in part, they are dependable or predictable, but what happens when a crisis or major event happens - maybe they get married or suffer a tragedy - they wind up changing for better or worse.

    My point is rather than rely on the behaviors of 1 friend, my approach looks at multiple friends to find those that are behaving in the manner I’m most comfortable with - on my terms. With regard to stocks I call this event-based trading or backtesting. Instead of a focus on a particular stock to backtest, I look at an event or pattern (e.g., 30 day highs on stocks above their 200 day SMA on higher than usual volume) and backtest the pattern with a trading plan rule set using a tool that finds all the stocks that traded in that pattern. The trading plan rule set (e.g., stop loss, profit target, time in trade, which hrs traded in market, etc.) is applied and the results are summarized to tell me average winning/losing trade, net gain, win rate, etc.

    The tool is not as important as the shift in perspective: it takes awhile for traders to lose their affection for a particular stock and realize what they really befriend is a particular pattern or behavior.

  5. Xavier says:

    Thanks for sharing on your backtesting methods. I use alot of indicators during back-testing. For a list of indicators refer to http://www.trading-indicators.com/

Leave a Reply