Timing the market by spotting bullish and bearish trends

Published: September 25, 2018 at 10:02 am

I discuss how to use how to time the market by spotting bullish and bearish trends with the moving average crossover. The idea is well known in technical analysis and involves two moving averages.  This is the 7th post in the series on tactical asset allocation (link to all posts). We had earlier considered market Timing With Ten Month Moving Average. So let us start with the basics.

What is a moving average? The goal in market timing strategy is to spot trends. However, if you plot closing prices of an index it will not be smooth, making it hard to find trends. So we take the average of the previous 7 days, 30 days, 365 days 12 months, 10 months every day. This smoothens the trend and easier to work with. Since the average is taken each day it is moving and is similar to a rolling return.

What is moving average crossover?

If we use a single average like the ten-month average, we look for when the price goes above or below the average. Instead, we can use two moving averages. There are many dual moving average strategies. In this post, I shall consider what Jim Otar calls as a hurricane warning chart in his book, “Unveiling the Retirement Myth”.

Long-term readers may recall that I had introduced a tool for it – Moving Average Market Level Indicator and enhanced it with additional features and for all Nifty indices: Nifty Valuation Analysis with PE, PB, Div Yield, ROE, EPS of 21 NSE Indices. So this is how it works. Plot the 5-month and 12-month daily moving average. I have used the automated tool to plot the 150 day and 364-day averages

moving average crossover method chart one

A bearish trend is possible when the 150-day average falls below the 364-day average- downward arrows. A bullish trend is possible when the 150-day average moves above the 364-day average – upward red arrows. Notice that the red line has not yet crossed below the blue line.

Naturally, like any method, this also suffers from problems. When the market zooms up nicely and then down nicely, it is easy to spot trends (with any method). However, during a sideways market, the averages will cross each often. This is known as whipsaw in trading. See the picture below for example.

moving average crossover method chart two

This means frequently buying and selling (see rules below). While the use of long-term averages minimises the whipsaw, it cannot be eliminated. However, for the period that you see in the first picture above, this has not been much of a problem (it can be in future). Before we see the rules, an important message.

Warning and Disclaimer

The following is to be treated as investment research based on past data unrepresentative of practical implementation and is not investment advice. They do not factor in behavioural/emotional aspects associated with investing. If you do not know how to understand a backtest result, evaluate its disadvantages, then please, please DO NOT play with your money using market timing.  Please watch this video before proceeding further.

What is meant by tactical asset allocation (TAA)?

Asset allocation is the ratio of much equity, fixed income, gold, cash etc. is present in a portfolio. We will only consider equity and fixed income in this study. Tactical asset allocation (TAA) refers to changing these allocations based on certain factors or indicators

What is market timing?

It is a technique to reduce portfolio risk and/or enhance portfolio returns by changing asset allocation based on our reading of where the market will head in the near future. This can be the stock market, bond market, gold market etc.

Is tactical asset allocation necessary?

Yes, as the risk associated with a portfolio must be systematically reduced or contained to ensure we have enough money for our future needs.

Is market timing necessary?

No. Tactical asset allocation is necessary and one need not resort to market timing to do this. TAA is possible based on a target corpus associated with a financial goal. See:

Part 1 How to reduce risk in an investment portfolio

Part 2 Do we need to time the market?

Part 3 Why we need to gradually pull out of equity investments well before we need the money!

Can we time the market?

Yes. However, realistic and reproducible market timing methods have often primarily reduced risk with or without return enhancement. See results here: Want to time the market with Nifty PE? Learn from Franklin Dynamic PE Fund and here: Is it possible to time the market?

To summarise, Can we time the market? Yes, we can. Do we need to time the market, No, there is no need to. If you do not understand this difference, please do not proceed further.

Previous parts on the tactical asset allocation series1:

1: Do we need to time the market?

2: Market Timing with Index PE Ratio: Tactical Asset Allocation Backtest Part 1

3: Market Timing With Ten Month Moving Average: Tactical Asset Allocation Backtest Part 2

4:  Tactical Asset Allocation Backtest Part 3: Short-Term Vs Long-Term

5: Buying on market dips: How effective is it?

Rules of moving average crossover market timing

1: When the 150-day average is above the 365-day average, invest systematically in equity and debt. We use Nifty 50 to represent equity and an imaginary debt instrument that gives a steady 8% a year return.

2: When the 150-day average fall below the 365-day average, exit all equity. Stop investing in equity. Move all holding to debt and invest the full monthly amount in debt.

3: When the 150-day average mover above the 365-day average., move back into equity. Only the portion that was earlier shifted to debt is moved back into equity. The systematic investment in debt continues at all times and is untouched. Let us consider an example.

In Jan 2016, the 150-day average fell below the 365-day average. The equity portfolio was worth Rs. 60,000 and debt Rs. 40,000. We sell the 60K equity holdings and moves to debt. Then we invest only in debt. Suppose the total monthly investment was Rs. 1000 and out of this Rs. 600 was supposed to be invested in equity. Now, this Rs. 600 per month is also invested in debt as long as the 150-day average is below the 365-day average.

After 12 months, the 150-day average moved above the 365-day average. Then we do three things (1) start investing Rs. 600 a month in equity and Rs. 400 in debt. (2) Recall that we have moved Rs. 60K to debt. We find out its current value, say Rs. 65K and shift it back to equity. (3) We have been investing Rs. 600 in debt for 12 months. That total amount is now worth Rs. 8000. This also is moved back into equity. If you think in terms of mutual fund units, this is a matter of simple accounting. If it is too hard for you, don’t choose this! Don’t blame the method for your mental blocks.

