Last Updated on 13 July, 2021 by Samuelsson

Many trading strategies and systems are optimized on a lookback horizon, which can be different for different strategies, so we thought it would be interesting to take a look at the evolution of what is considered optimal lookback period. But what exactly is a lookback period in trading?

**In trading, a lookback period is the number of periods of historical data used for observation and calculation. It is how far into the past a system looks when trying to calculate the variable under review. The concept is based on the premise that history can tell about the future but only when you lock back far enough ****— not more or less!**

The idea of a lookback is used in different aspects of life, and even in the financial trading world, it can be used in various ways. Surely, you will like to know more about the concept, which is why, in this post, we will cover the following:

- What a lookback is
- What lookback period means in trading
- The importance of using the right lookback period in trading
- How to measure the momentum of a stock
- What you should know about the optimal lookback period
- What you should know about the best lookback period

**What is a lookback?**

According to the Cambridge dictionary, the term “look back” expresses the idea of thinking about something that happened in the past. It can also mean “to think about the past and evaluate the events that happened during that period. How far into the past your “lookback period.” The concept is used in many different ways to describe or express various ideas.

In the business world, for example, the concept of a lookback period is used to express the timeframe which tax authorities use to investigate whether a company pays the employment tax or not, as tax is levied on the accurate depositing schedule. In other words, it is the length of time the IRS (in the case of a U.S. entity) can use to assure your previous tax filings have been correct. Businesses can apply to different types of filings, which can vary in length, and that length of time is referred to as the lookback period in this case.

**What is a lookback period in trading?**

When it comes to the world of financial trading, the concept of the lookback period is not about tax fillings. It is used to describe a completely different concept; however, it is still based on the idea of going through the past. However, even in financial trading, the concept is used differently in different situations. In options trading, which we won’t delve into in this post, the concept expresses a time duration when an offering is still in effect. In this post, we will focus on the aspects that relate to trading systems and backtesting.

To understand what a lookback period means in trading, you need to ask yourself this question: What is a period in trading? Well, in financial trading, a period refers to the time duration of a given trading session. For example, a period of one week means a full week trading session or five trading days. A three-month period means 13 trading weeks or 63 trading days.

In this post, we will discuss the lookback period as it relates to the following:

- Setting technical indicators and developing a trading strategy
- The length of historical data for backtesting a trading strategy/system

**Lookback period with reference to developing a trading strategy**

In trading, the primary area where a lookback period is applied is in the settings of a technical indicator. It is also applied in price action trading where a price action pattern is expected to occur within a certain period to qualify for the signal it is meant to indicate — for example, you hear of a 20-day high or low, as in the famous Turtle strategy.

As you know, a technical indicator is a mathematical calculation using historical market data (price, volume, or a combination of both) to better show the behavior of the price and aid the analysis of price movement. But the indicator can only serve the purpose you want it if you get the lookback period right. Here, what we mean is that setting parameter that determines how much historical data it uses in its calculation.

For example, in the RSI indicator, you can set the period as 14 days (the default setting) or even 2 days. The period you choose can determine what the indicator tells you, which, in turn, determines the strategy you can formulate with the indicator. A 14-day period RSI tells you about price momentum, so you can effectively use it to create a momentum strategy. On the other hand, a 2-day RSI can be used to create a mean-reversion strategy.

Similarly, the moving average indicator can be set to different periods, and the period you use can determine how the indicator behaves. Moving averages primarily tell you about the prevailing trend, so the period you set it to can determine the type of trend it indicates — short-term, medium-term, or long-term trend. If you set the period at 200 days, for example, it tells you about the state of the market in nine and half months — that’s pretty long term. Apart from the trend, a 200-period moving average can also indicate potential resistance and support levels. A 10-day moving average, on the other hand, will only show the short-term trend.

Apart from the indicators, the lookback period also matters for certain price action patterns. For example, a 5-day high or low doesn’t have the same significance as a 2o-day high or low, and a 20-day high/low doesn’t have the same significance as a 52-week high/low.

Ultimately, the significance of the concept of the lookback period in trading is in creating a trading strategy and automated trading algorithm based on the strategy. The lookback period of the component indicators and price action patterns that make up the strategy determines how the strategy is traded and how often it can generate trading signals. As a matter of fact, your trading style plays a role in what you consider the optimal lookback period for your strategy.

