This project provides an automated solution to perform backtests for the NostalgiaForInfinity trading strategy using the freqtrade
framework. The main scripts, backtest.sh
and analyze.sh
, allow users to test configurations and analyze results.
Ensure the following tools are installed:
- Python: Version 3.9 or later is required.
- Install using pyenv or your system's package manager.
- Freqtrade:
- Install the latest stable version of freqtrade:
pip install freqtrade
- Install the latest stable version of freqtrade:
- Git:
- Required to clone and update the NostalgiaForInfinity repository.
sudo apt install git # For Ubuntu/Debian brew install git # For macOS
- Required to clone and update the NostalgiaForInfinity repository.
- jq:
- Required for handling JSON configurations in the scripts.
sudo apt install jq # For Ubuntu/Debian brew install jq # For macOS
- Required for handling JSON configurations in the scripts.
- NostalgiaForInfinity Repository: The script will automatically clone or update the repository.
- User Data Directory:
The script creates and manages a
user_data
directory for storing backtest configurations and results. - Pairlist Configuration:
Place a JSON pairlist configuration file in the
pairlists
folder within the project directory.
Clone the repository containing the backtest and analysis scripts:
git clone https://github.com/Canx/NFI_Backtest.git
cd NFI_Backtest
Run the backtesting script to generate results:
./backtest.sh
To analyze backtest results, use the analyze.sh
script. This script allows you to:
- View the details of a specific backtest file.
- Optionally run further analysis on the selected backtest file.
Execute the analysis script:
./analyze.sh
-
View Backtest Results: The script lists all backtest results saved in the
user_data/backtest_results/
directory. You can select a file to view its details interactively. -
Run Detailed Analysis: After selecting a backtest file, the script gives you the option to run detailed analysis using
freqtrade backtesting-analysis
.
-
Run the backtest script to generate results:
./backtest.sh
-
Analyze the results using the
analyze.sh
script:./analyze.sh
-
Follow the prompts to select and analyze a specific backtest file.
Backtest results are saved in the user_data/backtest_results/
directory. Example file names include:
- Type of Backtest:
default
,noderisk
, orslots
. - Version: The current branch, tag, or commit of the NostalgiaForInfinity repository.
- Timerange: The backtesting period.
- Timestamp: When the test was run.
Example:
results_slots_5_main_20241201-20241220_20241223_123456.json
If you want to enhance this project, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For detailed documentation on Freqtrade and its features, visit the official Freqtrade documentation.