• Discounts and special offers
  • Subscriber-only articles and interviews
  • Breaking news and trending topics

Already a subscriber?

By signing up, you accept Moneywise's Terms of Use, Subscription Agreement, and Privacy Policy.

Not interested ?

The short version

  • Backtesting helps investors analyze and repeat past successes while eliminating factors that contribute to past failures.
  • Typically, investors backtest with specialized backtesting software or consult with a backtesting programmer.
  • Metrics that investors backtest for include: Volatility, averages, net profit or loss, risk-adjusted returns and more.
  • Understanding certain caveats of the market and investor habits—like confirmation bias, changing market conditions and more—helps investors refine and improve their strategies over time.

More: Technical analysis vs. fundamental analysis

Elevate Your Investments with Moby

Gain a competitive edge with Moby's expert investing insights. Our data-driven analysis and personalized recommendations empower you to make smarter investment decisions. Enhance your portfolio and stay ahead of market trends. Start your journey to financial success today at Moby.

Get Started

What is backtesting?

Backtesting allows traders to simulate hypothetical trades against historical data in order to test and hone their trading strategy. The goal of backtesting is to estimate the relative performance of a strategy or model had it been used in the past.

In theory, backtesting allows traders to repeat past successful trades (assuming market conditions remain consistent), while calibrating or eliminating those that have failed. Therefore, any trading strategy that is quantifiable and executable can be a potential candidate for backtesting.

How does backtesting work?

When an investor has a trading idea that they want to backtest, they typically use backtesting software or consult with a qualified programmer to transform that idea into something testable through code.

The metrics that are common in backtesting include:

  • Volatility measures
  • Various averages
  • Net profit or loss
  • Exposures
  • Ratios
  • Annualized return
  • Risk-adjusted returns.

Users should be able to run a backtest across various datasets. This allows the trader to input new user-defined variables against different backtesting measures, tweaking them to find an optimized strategy.

For programmers, it's important to speak the trading platform's proprietary language. The programmer will code a simulation that factors in historical data from various financial instruments (stocks, bonds, etc.) and user-defined inputs.

Luckily, there are plenty of software programs out there that eliminate the need of finding an independent programmer to help you with backtesting.

Grow Your Wealth with Worthy Bonds

Invest confidently with Worthy Bonds and earn a solid 5% return. Our secure, transparent platform makes it easy to grow your savings while supporting American businesses. Join thousands of smart investors who are already reaping the benefits. Start investing today at Worthy Bonds.

Invest Now

Tips for effective backtesting

Backtesting can be a highly effective method for fleshing out your financial theories and testing your trading strategies. But remember — humans design backtests. That means they're susceptible to psychological biases. Here's how to maximize the benefits of backtesting while minimizing the risks.

1. Remember that correlation doesn’t equal causation

The price of a stock and the price of a cryptocurrency might increase and fall at the same time. But that doesn’t necessary mean that the two assets are correlated. Beware of devising rules that “work,” but don’t make common sense.

2. Practice continuity in testing

The stock market is in constant flux. Everything is always moving and changing from week to week and day to day. As time moves forward, new data will emerge. You’ll have to continuously test your old hypotheses and form new ones.

3. Identify your key metrics

The more relevant perspective you have on a particular hypothesis, the better you can analyze it. Try to identify a number of indicators and metrics that will give you a well-rounded perspective.

4. Be adaptable

Sometimes your backtesting results will reveal that something is amiss with your current trading strategy. Alternatively, incoming events can make previously successful rules moot. Sometimes winning strategies become obsolete and it is important to know when to adapt.

5. Consider all trading costs

Be sure that your backtesting software has accounted for all trading commissions and fees. Some may seem insignificant, but they can add up over time and affect the results of your hypothesis.

If you're only trading stocks and ETFs with one of the top discount brokers, you may have little to no trade costs. However, most options traders will still have per contract fees that need to be considered. And virtually all crypto traders will have costs as well, even if they're only incurred indirectly through a spread.

6. Beware of confirmation vias

