backtest.sh

This commit is contained in:
zhangkun9038@dingtalk.com 2025-05-13 16:32:44 +00:00
parent 2926295201
commit e2143736fa

View File

@ -1,4 +1,9 @@
#!/bin/bash
# Parse command line arguments
START_DATE=${1:-$(date -d "2 days ago" +"%Y%m%d")}
END_DATE=${2:-$(date -d "tomorrow" +"%Y%m%d")}
cd ../
source .venv/bin/activate
rm -rf user_data/models/*
@ -11,11 +16,11 @@ freqtrade backtesting \
--config config_examples/theforcev7.json \
--strategy-path ./freqtrade/templates \
--strategy TheForceV7 \
--timerange 20250510-20250513 \
--timerange ${START_DATE}-${END_DATE} \
--breakdown week month \
--export trades \
--fee 0.0008 \
--cache none > output.log
--cache none >output.log 2>&1
sed -i 's/\x1B\[[0-9;]*m//g' output.log
python3 filter.py
@ -42,4 +47,4 @@ python3 filter.py
cp output_filted.log result/ -f
cd tools/
python tradestocsv.py
cd -
cd ../