diff --git a/config_examples/config_freqai.okx.json b/config_examples/config_freqai.okx.json index c2693fc..e5bfe03 100644 --- a/config_examples/config_freqai.okx.json +++ b/config_examples/config_freqai.okx.json @@ -2,16 +2,16 @@ "$schema": "https://schema.freqtrade.io/schema.json", "trading_mode": "spot", "margin_mode": "isolated", - "max_open_trades": 4, + "max_open_trades": 3, "stake_currency": "USDT", - "stake_amount": 150, + "stake_amount": 100, "tradable_balance_ratio": 1, "fiat_display_currency": "USD", "dry_run": true, - "timeframe": "3m", + "timeframe": "15m", "dry_run_wallet": 1000, "cancel_open_orders_on_exit": true, - "stoploss": -0.05, + "stoploss": -0.1, "unfilledtimeout": { "entry": 5, "exit": 15 @@ -30,12 +30,13 @@ }, "ccxt_async_config": { "enableRateLimit": true, - "rateLimit": 500, + "rateLimit": 500, "timeout": 20000 }, "pair_whitelist": [ "BTC/USDT", - "SOL/USDT" + "SOL/USDT", + "ETH/USDT" ], "pair_blacklist": [] }, @@ -66,35 +67,39 @@ }, "freqaimodel": "XGBoostRegressor", "model_training_parameters": { - "n_estimators": 100, + "n_estimators": 200, "learning_rate": 0.05, - "max_depth": 5 + "max_depth": 6, + "subsample": 0.8, + "colsample_bytree": 0.8, + "reg_lambda": 1.0, + "objective": "reg:squarederror", + "eval_metric": "rmse", + "early_stopping_rounds": 20 }, - "train_period_days": 180, - "backtest_period_days": 60, + "train_period_days": 365, + "backtest_period_days": 90, "live_retrain_hours": 0, "feature_selection": { - "method": "recursive_elimination" + "method": "recursive_elimination" }, "feature_parameters": { - "include_timeframes": ["15m"], - "include_corr_pairlist": ["BTC/USDT"], + "include_timeframes": ["15m", "1h", "4h"], + "include_corr_pairlist": ["BTC/USDT", "SOL/USDT"], "label_period_candles": 10, - "include_shifted_candles": 1, - + "include_shifted_candles": 2, "weight_factor": 0.9, "principal_component_analysis": false, - "use_SVM_to_remove_outliers": false, - "indicator_periods_candles": [14], + "use_SVM_to_remove_outliers": true, + "SVM_parameters": { + "nu": 0.1 + }, + "indicator_periods_candles": [14, 20] }, "data_split_parameters": { - "test_size": 0.2 - }, - "model_training_parameters": { - "n_estimators": 100, - "learning_rate": 0.05, - "max_depth": 5 - } + "test_size": 0.2, + "shuffle": true + } }, "api_server": { "enabled": true, @@ -117,3 +122,5 @@ "loglevel": "DEBUG" } } + + diff --git a/docker-compose.yml b/docker-compose.yml index aeb31e6..529a826 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,13 +61,13 @@ services: # --spaces roi stoploss # -e 200 - command: > - backtesting - --logfile /freqtrade/user_data/logs/freqtrade.log - --freqaimodel XGBoostRegressor - --config /freqtrade/config_examples/config_freqai.okx.json - --config /freqtrade/templates/FreqaiExampleStrategy.json - --strategy-path /freqtrade/templates - --strategy FreqaiExampleStrategy - --timerange 20250320-20250420 - --cache none + command: > + backtesting + --logfile /freqtrade/user_data/logs/freqtrade.log + --freqaimodel XGBoostRegressor + --config /freqtrade/config_examples/config_freqai.okx.json + --config /freqtrade/templates/FreqaiExampleStrategy.json + --strategy-path /freqtrade/templates + --strategy FreqaiExampleStrategy + --timerange 20250320-20250420 + --cache none diff --git a/freqtrade/templates/FreqaiExampleStrategy.py b/freqtrade/templates/FreqaiExampleStrategy.py index 4eec272..0511c82 100644 --- a/freqtrade/templates/FreqaiExampleStrategy.py +++ b/freqtrade/templates/FreqaiExampleStrategy.py @@ -366,3 +366,4 @@ class FreqaiExampleStrategy(IStrategy): if rate > (last_candle["close"] * (1 + 0.0025)): return False return True +