Backtesting is the process of applying your trading strategy to historical data. It lets traders simulate how they’d have done in the past without requiring any real-life capital. Good backtesting results often lead to good results in the present, which makes this an important tool in any crypto trader’s arsenal.
In this article, we’ll explain how you can backtest any strategy using free tools. We’ll also explain the rationale behind backtesting, and give you some tips on making the most of past data.
3 key backtesting questions
John Bogle is the founder of The Vanguard Group: the world’s largest mutual fund group (which created the first index fund). Although the company he founded trades securities, their approach to backtesting features 3 questions that work well with crypto strategies:
What do these questions mean?
Well, first of all, you should always be testing an idea. It doesn’t matter what the idea or hypothesis is, but you need some kind of rationale for each and every backtesting experiment.
This rationale needs to be defined in specific, measurable terms, e.g. “stocks go up in price if indicators show them as undertraded for 3+ time periods”. This way, you can find out if your ideas are true or not — which is the whole idea behind backtesting.
Once you have a hypothesis, you need to find past results to test it on. As a crypto trader, this can mean using recent data from specific crypto asset pairs (amongst other things). What matters is that the data used gives you an idea of what may happen when you apply a strategy in real life.
If you answer the first two questions correctly, you will end up with backtesting results that either prove or disprove your hypothesis. This lets you refine your strategy over time by showing you which of your ideas would have been profitable in the past.
Manual vs automatic backtesting
There are two ways to backtest.
The first is to use a script to automatically run your backtest. In the future, Adara will make it easy to create widgets, letting anyone who has coding experience do this easily. Until then, you can always create a standalone app to backtest data outside Adara.
Your second option is to backtest manually using a spreadsheet app like Excel or other tools. For example, TradingView makes manual backtesting easy, although the data you can use is limited for most pairs.
Your exact steps will change depending on which option you go with. With TradingView or Adara, you can use charts with past prices to visually find setups that you’d like to test for with your trading strategy. You can then use indicators, trend lines, and other tools to see what would happen. What matters is keeping future prices hidden to avoid bias.
Things work differently with Excel. There, you first have to get the data and check it for authenticity. You can do this with a number of data sources, including some free ones like Yahoo! Finance. Then you can create your own indicators using Excel formulas if you want to use calculations in addition to raw chart data.
At this point, it’s time for you to create your own trading rule. This rule can apply to a signal, an entry or exit point, etc. The point is that you need to test it.
The simplest way to test with Excel is to take a starting cash value of $1,000, $10,000, or another even number. Then, you apply the rule you set earlier to this money and see what happens. This will let you see if a rule is profitable, ineffective, or neutral.
Key tips for effective backtesting
As you can see, backtesting isn’t difficult. It helps to see the process in action — something you can do which you can do by watching our Adara Academy lessons on the subject — but this isn’t rocket science.
So what makes for effective backtesting that leads to profitable trading results?
The answer lies in a few effective rules and processes every trader should learn and memorize. These are presented below, starting with…
1. Using common-sense rationale
Your starting hypothesis should be simple to explain in common-sense terms. The reason for this is simple. There’s a lot of data out there. If you can’t explain why it needs to be a part of your strategy, or why you think it will work, you run 2 risks:
1. Coming up with rules that appear to work but don’t make sense. For example, historical banana prices may have fallen at the same time that Bitcoin prices went up — but this is unlikely to be a profitable correlation.
2. Mining data to force illogical rules to work. Strictly speaking, it’s possible to find the data to support just about any hypothesis. Using common-sense rules filters out the most irrational ideas that come about this way.
Speaking of the second mistake — another important rule is to…
2. Use blind data
Looking for data that proves your hypothesis is an easy mistake that most crypto traders make unconsciously. Checking any hypothesis or rule using randomized data can help make sure the backtesting results you got weren’t biased. For example, you may choose to shift to a different timescale or a similar coin pair and see if your rationale still works.
Another way to do this is by experimenting. If you’re using multi-variable rules, play around with one variable at a time to see how your hypothesis performs then. The more you experiment, the more data points you have and the more robust the results backtesting gives you.
3. Never stop backtesting
As you trade on a weekly basis, new data points will emerge. To make sure your rules aren’t becoming outdated, keep testing your old and new hypotheses. This will help you find new rules as they emerge and refine your old trading system for better results.
4. Identify key metrics, indicators, and results prior to your test
The more metrics and indicators you use to evaluate your backtesting, the more angles you’re playing. We recommend using a number of different indicators and metrics as well as using multiple data sets whenever possible. This will improve the accuracy of your results. Just remember to identify everything you’ll be using prior to your test to avoid bias.
5. Be ready to change your strategy
Your backtesting results can show you that your current trading system and strategy don’t work. Moreover, new events can show that your previous rules no longer apply. If this happens, you should be ready to change your trading strategy down to its core rules.
If this happens, don’t hesitate to make sweeping changes to your trading system by backtesting for major new hypotheses. Sometimes, overhauling what you’ve been using is necessary — and there’s no shame in accepting that you need to change with the times.
As you can see, backtesting really isn’t that difficult. So long as you have Excel, Google Docs, or another spreadsheet app, you can see how your trading system would perform in the past to get insights into the present.
If you’d like a live demonstration of how backtesting works, check out our Adara Academy backtesting videos. We go over automatic and manual backtesting step-by-step, meaning you’ll be able to do the same once you’re done watching.
Would you like to learn more about crypto trading? Сheck out our educational platform Adara Academy