From 45c8161448cf7f576d1ecdf5c2f4524801fc96f6 Mon Sep 17 00:00:00 2001 From: Aleksey Savin Date: Fri, 31 May 2024 21:07:43 +0000 Subject: [PATCH] for local testing --- makefile | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 makefile diff --git a/makefile b/makefile new file mode 100644 index 000000000..a4e1f0adb --- /dev/null +++ b/makefile @@ -0,0 +1,58 @@ +trade: + freqtrade trade --config /workspaces/freqtrade/user_data/config.json --freqaimodel XGBoostRegressor --strategy FreqaiExampleStrategy + +load_data: + freqtrade download-data --exchange binance --config /workspaces/freqtrade/user_data/config.json --pairs BTC/USDT:USDT --timeframe 3m 5m 15m 1h --timerange 20231201-20240331 --data-format-ohlcv json + + +# ================ +load_data_case: + freqtrade download-data --exchange binance --config /workspaces/freqtrade/user_data/config.json --pairs BTC/USDT:USDT ETH/USDT:USDT ADA/USDT:USDT LTC/USDT:USDT DOGE/USDT:USDT XRP/USDT:USDT XLM/USDT:USDT XMR/USDT:USDT --timeframe 3m 5m 15m 1h --timerange 20230101-20230501 --data-format-ohlcv json + +gaps: + python3 /workspaces/freqtrade/user_data/scripts/meke_gaps_in_data.py + python3 /workspaces/freqtrade/user_data/scripts/meke_gaps_in_data.py + python3 /workspaces/freqtrade/user_data/scripts/meke_gaps_in_data.py + +backtests: + freqtrade backtesting --timerange 20230101-20230201 --strategy FreqaiExampleStrategy --freqaimodel XGBoostRegressor --config /workspaces/freqtrade/user_data/config.json --data-format-ohlcv json --logfile /workspaces/freqtrade/user_data/backtest01.log + make clean + freqtrade backtesting --timerange 20230201-20230301 --strategy FreqaiExampleStrategy --freqaimodel XGBoostRegressor --config /workspaces/freqtrade/user_data/config.json --data-format-ohlcv json --logfile /workspaces/freqtrade/user_data/backtest02.log + make clean + freqtrade backtesting --timerange 20230301-20230401 --strategy FreqaiExampleStrategy --freqaimodel XGBoostRegressor --config /workspaces/freqtrade/user_data/config.json --data-format-ohlcv json --logfile /workspaces/freqtrade/user_data/backtest03.log + make clean + freqtrade backtesting --timerange 20230415-20230501 --strategy FreqaiExampleStrategy --freqaimodel XGBoostRegressor --config /workspaces/freqtrade/user_data/config.json --data-format-ohlcv json --logfile /workspaces/freqtrade/user_data/backtest04.log + make clean + freqtrade backtesting --timerange 20230101-20230601 --strategy FreqaiExampleStrategy --freqaimodel XGBoostRegressor --config /workspaces/freqtrade/user_data/config.json --data-format-ohlcv json --logfile /workspaces/freqtrade/user_data/backtest05.log + make clean + +before_merge: + # make load_data_case + # make gaps + make backtests + +pre_deploy: + pytest + ruff check . + pre-commit run -a + mypy freqtrade + isort . + + +# ================ + +backtest_issue: + freqtrade backtesting --timerange 20231201-20240331 --strategy FreqaiExampleStrategy --freqaimodel XGBoostRegressor --config /workspaces/freqtrade/user_data/config.json --data-format-ohlcv json + +test: + pytest /workspaces/freqtrade/tests/freqai/test_freqai_backtesting.py + +clean: + rm -rf /workspaces/freqtrade/user_data/models/unique-id + cd /workspaces/freqtrade/user_data/backtest_results/ && rm .last_result.json && rm *.json + +clean_data: + rm -rf /workspaces/freqtrade/user_data/data/ + +format: + ruff check . --fix \ No newline at end of file