**What is Momentum Trading?**

In Physics, the term Momentum is used to define an object’s **quantity and direction of motion**. Similarly in financial markets, the **momentum** of an asset is the **direction** **and speed of price change** of the asset in the market.

Momentum trading is the strategy where you analyse assets in the **short-term** and **buy the assets whose price is rising**. Then **sell those assets** when the **price seems to have peaked**, thereby making a profit. The basic idea is that if there is enough force behind a price move, the price will continue to move in that direction.

The underlying principle for momentum trading is to **“buy high and sell higher”**, and vice-versa.

**Richard Driehaus**, a famous investor, is considered as the **Father of Momentum Investing** and his investing techniques have become the basics of Momentum Trading. Driehaus believed in **selling the losers** and **letting the winners ride** while reinvesting the money from the losers in other stocks that were beginning to show momentum.

**Benefits**

Momentum trading is a **bit different** **than** the usual **value investing** paradigm of “buying low and selling high”. Over the years momentum trading strategies have proved to be profitable in the financial markets.

In practice, momentum trading is seen to be **more popular** than “buying low and selling high”. This is because you **buy an asset which is already moving up**. You **do not have to buy** an undervalued asset **and wait for the market to reassess** that particular stock so that your investment finally turns profitable.

Another advantage of using momentum trading is that there is a **potential for high profits over a short period**. Since you are leveraging the market's volatility to your advantage, the momentum trading ultimately boils down to chasing the market performance to maximize your investment.

**How does Momentum Trading Work?**

The momentum trading strategies find opportunities in **short term asset price movement**. The assumption is that **if the price of an asset is increasing, it will continue to increase** in absence of other factors.

Think of momentum trading as a moving car. The speed is **slow** as you **start moving forward**. This is when you **identify** a stock which is increasing in price.

As the car **accelerates**, the **speed increases**. If you have identified the stock and purchased it, your i**nvestment now starts to grow**.

On seeing a **red traffic signal**, the car **decelerates** and the **speed reduces**. This is similar to when you **exit your position** at a profit **on seeing a momentum loss** in the asset price.

**Types of Momentum**

There are two types of momentum trading. Time-series momentum and cross-sectional momentum.

**Time-series momentum**is the performance of an asset compared to its own**historical performance**. Time-series momentum is identified by a certain**percentage profit threshold**, and the assets exceeding the threshold are bought.**Cross-sectional momentum**is the performance of an asset**compared relative to other assets in a portfolio**. This can be the top ten best-performing assets being bought and the bottom ten performing assets being sold.

The momentum strategies are not applied solely to equities. They can be implemented on **Futures** and the **Treasury** markets too!

**Factors Affecting the Momentum**

The short-term price change of an asset is affected by a number of factors. Some of these factors are as follows.

**Fundamental factors**: If a company posts any good or bad**fundamental news**, the stock price of that company will move in a particular direction for the next couple of days. Ideally, the market should discount this information instantaneously, but for major announcements, the**news percolation takes time**.**News events**: The momentum of an asset is also affected by certain news events. In the case of a**scheduled news**event like an**earnings announcement**, this effect is smaller since the news is expected. In case of an**unscheduled news**event like a**merger announcement**, the momentum change is greater.**Market volatility**: Market volatility is a major factor to consider when trading using momentum. Since a position is made after the asset price starts moving,**high volatility means that there is potential room for the price to increase**further so that you can make a profit.**Herding effect**: The tendency of traders to**follow the majority**is more prominent in**bearish**markets. The herding effect reduces the profit margin for momentum traders.

```
# Store the short term moving average in a new column 'window_ST'
prices.loc[:, 'window_ST'] = prices['close'].rolling(
context.short_term_window).mean()
# Store the long term moving average in a new column 'window_LT'
prices.loc[:, 'window_LT'] = prices['close'].rolling(
context.long_term_window).mean()
# Get the latest signal, 1 for golden cross, -1 for death cross
prices.loc[:, 'signal'] = np.where(
prices['window_ST'] > prices['window_LT'], 1, -1)
```