In this post, I have backtested this strategy for a single 18.7 year period from 2000 onwards. I will backtest this for more periods next time. The excel file had to re-written for this strategy and it is tricky to include multiple backtesting here. The tactical strategy mentioned above is compared with a systematic investment of Rs. 600 in equity and Rs. 400 in debt each month. The systematic portfolio is not rebalanced.

Amusingly and quite surprisingly in the 18Y period, one had to exit out of equity only eight times! This also means eight times moving out of debt and re-entry into equity. This will mean exit loads and tax and this has not been accounted for in this study. If one were to rebalance the systematic portfolio (as one should!), it would mean 18 exits from equity/debt!

A disclaimer before you view the result. Only one 18Y window has been tested. Taxes and load have been ignored. If include taxes/loads and test over multiple periods, the moving average crossover method is unlikely to work all the time like any other method. I will publish this study in the next few days.

Never forget that market timing is a risk reduction technique and not a return enhancement technique. It does not matter if the final return of the timing portfolio is lower than the systematic portfolio as long as timing reduces risk. I find many new investors do not seem to appreciate this. Always, always remember risk is real-time and return is in hindsight. Market timing strategies are for reducing the real-time risk. We do not know how much return they will provide in the future. Only sales people or investors brainwashed by salespeople will claim systematic investing is the best. Nothing is the best. It is only a question of what method is suited to an investors temperament

Moving average crossover 18-year study

Moving average crossover 18 year study

The maximum loss or drawdown is lowered by more than 50% using the moving average crossover and this is fantastic. It is only incidental that for this window the tactical portfolio (next XIRR 12.5%) has done better than the systematic portfolio (11.5%). Notice the regions marked by the arrows. They are smooth because, during the bear market or crash, the portfolio has no equity.

In the present backtest, the equity in the portfolio swings from 60% to 0% and there is a minimum of 40% debt at all times for safety. There are of course other ways to run the backtest. We will explore those in subsequent posts.

I believe the moving average crossover technique is fairly promising and we will know more when the rolling backtest is done. However, investor attitude towards market timing is amusing. Before they understand what exactly is the effort involved, they want to time the market After they find out about the effort, they complain it is too much work, hard to change equity allocation, have to worry about tax, have to worry about load blah blah. Well if you want something in life, you have to lose something. One will have to objectively find out if the gain outweighs the loss and in most market timing methods, an objective investor will realise that the answer is yes.


Do share if you found this useful
Share your thoughts on this topic at the  Reddit freefincal_user_forum

Reach your financial goals like a pro! Join our 1600+ Facebook Group on Portfolio Management! You can now reduce fear, doubt and uncertainty while investing for your financial goals! Sign up for our lectures on goal-based portfolio management and join our exclusive Facebook Community. The 1st lecture is free!
Want to check if the market is overvalued or undervalued? Use our market valuation tool (will work with any index!) or you buy the new Tactical Buy/Sell timing tool!
About the Author Pattabiraman editor freefincalM. Pattabiraman(PhD) is the founder, managing editor and primary author of freefincal. He is an associate professor at the Indian Institute of Technology, Madras. since Aug 2006. Connect with him via Twitter or Linkedin Pattabiraman has co-authored two print-books, You can be rich too with goal-based investing (CNBC TV18) and Gamechanger and seven other free e-books on various topics of money management. He is a patron and co-founder of “Fee-only India” an organisation to promote unbiased, commission-free investment advice. He conducts free money management sessions for corporates and associations on the basis of money management. Previous engagements include World Bank, RBI, BHEL, Asian Paints, Cognizant, Madras Atomic Power Station, Honeywell, Tamil Nadu Investors Association. For speaking engagements write to pattu [at] freefincal [dot] com
About freefincal & its content policy Freefincal is a News Media Organization dedicated to providing original analysis, reports, reviews and insights on developments in mutual funds, stocks, investing, retirement and personal finance. We do so without conflict of interest and bias. Follow us on Google News Freefincal serves more than one million readers a year (2.5 million page views) with articles based only on factual information and detailed analysis by its authors. All statements made will be verified from credible and knowledgeable sources before publication. Freefincal does not publish any kind of paid articles, promotions or PR, satire or opinions without data. All opinions presented will only be inferences backed by verifiable, reproducible evidence/data. Contact information: letters {at} freefincal {dot} com (sponsored posts or paid collaborations will not be entertained)
Connect with us on social media
Our publications

You Can Be Rich Too with Goal-Based Investing

You can be rich too with goal based investingPublished by CNBC TV18, this book is meant to help you ask the right questions, seek the right answers and since it comes with nine online calculators, you can also create custom solutions for your lifestyle! Get it now. It is also available in Kindle format.
Gamechanger: Forget Startups, Join Corporate & Still Live the Rich Life You Want Gamechanger: Forget Start-ups, Join Corporate and Still Live the Rich Life you wantThis book is meant for young earners to get their basics right from day one! It will also help you travel to exotic places at low cost! Get it or gift it to a young earner

Your Ultimate Guide to Travel

Travel-Training-Kit-Cover-new This is a deep dive analysis into vacation planning, finding cheap flights, budget accommodation, what to do when travelling, how travelling slowly is better financially and psychologically with links to the web pages and hand-holding at every step. Get the pdf for Rs 199 (instant download)
Free android apps