To put it differently, we can even say that your strategy determines the lookback period you set for the indicators that make up your trading system. The lookback period for momentum (trend-following) strategies is often longer than the lookback period for mean-reversion strategies. For example, if you set the lookback period of the RSI as 14 days, you are probably planning to create a momentum strategy with it. If you want to use it for a mean-reversion strategy, you will have to set the lookback period at 2 days or thereabout.

**Lookback period with reference to backtesting a strategy**

Another aspect where the lookback period is very important in trading is backtesting your trading strategy. Here, the concept means how far into the past you want to backtest the strategy to check its performance. It is the number of years into the past you want to get to in checking how well your system fares. Your lookback period will determine the amount of historical price data you will need for your backtesting.

Thus, if you want to use a 10-year lookback period in backtesting your system today, you will need to get the market data from March 2011, and if you want to use a 20-year lookback period, you will have to get market data from March 2001. Generally, the longer the lookback period, the better because a longer period covers more periods with different market conditions.

A longer lookback period covers economic and market cycles, so a system that performs well over such a long duration is more likely to be robust. However, market tendencies do change over time such that a system that doesn’t perform well before the millennium can do wonderfully well in the last decade and the present one. The key is knowing the optimal lookback period you can use when backtesting your system.

**The importance of using the right lookback period in trading**

While we considered the two main aspects of the lookback period in trading, in the subsequent discussions, we will focus on the aspect that is concerned with creating a trading strategy. So, why is it important to use the right lookback period when creating and testing your strategies?

Well, the answer is that the lookback period determines how much data you are using in your calculation, which is what determines the performance of the strategy. For example, if you want to create a momentum strategy algorithm, you will have to experiment to find the right lookback period for momentum factor calculation. Some quants use a 12-month momentum method where they measure the momentum over a 12-month period. In this case, the lookback period is 12 months. Another set may decide to use a 6-month or even 3-month period in creating their strategies if they wish to target such lower trends and feel that those perform better.

Furthermore, knowing the right lookback period for your strategy saves you time. You won’t have to keep experimenting with different periods to find the one that works. Unfortunately, however, the best way to find the most suitable lookback period is by experimenting with various periods and testing their performance.

**How to measure the momentum of a stock**

When employing a momentum trading strategy, traders usually consider two main forms of momentum: absolute momentum and relative momentum. When employing an absolute momentum strategy, the trader compares the price of the stock against its historical performance. He buys when the momentum is positive and sells when the momentum is negative.

A relative momentum strategy, on the other hand, focuses on comparing the performance of one stock to that of another stock in the same or a different sector, with the aim to buy the one with a higher rate of momentum. For example, let’s say that you own shares in Company A with a 12-month return of 10% and shares in Company B with a 12-month return of 35%. With a relative momentum strategy, you would increase their shares in Company B and decrease their shares in Company A.

Whatever the form of momentum, there are different ways traders measure the momentum of a stock. Here are some of them:

**3-month momentum**: A 3-month momentum approach check the momentum of the stock over a 3-month lookback period. This may be done by comparing the price of the stock now to what it was 3 months ago or checking the position of the stock relative to its 63-day moving average.**6-month momentum**: Here, the lookback period is 6 months or 126 trading days. The momentum can be done by comparing the price of the stock to what it was 6 months ago. You can also check the position of the stock relative to the 126-day moving average.**12-month momentum**: In this case, the lookback period is 12 months.**12-1 momentum calculation**: This is a ratio that shows you the return of a share price over the past year but excluding the last month. Price Index 12m Minus 1m = Share price 1 month ago / Share price 12 months ago.**12-2 momentum strategy**: In this ratio, the most recent 2 months are excluded from the index.

**What is the optimal lookback period?**

The optimal lookback period varies with strategy. For a momentum strategy, academic studies indicated that a lookback period of 12 months, on average, performed very well, but experience has shown that, in recent years, the 12-month lookback period performed very poorly a 3-month or 6-month lookback period.

In fact, evidence suggests that from 1988 to 2008, the optimal lookback period for a momentum strategy for a portfolio of equities and bond funds was 12 months; however, from 2008 to 2019, the same equity-bond fund portfolio performed better with a 3-month or 6-month lookback period.

**What is the best lookback period?**

There is no best lookback period; it all depends on the strategy you are using. The right lookback period for a momentum strategy wouldn’t make sense for a mean-reversion strategy or a breakout system. Aim to find the best lookback period for your strategy by experimenting with different periods. However, for a momentum strategy, a lookback period of 3 to 6 months seems to perform better than 12 months in recent times.