# Market Timing Models For A Momentum Strategy.

Everyone has an opinion about what the state of the market will be in the short term or long term, never mind that stock prices follow a random walk or the possible clash between that comes between the invisible hand of the market and the regulatory rules made by policy makers.

Returns in the market are limited based on the performance among the wide range of asset classes over a period of time. In the face of such limitations, not every investor in the market can make a high return and in most cases the average investor will manage to earn an average return before the transaction costs are factored in. An efficient market timing model is thus believed to be an means to an end of this hurdle for the investor.

In this article I will make a suggestion of a suitable quantitative model of market timing that will enable us to determine the level of market exposure our momentum strategy should have. Section 2 gives evidence of the some of the market timing models that have worked empirically over the years. Section 3 is an introduction to regime based market timing models that have been chosen for our hedge fund. Section 3.1 introduces and briefly discusses the Hidden Markov Models and Section 4 will give a conclusion to the article.

## 1. Empirical research on Market Timing Models

An economy frequently fluctuates between a steady, low-volatility state characterised by economic growth and a panic-driven, high volatility state characterised by economic contraction (Kritzman *et al*., 2012:22). This is a very important characterisation that presents a challenge for investment decisions. The first article gave an introduction to market timing models, models that will arm a portfolio with the answer to the pertinent question: what is the probability that equity markets will trend upwards, sideways, or downward in the near future?

Successful market timing requires knowing when to get out of the market, and knowing when to get back in to the market. If the portfolio manager decides to exit the market too early (or invest back too early), then chances are that they might miss potential gains from future growth. Such decisions based on model predictions have the potential to give an exceptionally high return or exceptionally low return to an actual loss in the market.

## 2. Market timing models over the years

Treynor and Mazuy (cited in Bollen & Busse, 2001:1075) came up with a test which found substantial market timing ability in 1 out of 57 funds in their sample. Henriksson (1984) used Henriksson and Merton (1981)’s market timing test and found that only 3 funds out of 116 showed significant market timing ability (Bollen & Busse, 2001:1075).

Since trading activities occur day to day and exhibit volatility as they do so, one would expect that perhaps a monthly frequency would fail to fully capture the market timing ability to influence returns. Not surprisingly, this notion was concluded in a study by Goetzmann, Ingersoll and Ivkovic (2000), and further studied by Bollen and Busse (2001:1076). Bollen and Busse (2001:1076) analysed a series of mutual fund returns at both the daily and monthly frequencies and concluded that including daily tests would result in a relatively larger number of significant estimates of timing ability, both positive and negative.

This study was later extended by Swinkels and Tjong-A-Tjoe (2007:123) who investigated the style timing ability on size, valuation and momentum. According to their results, mutual funds are indeed able to time the direction of the valuation and momentum style.

In a study by Woodward and Brooks (2010:71) the Australian wholesale and retail superannuation funds were analysed and the findings were that the simpler models by Treynor and Mazuy (1966) and Henriksson and Merton (1981) and Merton (1981) are generally more appropriate than the more complex linear/nonlinear models of market timing ability. Sometimes it happens that simple models can be fitted and can give better results than the more complex models. However their results could probably suggest that their models were not sensitive to the model risk of extending these simpler models to a set of general nonlinear alternatives.

Another method of interest is the Wyckoff Method of stock market analysis which is principally based on the law of supply and demand, the law of cause and effect, and the law of effort vs. result (Dickson & Knudsen, 2011:15).

According to the Wyckoff method, the buyer and seller have different objectives that cause supply and demand imbalances. And through the use of simple bar charts, the supply and demand relationship can be monitored. The law of cause and effect is manifested based on the fact that for a consequence to occur in the form of a change in price there must be a cause which determined the degree of an upcoming price move based on prior price action termed the cause.

Lastly, the law of effort vs. result is believed to bring volume into the analysis process because although price is usually the key component in technical analysis, the volume behind price action is just as important. Deviations between price action and volume often signal a change in the direction of a price trend (Dickson & Knudsen 2011:15).

**Figure 1: The Wyckoff Way of Market Timing**

(Source: Read the Tinker, 2010)

