It's a regular Jesse's project template including a script for batch backtesting using the Research module.
"Brute force" refers to a method where all possible configurations of a given strategy are tested to identify the optimal settings. Unlike heuristic methods, this approach relies on exhaustive computation to find the best solution based on specified criteria, without taking any shortcuts.
Assuming you have already installed the necessary environment dependencies and imported candles, follow the steps below to create your project:
# Change "my-project" to any name you prefer
git clone https://github.com/nick-dolan/brute-force-project-template my-project
# Create a .env file from the example
cp .env.example .env
To initiate a brute-force, type:
python brute-force.py
This setup works out-of-the-box with an example strategy from example-strategies.
The script generates all possible permutations from strategy hyperparameters. You can specify the "step" in hyperparameters; if not specified, the default step value is 0.1
if float and 1
if int.
![Screenshot 2023-10-30 at 14 11 42-min](https://private-user-images.githubusercontent.com/25667028/279037990-b5e5137e-2a6c-465c-ae4f-dd8412ed58ec.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0OTE3NjUsIm5iZiI6MTczOTQ5MTQ2NSwicGF0aCI6Ii8yNTY2NzAyOC8yNzkwMzc5OTAtYjVlNTEzN2UtMmE2Yy00NjVjLWFlNGYtZGQ4NDEyZWQ1OGVjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDAwMDQyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhMWFiN2JjMGVkODg4ODFjNmY3ZGJjYjhkM2I1MTlmZGI4MjZmODUyNzUxMTNlODE4NjBmM2ZmNjNlMjUxYWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.iTyJjyQJcIOwX37TtIW6ItYSrXGVTA-m3uitfzkwJPQ)
Upon completion, you'll receive a .csv file containing all results along with the hyperparameters in /storage/brute-force
:
![Screenshot 2023-10-30 at 17 04 12-min](https://private-user-images.githubusercontent.com/25667028/279082842-2981e7e3-77b6-4ac0-a2db-dd0f89a54fef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0OTE3NjUsIm5iZiI6MTczOTQ5MTQ2NSwicGF0aCI6Ii8yNTY2NzAyOC8yNzkwODI4NDItMjk4MWU3ZTMtNzdiNi00YWMwLWEyZGItZGQwZjg5YTU0ZmVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDAwMDQyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY2Mjc4YTFmM2RjMDU0MmY0ZDc3MDc4MWI5YjgyMDgyZTBhYTYxNDdhNGY0Yzg1NTMxZWMzYzJmOTE2Yzg4ZTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.HyQFPwYVKxg9r4-EfHuwg0kMxv372z26d6pz2kLEH2I)
To launch the standard UI, type:
jesse run
Now, open localhost:9000 in your browser to view the dashboard.