What is 'Backtesting'

Backtesting is the process of testing a trading strategy on relevant historical data to ensure its viability before the trader risks any actual capital. A trader can simulate the trading of a strategy over an appropriate period of time and analyze the results for the levels of profitability and risk.

BREAKING DOWN 'Backtesting'

If the results meet the necessary criteria that are acceptable to the trader, the strategy can then be implemented with some degree of confidence that it will result in profits. If the results are less favorable, the strategy can be modified, adjusted and optimized to achieve the desired results, or it can be completely scrapped.

A significant amount of the volume traded in today’s financial market is done by traders that use some sort of computer automation. This is especially true for trading strategies based on technical analysis. Backtesting is an integral part of developing an automated trading system.

Meaningful Backtesting

When done correctly, backtesting can be an invaluable tool for making decisions on whether to utilize a trading strategy. The sample time period on which a backtest is performed on is critical. The duration of the sample time period should be long enough to include periods of varying market conditions including uptrends, downtrends and range-bound trading. Performing a test on only one type of market condition may yield unique results that may not function well in other market conditions, which may lead to false conclusions.

The sample size in the number of trades in the test results is also crucial. If the sample number of trades is too small, the test may not be statistically significant. A sample with too many trades over too long a period may produce optimized results in which an overwhelming number of winning trades coalesce around a specific market condition or trend that is favorable for the strategy. This may also cause a trader to draw misleading conclusions.

Keeping it Real

A backtest should reflect reality to the best extent possible. Trading costs that may otherwise be considered to be negligible by traders when analyzed individually may have a significant impact when the aggregate cost is calculated over the entire backtesting period. These costs include commissions, spreads and slippage, and they could determine the difference between whether a trading strategy is profitable or not. Most backtesting software packages include methods to account for these costs.

Perhaps the most important metric associated with backtesting is the strategy’s level of robustness. This is accomplished by comparing the results of an optimized back test in a specific sample time period (referred to as in-sample) with the results of a backtest with the same strategy and settings in a different sample time period (referred to as out-of-sample). If the results are similarly profitable, then the strategy can be deemed to be valid and robust, and it is ready to be implemented in real-time markets. If the strategy fails in out-of-sample comparisons, then the strategy needs further development, or it should be abandoned altogether.

RELATED TERMS
  1. Optimization

    In the context of technical analysis, it is the process of adjusting ...
  2. Mechanical Investing

    Buying and selling stocks according to a screen based on predetermined ...
  3. Sample

    A subset containing the characteristics of a larger population. ...
  4. Sampling

    A process used in statistical analysis in which a predetermined ...
  5. Universe Of Securities

    A set of securities that shares a common feature such as the ...
  6. Sample Selection Bias

    A type of bias caused by choosing non-random data for statistical ...
Related Articles
  1. Trading

    Backtesting: Interpreting The Past

    We offer some tips on this process that can help refine your current trading strategies.
  2. Trading

    Backtesting And Forward Testing: The Importance Of Correlation

    Correlations between backtesting and forward performance testing results can help you optimize your trading system.
  3. Trading

    Using Technical Indicators To Develop Trading Strategies

    Unfortunately, there is no perfect investment strategy that will guarantee success, but you can find the indicators and strategies that will work best for your position.
  4. Trading

    Create Your Own Trading Strategies

    Do-it-yourself trading can be very rewarding - both psychologically and for your wallet.
  5. Personal Finance

    A Day In The Life Of A System Trader

    Systems traders divide their time between trading, developing, backtesting, optimizing and forward testing, to create viable and high-probability trading systems.
  6. Trading

    The Pros And Cons Of Automated Trading Systems

    Automated trading systems minimize emotions, allow for faster order entry, lead to greater consistency and resolve pilot-error problems.
  7. Trading

    Bad Luck With Trades? 5 Things You Might Be Doing Wrong

    If you're in a trading rut, ask yourself these five questions to help turn the corner.
  8. Investing

    Are All Smart Beta Strategies Really Smart? (PKW, SPYB)

    Explore the methodologies used by smart beta funds and the reasons their strategies for stock selection may not be all that smart.
  9. Trading

    Top 10 Rules For Successful Trading

    Whether you're a novice or an expert, these 10 rules should be the backbone of your trading career.
RELATED FAQS
  1. What percentage of the population do you need in a representative sample?

    Learn about representative samples and how they are used in conjunction with other strategies to create useful data with ... Read Answer >>
  2. How can a representative sample lead to sampling bias?

    Learn how using representative samples alone is not enough to make sampling bias negligible and why elements such as randomization ... Read Answer >>
  3. What is backtesting in Value at Risk (VaR)?

    Learn about the value at risk of a portfolio and how backtesting is used to measure the accuracy of value at risk calculations. Read Answer >>
  4. What's the difference between a representative sample and a convenience sample?

    Learn the difference between convenience sampling and representative sampling and the advantages and disadvantages of each ... Read Answer >>
  5. What are the benefits of financial sampling?

    Learn more about how financial sampling is used to determine whether or not inaccurate or fraudulent information exists in ... Read Answer >>
  6. What is the difference between systematic sampling and cluster sampling?

    Learn about the differences between systematic sampling and cluster sampling, including how the samples are created for each ... Read Answer >>
Hot Definitions
  1. Cover Letter

    A written document submitted with a job application explaining the applicant's credentials and interest in the open position. ...
  2. 403(b) Plan

    A retirement plan for certain employees of public schools, tax-exempt organizations and certain ministers. Generally, retirement ...
  3. Master Of Business Administration - MBA

    A graduate degree achieved at a university or college that provides theoretical and practical training to help graduates ...
  4. Liquidity Event

    An event that allows initial investors in a company to cash out some or all of their ownership shares and is considered an ...
  5. Job Market

    A market in which employers search for employees and employees search for jobs. The job market is not a physical place as ...
  6. Yuppie

    Yuppie is a slang term denoting the market segment of young urban professionals. A yuppie is often characterized by youth, ...
Trading Center