It is believed that using a combination of these three basic principles can result in successful market timing and the logic behind this makes sense in terms based on economic theory. For instance when demand to buy shares exceeds sell orders, ceteris paribus, the price is likely to increase until demand eventually decreases or supply increases to create a new equilibrium.

According to Wyckoff, investment should only be made in periods of price mark-up or price mark down, as shown in Figure 1 above. Periods of major accumulation/distribution are avoided altogether; therefore an investor does not need to be in the market all the time (Read the Tinker, 2010).

On the risks associated with market timing, Jeffrey (cited in Dumont de Chassart & Firer, 2004:202) developed what he called the loss/gain ratio. By using the S&P 500 and Treasury Bills from 1926 to 1982 Jeffrey demonstrated that market timers were 2.2 times more likely to underperform the index than to outperform it. In spite of this, he concluded that that the returns from successful market timing were high although the downside risk outweighed the possible gain. This conclusion was further supported by Firer, Ward and Teeuwisse (1987:19) who found a 3.2 loss/gain ratio with incorrect market timing.

Since successful market timing has proven to be possible in the past, despite its high risks, I believe that our source hedge fund with a momentum strategy would be best aided by a regime based market timing model. These models will be discussed in full in the next section of this article.

## 3. Regime based market timing

Persistent changes in system structures are a major hurdle for investment decisions, as such that they require a more adaptive strategy. These regime shifts can be caused by unexpected changes in the monetary policy, economic growth, inflation etc. As a result the regime shifts and cause different asset returns, volatilities and correlations. Recent investment literature supports the idea of regime based switching models mainly because of their flexibility in adapting to changing economic conditions.

Hamilton (1989) was the first to use regime-switching models to deal with scenarios in financial markets. He established a Markov switching AR-model to simulate the GNP of the U.S. According to Hamilton’s results, there was evidence of potential positive effects of including regime switches into the characterization of a financial time series (Erlwein-Sayer & Ruckdeschel, 2014:1). Numerous algorithms and methods for statistical inference are also applied within the model setups.

Erlwein-Sayer and Ruckdeschel (2014:1) point out a significant advantage of regime-switching models which is their flexibility to incorporate switching market conditions or rather switching behavioural aspects of market participants that cause a switch in the volatility or mean value.

Assuming that the equity market operates in a dual regime framework varying between bullish regime (low volatility and positive returns) and bearish regime (high volatility and low returns), our open source hedge fund will be directed using the Hidden Markov Model in order to determine the level of market exposure our strategy should have at any given time. If economic conditions are persistent and strongly linked to asset performance, then a dynamic asset allocation process should add value over static weights (Kritzman *et al*., 2012:22).

In his thesis, Nystrup (2014:1) develops a model that assigns more weight to the most recent observations of a portfolio so as to capture the time varying behaviour of the model. He found that by using a dynamic switching model it is possible to obtain a substantial amount of return, (in excess), with equal risk in terms of portfolio variance then a lower drawdown risk by taking advantage of the time-varying investment opportunities instead of rebalancing to static weights (Nystrup, 2014:85).

Markov switching models involve a process where at any point in time, a “state” or “regime” generates observations from a specific distribution and the regimes change overtime (Kritzman *et al*., 2012:23). The next section discusses the Hidden Markov models in more detail.

### 3.1 Hidden Markov Model

These models are used to represent probability distributions over a series of observations (Ghahramani, 2001:10). The main idea behind a Hidden Markov Model (HMM) is that the user observes a series of regime switches and assumes that these switches have been generated by a hidden (unobserved) Markov process.

The distribution that produces an observation in a Hidden Markov Model is determined by the state of an unobserved Markov chain, as pointed out before. The assumption is that the transition probabilities of the Markov chain are constant meaning that the temporary transition times are geometrically distributed. According to Nystrup (2014:27) the memory less property of the geometric distribution is not always appropriate, and another option is to use the hidden semi-Markov model (HSMM) in which the sojourn time distribution is modelled explicitly for each hidden state.

The Hidden Markov Model is explained perfectly by Ghahramani (2001:10) based on three assumptions:

- An observation at time
*t*is generated by a process whose state is hidden from the observer. - The state of this hidden process satisfies the Markov property which is: given the value of , the current state is independent of all the states prior to t – 1. Therefore the state captures all the necessary information about the history of the process in order to predict the future of the process.
- The hidden state variable is discrete.

The hidden Markov models have a probability distribution that is able to produce an observation depending on the state of an underlying and unobserved Markov process. They are thus a special kind of dependent mixture and are consequently also referred to as Markov-switching mixture models.

If the current state {}* *is identified, then the distribution of {}* *will only depend on . This then causes the autocorrelation of to be highly dependent on the persistence of {} (Nystrup, 2014:28). Therefore a hidden markov model is a state-space model with limited state space where (3.1.2a) is the state equation and (3.1.2b) is the observation equation.

A specific observation mostly arises from more than one state as the support of the conditional distributions overlaps. The unobserved state process {}* *is therefore not directly observable through the observation process {}, but can only be estimated (Nystrup, 2014:28).

**Figure 2: S&P 500 Price Index
**(Source: adapted from Federal Reserve Bank of St. Louis Economic Data 2015)

Consider Figure 2 above, which shows the averaged S&P 500 Price Index from July 2005 to July 2015. This ten year period shows non-stationarity and visible upward (consistently from 2012 onwards) and downward spikes (especially from the 2007 global financial crisis as stock prices reached their lowest in 2009).

The hidden markov model will work to show the probabilities of the hidden regimes occurring in the equity market as they switch between bull and bear markets.

To help understand how the Hidden Markov Model will work, Figure 3 gives a diagrammatic presentation of the conditional independence between the observed states and hidden states in the economy, which will allow us to time the market and predict the trends to follow.

**Figure 3: Conditional Independence network of an HMM model
**(Source: Own construction, 2015)

According to Guirdo et al. (2010:514) dynamic asset allocation strategies (like the HMM) based on time varying transition probabilities proven to outweigh simple buy and hold strategies. Table 1 below is a presentation of the results showing the effect of active asset allocation strategies in terms of mean return, the sharpe ratio and volatility.

**Table 1: Hold out period model performance**

(Source: Guirdo et al., 2010:511)

- Strategy A was the option of holding 100 per cent equity or cash depending on predicted probabilities.
- Strategy B was the option of holding proportional investments in equity and cash in line with the predicted probabilities.

The aim was to test if it possible to time the market and forecast the regime that will trend in future periods over the hold-out period 1990-2005 (Guirdo et al., 2010:511). And since a risk adjusted return is far superior, they are achieved through a reduction in the volatility of the portfolio from an all equity investment of 50.89 per cent, to 33.98 per cent in strategy A and 28.70 per cent in strategy B. In this way the switching probabilities have been successful enough to time a low volatility regime and reduce the overall risk in the portfolio.

Guirdo et al. (2010:514) also found that the most important determinants of future prices were today’s prices, and the effects of the economic information variables on the state variable were found to be marginal.

In my opinion the Hidden Markov Models do not go without limitations: which include the important fact that they still rely on observed facts in the past and current data to time the market (a skill that leaves most market timers at the mercy of the market). There are possible transaction costs that will arise with the switch between assets including the extra time to be worked by the manager and the need for the switching decisions to be made quickly so as to not miss the opportunity of a potential gain. Bauer (cited in *Bulla et al*., 2010:6) points out that a significant part of the excess returns disappear after accounting for transaction costs.

Furthermore on the practical ability of these models, it is paramount to keep in mind is that regime switching models are limited when it comes to the number of state changes. This is so because frequent rebalancing of the portfolio is likely to eat up much of the potential excess returns. Consequently out-of-sample forecasts are not always included and although this does not reduce the value of the descriptive capacities of the models, however, it limits their practical application (*Bulla et al*., 2010:4).

## 4. Conclusion

Successful market timing is still one of the most controversial skills in financial markets yet portfolio managers still attempt to time the market one complex mathematical model after the other. The notion of regime based asset allocation is still trending and proving to be a winning way towards successful market timing. With the threat of continued financial turbulence, inflation, change in policies etc, models such as the HMM will aid us market timing and asset allocation. These Hidden Markov models which allow the model parameters to capture such regime-switching dynamics have become a common practice in recent research although some could still be further enhanced.

