There are plenty of securities investment strategies that we can choose from. The Momentum Strategy would be the one coincides well with our intuition. In essence, the basic idea behind the Momentum Strategy is that once a trend is established, it is more likely to continue in that direction than to move against the trend. This strategy looks to capture gains by riding “hot” stocks and selling “cold” ones. But the interesting thing here is that this strategy actually has nothing to do with the fundamentals that I have used and explained a lot before. Instead, it has very close relationship with human propensity to extrapolate the flimsiest trends into the future.
In other words, the behavior of this strategy is related to positive feedback cycle and is in contrast to mean-reversion strategies, which rely on trends reversing direction.
Let’s begin with finding a stock which may have obvious momentum behavior. I have tried several various stocks and finally I found that the price series of ‘WWAV’ shows a distinct momentum behavior over the timeframe from 2014–06–17 t0 2015–06–17. You can see from the blue line in the graph which represents the price series of ‘WWAV’ over this time period. As for the red line which is the trend line of the price series over this timeframe. The red line is the linear regression line that I generated based on the dataset of its prices. From the trend of the line, we can tell that the trend of prices (‘WWAV’) over this time period is upward.
But we can find that the price series of the asset are very volatile and fluctuate around the trendline. The hypothesis here is that the motion of the stock is based on some upwards trend, captured by the linear model, plus some random noise. Also, we assume that this hypothesis(upward trend) will be linear and keep moving upward over time. In order to test our hypothesis, we need to check the trend of out-of-sample prices as well as the volatilities of the prices.
Not surprisingly, the out-of-sample data just proved that our hypothesis is wrong about the future. So it is even more important for us to identify and examine whether the momentum behavior is valid or not for the data set and how long will it be predictive. As for the specific methods, I will illustrate them as below.
Actually, the momentum behavior implies there is an auto-correlation within the data itself. It is also a very common phenomenon and many elements in finance are autocorrelated such as prices. Because prices of the assets depend on the amount that trader is willing to pay for the asset. In terms of this amount, it actually depends on the value in the T-1 period of the asset plus some random noise and other information except the prices from the past that trader has.
First of all, I would like to introduce the formula about the prices of T period:
Where X covers all the other factors traders consider and ϵ is random noise. This is the definition of an autocorrelated series, in which the value at time t depends on previous values.
However, here is one thing I want to point out that some forms of autocorrelation will not exhibit momentum behavior such as certain trends as the distributions as follows.
I just generate a bunch of autocorrelated series based on the definition of the autocorrelation which you can also see from the formula above. I assume the value of X in period i is based on the value of X in the period (i-1) plus some random noises(which follow the normal distribution with mean = 0 and stdev.= 1).
These series will not display momentum behavior, as the amount they go up and down each timestep is purely random, which means even though the value in period T depends on the value of the previous period. It has nothing to do with its motion. The motion is purely random since the noises are random.
However, if the series’s returns are autocorrelated, then we will see momentum behavior. We can simulate this as follows:
Whenever you think of investment strategy, you care about the motion instead of the value itself especially when you are about to hold the asset for a long-term period.
It also explains the reason why we usually use returns instead of value to measure or design our strategy. In short, if the past returns are negative then based on the momentum behavior theory the value of the next period probably will go down. That is why we compute the past returns first here and add it into the formula in order to capture the value of X for period i. Based on the theory, we can also find that: once the trend begins it tends to stay.
The picture below is an accident happened when I typed in the code. I would like to share this with you because it generates a very interesting graph. As for the problem, I find that I accidently included ‘return’ into the ‘for’ loop(then the loop will actually terminate once it ‘sees’ return instead of keeping looping and that is why you can see the trend of each series stop moving forward) when I double checked my code.
Since we knew that the momentum behavior implies the auto-correlation, the next question would be how do we identify the behavior mathematically or how do I test if the model works for our dataset?
Here I will use unit root to test the autocorrelation. If the series has a unit root, we should consider that there is autocorrelation present. As for the Python code for conducting the unit root is as below:
From the remarks, I added behind each variable(X1, X2), you can see that X1 is the series which contains autocorrelation and X2 are the series following the normal distribution(implies that it does not have autocorrelation). We can see very clearly from the outputs which comply with our expectations.
I want to also talk a little about why it is so important for us to test autocorrelation first before conducting any statistic tests on the data set. If the datasets are autocorrelated, any test results even including standard deviation are no longer valid.
The next topic I want to bring up here is to compare the mean-reversion and momentum strategy since they tend to be two opposite strategies, but they are both very popular investment strategies.
As for mean-reversion strategy, the general mechanism behind the strategy is that a moving average of share price represents the accumulation of fair market value of a specific stock’s value. While the day to day fluctuation in the price is more a reflection of the market sentiment, Thus, whenever that sentiment drives share price too far from its average, the efficiencies of the market forces will drive the price reverting back to its mean in the short order. Therefore, if the prices of the stock are doing well than I expected, I should expect they are going to fall in the future.
However, momentum strategies are betting on the trend will continue instead of reverting to the mean as I explained before.
But actually, most price series are not really mean reverting but are geometric random walks if you test them. The returns, not the prices, are the ones that usually randomly distribute around a mean of 0. If the price series are found to be mean reverting, we will call these price series<a href = https://en.wikipedia.org/wiki/Stationary_process target="_blank"> stationary. Even though it is hard to find a price series that are stationary. Fortunately, we can manufacture many more mean-reverting price series by combining two or more individual price series into the portfolio whose mean market value is mean reverting. Those price series that can be combined this are called cointegrating that I explained in my previous article about pair trading.
For momentum strategy, different assets over different timeframes behave differently like the ‘WWAV’ out-of- sample prices series compared to its in-sample series. In consideration of the high volatility of momentum strategy, it is better for us to select other assets to balance the volatility and autocorrelation in order to increase the sharpe ratio for your algo.
Also, it is important to define your timeframe for the strategy. Momentum behavior and mean-reversion behavior can both occur in the same asset within certain time period. Take ‘WWAV’ for example, we can see a(also from the graph below) trend upwards, but there is also movement around the trend. Thus, one approach could be buying and holding WWAV and attempting to make money on the longer timeframe. Or anther approach could be to buy WWAV whenever it went under the trendline and sell it whenever it was above. This strategy would also work on shorter timeframes.
The conclusion about mean-reversion strategy is that: it can be effective for a short-term period because we can model the trend plus some random noises and since the noises are random whenever it below the trendline that is just the random chance and it will go back eventually and vice versa. We can also test the mean-reversion theory by checking the difference between the asset and the prediction(the step shows as below). It looks like some good opportunities for mean-reversion as the price difference across the zero line many times.
I want to emphasize here about the importance of time frame for predictive capacity for momentum strategies. Each momentum measure will be predictive over different time horizon(some over years, and the others over days). That will also be true of different asset classes. To keep in mind to test what timeframe makes sense when constructing a momentum model. The timeframe that you decided to use should also be roughly the time frame on which you rebalance/exit the trade. I will explain more details about how to measure momentum strategy in my next article.
Here is one more thing that I want to mention here. The more models/strategies that you learned the harder for you to choose under various circumstance. It is very important to remember not to throw a ton of models on the data and try to identify which one sticks the best. By keeping doing this, you accidently increase your risk exposure to the overfitting issue. The model you choose in the end might fit well for the historical data but might not have any predictive power.
I will show you one example about the right steps that we should follow if you decide to choose momentum strategy:
Here are some opinions that I collected about Momentum Strategies and share here with you(for better understanding and improvement):
- Many researchers and investment managers have believed that profitable yields from such momentum-based strategies are largely the result of market inefficiencies or irrational investor behavior.
- Moreover, it seems like momentum investing works great over the long term but can suffer from short term reversals that are painful to live through.
- Momentum involves finding stocks that are the strongest and are the likeliest to trade higher. In a bear market, that means buying the ones that dropped the least. When they start to lose momentum, you get out of the position. Where value investors buy low and sell high, momentum investors buy high and sell higher.
- The research indicates that the success of momentum strategies is not about market inefficiency and low risk — but appears to be tied directly to specific attributes of a company that affects the way its risk varies over time.”
- You may think that value and momentum are polar opposites, but they work remarkably well together. Think of the combination as cheap stocks that the market is just beginning to notice. The combination of the two factors yields results more impressive than either of the two investing styles on their own. (Note: for value, I’ll use the simplest measure possible to make the point: price/earnings)
I hope you enjoy the content of the article and please feel free to leave your comment on anything you find is inefficient here. Thank you!
- Quantopian: Momentum Strategies