**How to Detect Momentum?**

The detection of a momentum trading opportunity is very important so that you can time your entry position in an asset. To detect momentum, you can either use technical indicators or use statistical analysis.

**Technical Indicators**: The various technical indicators to detect momentum are:**Momentum Indicator**: An oscillating indicator used to confirm the direction of the asset’s price action.**RSI Indicator**: An oscillating indicator to find whether an asset is overbought or oversold.**Moving Averages**: These are indicators to spot emerging trends in the asset price.**Breakout Indicator**: These indicators can be used to explicitly identify the breakout in price or volume.

**Statistical Analysis**: You can use statistical analysis like the Hurst Exponent test. The Hurst Exponent relates to the autocorrelation of the asset and can be used to identify if the asset is trending or not. Here you will get to know what AutoCovariance and AutoCorrelation functions are.

The various methods to detect momentum are covered with **detailed examples** in the momentum trading strategies course on Quantra.

For complex trading strategies, you can even combine signals from these indicators to obtain a more reliable momentum detection algorithm.

You can read more about Five Indicators To Build Trend-Following Strategies.

**A Simple Momentum Trading Strategy**

Let’s study a simple example of a momentum trading strategy using moving averages. Here you will see the implementation of the famous **golden cross and death cross algorithm**. This algorithm uses **two** **moving average** **lines**.

The two moving averages are the **slow-line**, or the slow-moving average with a larger lookback period, say 200. And the **fast-line**, or the fast-moving average with a smaller lookback period, say 50.

Fig 1. Golden cross and Death cross (Source: TradingView)

The golden cross is a chart pattern which indicates a bullish price trend. A golden cross occurs when the fast-line crosses the slow line in an upward direction (i.e. from below to above).

A **death cross** is indicative of a **bearish** trend. This occurs when the **fast-line crosses the slow line in a downward direction** (i.e. from above to below).

A simple strategy can be built to **long the asset when a golden cross occurs**, and **short it when a death cross occurs**.

The Python logic for finding signals using the moving averages is as follows.

The strategy returns since 2015 are as follows.

Fig 2. Strategy Performance for long-short strategy

The momentum strategy **outperforms the benchmark**. The strategy performance can further be improved by **implementing proper risk management techniques and fine-tuning of the parameters**.

It is interesting to note that the **long-only strategy** implementation (entering position only on a golden cross) is far **more profitable** than the strategy where short positions are taken on death cross. The long-only strategy returns are shown below.

Fig 3. Strategy Performance for long-only strategy

**Risks Involved in Momentum Trading**

Like all trading strategies, momentum trading is not without risks. Some of the risk factors to be careful are listed below.

**Timing of entry and exit**: The momentum trading strategies are extremely**time-critical**. If the entry position is taken too late, the investment might turn out to be a loss-making one. Similarly, if the slowdown of momentum is incorrectly identified and a position is exited too soon, you lose out on potential gains even after identifying the opportunity.**High transaction cost**: Since this type of strategy identifies short term opportunities, the**number of overall trades**can be**high**when**compared to the long term value investing**or buy and hold strategies. This leads to a greater transaction cost.**Time-consuming**: The trader has to**monitor the opportunities closely**and needs to be updated with all relevant news for the asset being traded.**Market****sentiment**:**Empirically**it is seen that momentum trading**works best in bullish markets**. This is because of the human psyche to**herd together in adverse conditions**(bear market). The herding results in a decrease in profit per trader for the same trading opportunity. This effect is also clearly**seen in the two strategy results above**.**Trend-reversal**: The momentum strategy assumes the trend will continue in the same direction. Sometimes however the trend reverses and this strategy fails.

Adequate **risk management** **techniques need to be implemented** when you trade the momentum trading strategy in live markets. Proper position sizing and trailing stop-loss can be used to reduce the strategy drawdowns and limit your market exposure.