17 July 2023
Do you believe you have innovative ideas for the market but are unsure of how to test them without putting your money at risk? A good systematic trader's bread and butter is their ability to backtest trade ideas.
Backtesting's fundamental tenet is that past successes might repeat themselves in the future. But how do you approach doing this on your own, and how do you assess the outcomes? Let's perform a quick backtesting procedure.
One of the essential steps in creating your own charting and trading technique is backtesting. It requires using a system built on historical data to recreate trades that would have taken place in the past. You should be able to determine whether or not an investment plan is successful based on the backtesting results.
What Is Backtesting, Exactly?
First, read our post What Is Backtesting? if you want a deeper dig into the subject.
Backtesting's primary goal is to demonstrate the viability of your trading theories, to put it briefly. To begin, you use historical market data to see how a strategy would have fared. If the technique appears to have promise, it might also work well in a real-time trading environment.
What Should I Do Prior to Backtesting?
Your trading style must be established before you begin backtesting. Are you a systematic or a discretionary trader?
Discretionary trading relies on decisions; traders make their own timing decisions regarding when to enter and leave trades. It's an open-ended, loose strategy where the majority of choices are based on the trader's evaluation of the current situation. As a result, since the approach isn't clearly defined, backtesting is less important when it comes to discretionary trading.
It goes without saying that you should still backtest and paper trade if you're a discretionary trader. It simply indicates that the outcomes might not be as trustworthy as they are with systematic trading.
Backtesting is better appropriate for systematic trading. A trading system that specifies and instructs traders on when to enter and exit a trade is what systematic traders rely on. While systematic traders have complete control over the majority of the strategy's elements, it completely chooses their entry and exit signals. A straightforward technique could be thought of in the following two easy steps:
Enter a trade when A and B occur at the same moment.
Exit the trade after X has occurred.
This strategy is favored by some traders. It can make trading judgments free of emotion and offer a believable level of certainty that a trading strategy is successful. Naturally, there are still no assurances.
Because of this, it's crucial to ensure that your system contains very precise rules for when to enter or quit positions. A poorly defined plan will produce erratic outcomes. This trading approach is increasingly common in algorithmic trading, as one might anticipate.
If you wish to automate the procedure, you can purchase backtesting software; all you have to do is enter your own data, and the program will perform the backtesting on your behalf. But in this case, we'll use a manual backtesting approach. Although it takes a little more effort, it is totally free.
This link will take you to a Google Sheets spreadsheet template. This is a basic template that you can use as a basis for making your own. It gives you a broad sense of the data that a backtesting sheet might include. There are no fixed guidelines; some traders choose to program it in Python or Excel. You are free to include as much data as you require as well as any additional information you may think is relevant.
Market Side Entry
Consider Profit Risk
Long $18,000 $16,200 $21,600 10% 20%
Short $19,000 $20,900 $13,300 10% 30% -1900
Let's backtest a straightforward trading plan:
Our first deal brought in roughly $3,800 in profit, whereas our second trade cost us about $2,900. Thus, our current realized PnL is $900.
Additionally, we're engaged in a transaction that had around $9,000 in unrealized profit as of December 2020. If we follow our original plan, we'll close this when the subsequent death cross occurs.
What do these findings therefore indicate? Our plan would have produced a respectable return, but nothing particularly noteworthy has emerged thus far. The goal of backtesting would be defeated if we realized the open trade to significantly improve our realized PnL. The outcomes won't be reliable if we don't follow the plan.
Despite the fact that this is a methodical approach, the context should also be taken into account. The unsuccessful transaction from $9,600 to $6,700 took place at the time of the COVID-19 crash in March 2020. Any trading system may be significantly impacted by such a "black swan" event. This is yet another justification for more investigation to see whether this loss is typical or only a result of the method.
This is one illustration of a basic backtesting procedure. If we go back and evaluate this method with more data or add other technical indicators to maybe increase the signals it generates, it might have some promise.
But what more can you infer from backtesting outcomes?
Your maximum upside and drawdown are measured by volatility.
The fundamental steps for doing a manual backtest of a trading system have been covered. But it's crucial to keep in mind that past success doesn't guarantee future success.
If you want to enhance your trading technique, you must adjust to changing market circumstances. Additionally, be careful not to put all your faith on the data. When it comes to assessing outcomes, common sense is a helpful — if frequently disregarded — instrument.