Analytical financial theories and trading strategies can be “backtested” by applying them to historical data. Backtesting is to simulate what it would have been like to use a certain strategy or indicator in the past.
Because markets are more complicated than a simple algorithm, such as an assumed future rate of return, it is preferable and somewhat more dramatic to use actual historical data for testing. There is an abundance of historical market data available to those who would like to use it for backtesting a theory, strategy, or indicator.
Some of the more detailed market data, or some types of investments, may only be available for backtesting for a certain number of years. In such instances, an analyst may substitute a similar variable, or attempt to create one from scratch using certain relevant data, or use the available data and attempt to infer a future behavior, all of which is only necessary if a certain length of time is important to the test.
As with any experimentation and statistical analysis, biases may creep into the data due to a lack of diligence or a lack of oversight. As the old saying popularized by Mark Twain implies, statistics are often close cousins of lies.
And as the ever-popular industry disclaimer says: historical results are not an indication of future returns. Many theories and strategies that held up to backtesting when they were created have failed to repeat that performance since.