The importance of backtesting:
Introduction – What is a backtest:
Let’s start with the basics and some facts, a backtest is not the holy grail, and it shouldn’t be that way.
By definition, a backtest is the verification of the performance of a strategy or quantitative model using historical data to verify a hypothesis.
To simplify it, it is the roadmap that marks us if there is any edge in trading system (or not). It does not matter if you are an algorithmic or manual trader, a Backtest can be done by programming or it can be done manually, and it gives us a series of important data to know how we are performing against the market.
Usually we will find in this parameter such as gross profit, gross loss and net result, in addition to some metrics such as Profit Factor that may be unknown to some readers but will be covered in this article.
What can we find in one:
The first time we save a backtest we can find a lot of data that can be confusing, let’s break down one by one to see what they really are:
- Symbol: Product we are test.
- Period: Time period of the chart.
- Model: Data modeling form, we will always use open prices, already formed candles.
- Parameters: Expert Advisor parameters such as Stop Loss, Take Profit, Lots…
- Initial Deposit: Initial deposit, always put a very high one, if a system is a loser by nature, let the Backtest end and reverse the rules.
- Spread: Difference between purchase and sale price (Commission).
- Total net profit: Net profit of the system.
- Profit Factor: Ratio to potential profit for each Dollar.
- Expected Payoff: Average payout or average net profit, counting losing and winning trades.
- Drawdown: Maximum capital loss, from highest to lowest point.
- Data about trades: Data related to winning and losing operations, average profit, average loss … etc.
Why all of this is important?
And that’s a simple question, with a long answer.
Let’s put ourselves in context, you are new to the market, or maybe you have been trading for a while with poor results (this is way more common than you think), given the fact that more than 70% of retail traders lose money over time, What do you think will be the result of your operations?
This is question is a tricky one, you may lose or you may win, the thing is You can’t know that beforehand without a backtest, but you have a 70% chance to be a loser on the market.
This data is verified by European regulation authorities since every broker that’s regulated with them has to show their data.
Using historical data you can be sure that, at least, your strategy worked in the past or not. The fact that worked in the past is not a guarantee that it will work in the future, edges don’t last forever, some may last a decade since you discover them, others maybe a year.
But if something didn’t work out in the past… I can assure you there’s a low probability of it working in the future.
Doesn’t matter if you are a manual trader or an algorithmic one, you need to work with data, model your risks and create great analysis in order to make things go well.
How can i do a backtest?
Two options, coding or manual.
Both of them are correct, the only difference will be the time required to prepare everything. But, I’ve to say my opinion here, it’s a mix of an opinion and a fact, coding a system requires way less time and allows you to write once and test on every market and timeframe you want (fact), and coding is for everyone, you just need a good teacher (opinion).
People tend to say that coding is hard, but nowadays you can find kids in High School learning the basics of coding, 16 year old kids that know the basics about programming logic and syntax.
If you want to backtest strategies manually you can check:
Hope this can help you follow your edge, Victor.