We live beneath a constant avalanche of data. The downside of this is that we can typically find the data to support just about any idea we concoct. Make sure that you are as inclusive as possible of all possible scenarios, not just scenarios that support your thesis.

More: How to avoid emotional investing

Backtesting alternatives

As noted earlier, adaptability and an abundance of information go a long way towards improving the accuracy of your results and the success of your strategy. With this in mind, here are a few alternatives to backtesting that are worth considering.

Forward performances testing

Also known as paper trading, forward performance testing allows traders to simulate real time trading in a live market. This way a trader can test a strategy against current conditions without risking any capital. For this type of testing to be accurate, you must strictly follow your system’s logic and not deviate.

More: Paper trading: experience investing without any actual risk

Scenario analysis

Scenario analysis uses hypothetical data rather than historical real data to test a hypothesis. For example, you can simulate what specific changes would follow a change in interest rates. It’s also a solid way to estimate changes in a portfolio’s value against sudden events, or prepare for unfavorable conditions.

Top backtesting tools

Luckily, there are more tools to help traders with backtesting than ever before. Below is a list of some of the best backtesting software you can find for analyzing trade ideas.

Backtesting tools Best for
TradingVies Getting started for free
TradeIdeas Fully automated features
TrendSpider Beginners
MetaStock Extra features beyond backtesting
NinjaTrader Futures traders

TradingView — With over 200 million monthly visits, TradingView is one of the most well known trading communities in the world. Users love that many of its features are accessible for free. However, access to more sophisticated strategies will cost extra. Read our full review of TradingView here.

TradeIdeas — TradeIdeas offers automation tools that allow users to test specific trade ideas under novel conditions. But you'll need to purchase a premium subscription if you want to access its OddsMaker backtesting functionality. TradeIdeas has an excellent event-based backtesting of stock alerts. No programming skills needed.

TrendSpider — TrendSpider's backtesting features are based on a highly visual interface without sacrificing capabilities. TrendSpider has over 20 years of historical data on their daily time frame, plus intraday data. Results are represented in charts which makes it easy for users to identify top and bottom performers.

MetaStock — MetaStock combines advanced scanning, backtesting, and forecasting features. It enables users to backtest strategies on a single instrument and entire markets. Backtesting results are relatively easy-to-comprehend due to their visual nature.

NinjaTrader — NinjaTrader is based on the C# programming language. This software has excellent functionality and an extensive collection of historical feeds, thousands of third-party apps, and add-ons.

Bottom line

Knowledge is power and this holds especially true in the trading world. The great news is that there are many existing tools out there today to help you gain knowledge through backtesting.

Although trading in the market can feel a bit like rolling the dice for many, diligently analyzing data can help to improve your odds. For more ideas on finding the right strategy for you, read our roundup of the best investment strategies.

Disclaimer: The content presented is for informational purposes only and does not constitute financial, investment, tax, legal, or professional advice. If any securities were mentioned in the content, the author may hold positions in the mentioned securities. The content is provided ‘as is’ without any representations or warranties, express or implied.


Follow These Steps Once Your Portfolio Reaches $100K

If you've amassed a $100k+ portfolio, it's time to meet with a trusted advisor.Zoe Financial's elite network of fiduciary advisors offers personalized strategies to enhance your financial success. Experience exclusive investment opportunities and bespoke wealth management services. Trust Zoe Financial for unparalleled expertise and a commitment to your prosperity.

Jay Wu, CFA Freelance Contributor

Jay Wu is a freelance contributor for Moneywise.


The content provided on Moneywise is information to help users become financially literate. It is neither tax nor legal advice, is not intended to be relied upon as a forecast, research or investment advice, and is not a recommendation, offer or solicitation to buy or sell any securities or to adopt any investment strategy. Tax, investment and all other decisions should be made, as appropriate, only with guidance from a qualified professional. We make no representation or warranty of any kind, either express or implied, with respect to the data provided, the timeliness thereof, the results to be obtained by the use thereof or any other matter.