Now you know what is paper trading and how to create your own trading strategy, let us see how to backtest the strategy !
What is backtesting in trading?
Backtesting in trading is a technique where traders are able to test the strategy by using historical data and to see if it will work well in the future.
Why is backtesting trading strategies important?
As per the rule of large numbers, it will be more accurate to trade on a strategy that has been tested atleast 100 times rather than having tested it for 4 or 5 times.
In that way, you can be sure that the accuracy or the win rate will be more or less the same in your trades.
Another important thing is it lets you know all the details like the drawdown, max and average profit or loss, whether the strategy is profitable or not etc.
Types of backtesting
The strategy can be backtested both online and off-line.
You can track any parameter you want to with the offline method.
The only thing you can change when using parameters online is their values.
Where to do backtesting?
Online
Backtesting is free to do on websites like metatrader. Forex backtesting is possible in Metatrader.
Backtesting of Indian stocks is possible on sites such as Zerodha streak. However, you will need to create a Zerodha account.
You can also do manual backtesting online with note taking apps like evernote, notion and excel.
Offline
By testing the strategy 100 times with various parameters, you can test the strategy offline in your notebook, paper or diary.
How to backtest your trading strategy?
There are many steps involved in backtesting. The first step is collecting data from different markets and exchanges, then organizing it in a way that will make it easier for analysis. The next step is running simulations on this data and calculating how profitable they were. Then one needs to compare these simulations with real trades and see if there are any discrepancies between them.
Let’s see them in detail..
Every potential parameter that could be tracked must be taken into account when backtesting any trading strategy, whether it be online or offline.
Some of the most important parameters are
Date
Note down the entry date and time, and exit date and time.
Asset traded
Mention the asset you are trading – like stocks, forex, derivatives, crypto etc.
Position
Assign a buy or sell order.
Entry criteria
It will usually be indicators and operators/comparators combinations.
Eg. Ema 20 crosses above Ema 200.
Where crosses above is a comparator.
Operators like +- */ can be used when needed.
Exit criteria
Assign stop loss, target and trailing stop loss values.
Date range
Assign the date range for backtesting.
Eg. Feb 1 2021 to Feb 2 2022.
Time frame
Time frame on which you want the backtest to be done.
Quantity
Number of shares or lots.
There are various other parameters which we will discuss in the upcoming posts.
Test the strategy with these parameters for minimum 100 trades and note down the win rate.
After backtesting, you may know to read the results which would contain profit and loss, drawdown, max loss etc.
Pros & Cons
Pros
The pros of backtesting are that it helps to find out what kind of strategy would work for the trader and what would not. They can also test different parameters and see the effect on the trading strategy performance.
It also helps traders to understand the maximum amount that they can lose with a given strategy.
Cons
The cons are that backtesting requires a lot of data, which can be expensive or time consuming to gather.
The biggest disadvantage of backtesting is that it does not take into account future events, which may have an impact on the results.
FAQs
Is backtesting a waste of time? Does it really work?
Yes. It does work. But you should not take only the backtested data into consideration while placing a trade. There are so many other factors that decides your wins and losses.
How much backtesting is enough?
As you can see while backtesting, not every month will be the same. So do not waste your time to backtest your strategy for more than 1 or 2 years.
Lessons learnt
As far as I have seen, manual backtesting is easier for me as I can quickly test a strategy 100 times with an entry and exit criteria and note down the win rate. This saves you time and energy.
Backtesting sites works well when you are into algorithmic trading. As machines calculates it’s win rate when it trades. We cannot take quick and emotionless trades like robots.
Where to learn backtesting for free?
Learn backtesting in tradingview for free..
Takeaways
- Backtesting is a technique where a trading strategy is tested with historical data.
- You can do manual backtesting or automated. And online or offline.
- Sites like metatrader allows you to backtest your trading strategy for free.