Backtesting
Backtesting is the process of testing a trading strategy using historical data to simulate how it would have performed in the past. By using backtesting to develop and refine a cryptocurrency trading strategy, traders can increase their chances of success and profitability in the highly volatile and dynamic crypto market.
Supported Exchanges
Backtesting works on these exchanges:
Backtesting may work on other exchanges as well. However, since we have only tested these exchanges, we cannot guarantee that it will work on others.
Workaround
If backtesting doesn’t work on your exchange, you can connect to a supported exchange without API keys, add the coin, copy the strategy onto it, and then backtest through it. Alternatively, you can use already saved OHLCV data from other exchanges, but pay attention to the saved timeframe.
Benefits of Backtesting
- Reduce Risk: Test strategies on historical data to identify potential weaknesses before risking real money.
- Improve Accuracy: Analyze past market data to improve strategy accuracy and make better-informed decisions.
- Optimize Parameters: Fine-tune strategies by testing different parameters and evaluating their impact on performance.
- Save Time: Test and refine strategies without the need to monitor the market in real-time.
How to Use Backtesting in nuxBot
- Ensure Pro License: Make sure you have a Pro license to access Backtesting.
- Navigate to Backtesting Settings:
- Go to your nuxBot Dashboard.
- Click on the three horizontal lines in the top right corner.
- Go to
Settings
->Trading Settings
->Backtesting
.
- Select Trading Pair and Duration: Choose your trading pair and the number of days you want to backtest. The duration of the backtesting process can vary depending on the timeframe and the number of days selected.
Understanding the Outputs
- Total Buys: Number of buy trades made during the backtest period.
- Total DCAs: Number of Dollar Cost Averaging (DCA) trades made during the backtest period.
- Total Sells: Number of sell trades made during the backtest period.
- Total SL: Number of stop-loss trades made during the backtest period.
- Total Profit Trades: Number of profitable trades made during the backtest period.
- Maximum Quote per Trade Needed: Maximum amount of quote currency needed for a trade during the backtest period.
- Maximum DCAs per Trade Needed: Maximum number of DCA trades needed for a trade during the backtest period.
- Total PnL: Total profit and loss in quote currency made during the backtest period.
- Total PnL%: Percentage of profit and loss made during the backtest period.
- Average Trade Profit: Average profit per trade in quote currency made during the backtest period.
- Average Trade Profit%: Average percentage of profit per trade made during the backtest period.
- Win Rate: Percentage of profitable trades made during the backtest period.
- Reward Index: Measure of the profitability of the strategy. A value above 1 indicates profitability, with higher values indicating greater profitability. A value below 1 indicates unprofitability.
- API Fetching Time: Time taken to retrieve data from the exchange’s API.
- Backtest Time: Time taken to run the backtest (excluding API Fetching Time).
The outputs are also saved to the pair under saves/charts/pair/backtesting
, including the backtested trades and a copy of the strategy that was backtested.
Important
While backtesting can provide valuable insights and help improve trading strategies, it cannot guarantee future success.