I will end this article with a quotation from the famous market timer Richard DeMille Wyckoff:

“There are those who think they are studying the market- what all they are doing is studying what someone has said about the market…not what the market has said about itself.”

## 5. References

Bollen, N. P. B., & Busse, J. A. 2001. On the Timing Ability of Mutual Fund Managers. *The Journal of Finance*, LVI(3):1075-1094.

Bulla, J., Mergner, S., Bulla, I., Sesboue, A. & Chesneau, C. 2010. Markov-switching Asset Allocation: Do Profitable Strategies Exist? Munich Personal RePEc Archive (MPRA). [Online] Available: http://mpra.ub.uni-muenchen.de/21154/1/MPRA_paper_21154.pdf Accessed: 25 June 2015.

Daniel, K., Jagannathan, R. & Kim, S. 2012. Tail Risk in Momentum Strategy Returns. [Online] Available: http://www.columbia.edu/~kd2371/papers/unpublished/djk3.pdf Accessed:June 2015.

Dickson, R. A & Knudsen, T. L. 2012. Mastering Market Timing: Using the works of L. M Lowry and R. D Wyckoff to identify key market turning points. 1^{st} ed. New Jersey, USA: Pearson Education.

Dumont de Chassart, M & Firer, C. 2004. Risks associated with market timing under different market conditions. *Omega*, 32(2004):201-211.

Erlwein-Sayer, C. & Ruckdeschel, P. 2014. Robustification of an On-line EM Algorithm for Modelling Asset Prices Within an HMM. (*In* Mamon, R. S & Elliot, R. J. *ed*. Hidden Markov Models in Finance: Further Developments and Applications, Volume II. New York, NY: Springer. [Online] Available: http://www.springer.com/gp/book/9781489974419 Accessed: 8 July 2015.

Federal Reserve Bank of St. Louis Economic Data. 2015. S&P Dow Jones Indices LLC. [Online] Available: https://research.stlouisfed.org/fred2/series/SP500/downloaddata Accessed:7 July 2015

Firer, C., Ward, M & Teeuwisse, F. 1987. Market timing and the JSE. *The Investment Analysts Journal*, 1987:19-31.

Ghahramani, Z. 2001. An Introduction to Hidden Markov Models and Bayesian Networks. *International Journal of Pattern Recognition and Artificial Intelligence*, 15(1):9-42.

Goetzmann, W., Ingersoll, J. & Ivkovic, Z. 2000. Monthly Measurement of daily timers. *Journal of Financial and Quantitative Analysis*, 35(3):257-290.

Guido, R., Pearl, J. & Walsh, K. 2010. Market timing under multiple economic regimes. Accounting and Finance, 51(2011):501-515.

Kritzman, M., Page, S. & Turkington, D. 2012. Regime Shifts: Implications for Dynamic Strategies. *Financial Analysts Journal*, 68(3):22-39.

Nystrup, P. 2014. Regime-based Asset Allocation: Do Profitable Strategies Exist? Kongens Lyngby:Denmark. (Theses:Masters).

Read the Ticker. 2010. Richard Wyckoff Method. [Online] Available: http://www.readtheticker.com/Pages/IndLibrary.aspx?65tf=84_richard-wyckoff-method Accessed: 9 July 2015.

Shen, P. 2002. Market-timing strategies that worked. Research Division: Federal Reserve Bank of Kansas City. [Online] Available: https://www.kansascityfed.org/publicat/reswkpap/pdf/rwp02-01.pdf Accessed: 17 June 2015.

Swinkle, L & Tjong-A-Tjoe, L. 2007. Can mutual funds time investment styles? *Journal of Asset Management*, 8(2):123-132.

Woodward, G & Brooks, R. 2010. The market timing ability of Australian superannutation funds: Nonlinearities and smooth transition models. (*In* Gregoriou, G. N., Hoppe, C. & Wehn, C. S., *ed* The risk modelling evaluation handbook: Rethinking financial risk management methodologies in the global capital markets. New York: McGraw-Hill. p.59-73).

## Leave a Reply

Want to join the discussion?Feel free to contribute!