فهرست منبع

fix: use ccxt httpsProxy for freqtrade okx backtest

lxy 1 ماه پیش
والد
کامیت
1aa720340b

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 25 - 0
reports/eth-exploration/freqtrade-eth-skeleton-backtest-fix-20260430T-fix-proxy.json


+ 225 - 0
reports/eth-exploration/freqtrade-eth-skeleton-backtest-fix-20260430T-fix-proxy.md

@@ -0,0 +1,225 @@
+# Freqtrade ETH skeleton backtest attempt
+
+- Generated at: `2026-04-29T18:50:47.580840+00:00`
+- Scope: backtest only; no live or dry-run trading process was started.
+- Repo config changed: `false`; temporary config was written under `/tmp`.
+- Temporary userdir: `/tmp/okx-codex-trader-freqtrade-eth-skeleton/user_data`
+- Temporary config: `/tmp/okx-codex-trader-freqtrade-eth-skeleton/config-eth-skeleton-okx-futures.json`
+- Proxy injected: `True`
+- Proxy config key: `httpsProxy`
+
+## Data export
+
+- `rtk uv run python scripts/export_freqtrade_data.py --symbol ETH-USDT-SWAP --bar 5m --output-dir /tmp/okx-codex-trader-freqtrade-eth-skeleton/user_data/data/okx/futures`: exit `0`
+- `rtk uv run python scripts/export_freqtrade_data.py --symbol BTC-USDT-SWAP --bar 5m --output-dir /tmp/okx-codex-trader-freqtrade-eth-skeleton/user_data/data/okx/futures`: exit `0`
+- `rtk uv run python scripts/export_freqtrade_data.py --symbol ETH-USDT-SWAP --bar 15m --output-dir /tmp/okx-codex-trader-freqtrade-eth-skeleton/user_data/data/okx/futures`: exit `0`
+- `rtk uv run python scripts/export_freqtrade_data.py --symbol BTC-USDT-SWAP --bar 15m --output-dir /tmp/okx-codex-trader-freqtrade-eth-skeleton/user_data/data/okx/futures`: exit `0`
+
+## Backtest
+
+- Command: `rtk uvx --from freqtrade freqtrade backtesting --config /tmp/okx-codex-trader-freqtrade-eth-skeleton/config-eth-skeleton-okx-futures.json --userdir /tmp/okx-codex-trader-freqtrade-eth-skeleton/user_data --strategy EthFocusedInformativeDry --timeframe 5m --pairs ETH/USDT:USDT --timerange 20230101-`
+- Result: `succeeded` with exit `0`
+
+## Full command output
+
+### stderr
+
+```text
+2026-04-30 02:50:37,714 - freqtrade - INFO - freqtrade 2026.3
+2026-04-30 02:50:38,817 - freqtrade.configuration.load_config - INFO - Using config: /tmp/okx-codex-trader-freqtrade-eth-skeleton/config-eth-skeleton-okx-futures.json ...
+2026-04-30 02:50:38,819 - freqtrade.loggers - INFO - Enabling colorized output.
+2026-04-30 02:50:38,820 - freqtrade.loggers - INFO - Logfile configured
+2026-04-30 02:50:38,820 - freqtrade.loggers - INFO - Verbosity set to 0
+2026-04-30 02:50:38,820 - freqtrade.configuration.configuration - INFO - Parameter -i/--timeframe detected ... Using timeframe: 5m ...
+2026-04-30 02:50:38,820 - freqtrade.configuration.configuration - INFO - Using max_open_trades: 1 ...
+2026-04-30 02:50:38,821 - freqtrade.configuration.configuration - INFO - Parameter --timerange detected: 20230101- ...
+2026-04-30 02:50:38,821 - freqtrade.configuration.configuration - INFO - Using user-data directory: /tmp/okx-codex-trader-freqtrade-eth-skeleton/user_data ...
+2026-04-30 02:50:38,821 - freqtrade.configuration.configuration - INFO - Using data directory: /tmp/okx-codex-trader-freqtrade-eth-skeleton/user_data/data/okx ...
+2026-04-30 02:50:38,821 - freqtrade.configuration.configuration - INFO - Parameter --cache=day detected ...
+2026-04-30 02:50:38,822 - freqtrade.configuration.configuration - INFO - Using pairs ['ETH/USDT:USDT']
+2026-04-30 02:50:38,822 - freqtrade.configuration.configuration - INFO - Filter trades by timerange: 20230101-
+2026-04-30 02:50:38,822 - freqtrade.exchange.check_exchange - INFO - Checking exchange...
+2026-04-30 02:50:38,825 - freqtrade.exchange.check_exchange - INFO - Exchange "okx" is officially supported by the Freqtrade development team.
+2026-04-30 02:50:38,826 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
+2026-04-30 02:50:38,827 - freqtrade.commands.optimize_commands - INFO - Starting freqtrade in Backtesting mode
+2026-04-30 02:50:38,827 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled
+2026-04-30 02:50:38,827 - freqtrade.exchange.exchange - INFO - Using CCXT 4.5.51
+2026-04-30 02:50:38,827 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}, 'enableRateLimit': True, 'httpsProxy': 'http://127.0.0.1:7897', 
+'timeout': 60000}
+2026-04-30 02:50:38,830 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}, 'enableRateLimit': True, 'httpsProxy': 'http://127.0.0.1:7897', 
+'timeout': 60000}
+2026-04-30 02:50:38,832 - freqtrade.exchange.exchange - INFO - Using Exchange "OKX"
+2026-04-30 02:50:40,773 - freqtrade.exchange.exchange - INFO - Using cached leverage_tiers.
+2026-04-30 02:50:40,773 - freqtrade.exchange.exchange - INFO - Done initializing 304 markets.
+2026-04-30 02:50:40,787 - freqtrade.resolvers.exchange_resolver - INFO - Using resolved exchange 'Okx'...
+2026-04-30 02:50:40,788 - freqtrade.resolvers.iresolver - INFO - Using resolved strategy EthFocusedInformativeDry from 
+'/tmp/okx-codex-trader-freqtrade-eth-skeleton/user_data/strategies/EthFocusedInformativeDry.py'...
+2026-04-30 02:50:40,788 - freqtrade.strategy.hyper - INFO - Found no parameter file.
+2026-04-30 02:50:40,789 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'timeframe' with value from the configuration: 5m.
+2026-04-30 02:50:40,789 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'order_types' with value from the configuration: {'emergency_exit': 'market', 'entry': 'market', 'exit': 
+'market', 'force_entry': 'market', 'force_exit': 'market', 'stoploss': 'market', 'stoploss_on_exchange': False}.
+2026-04-30 02:50:40,789 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'stake_currency' with value from the configuration: USDT.
+2026-04-30 02:50:40,789 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'stake_amount' with value from the configuration: 10.
+2026-04-30 02:50:40,789 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'unfilledtimeout' with value from the configuration: {'entry': 10, 'exit': 10, 'unit': 'minutes', 
+'exit_timeout_count': 0}.
+2026-04-30 02:50:40,790 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'max_open_trades' with value from the configuration: 1.
+2026-04-30 02:50:40,790 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using minimal_roi: {'0': 100.0}
+2026-04-30 02:50:40,790 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using timeframe: 5m
+2026-04-30 02:50:40,790 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stoploss: -0.02
+2026-04-30 02:50:40,790 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop: False
+2026-04-30 02:50:40,790 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop_positive_offset: 0.0
+2026-04-30 02:50:40,791 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_only_offset_is_reached: False
+2026-04-30 02:50:40,791 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using use_custom_stoploss: False
+2026-04-30 02:50:40,791 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using process_only_new_candles: True
+2026-04-30 02:50:40,791 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using order_types: {'emergency_exit': 'market', 'entry': 'market', 'exit': 'market', 'force_entry': 'market', 
+'force_exit': 'market', 'stoploss': 'market', 'stoploss_on_exchange': False}
+2026-04-30 02:50:40,791 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using order_time_in_force: {'entry': 'GTC', 'exit': 'GTC'}
+2026-04-30 02:50:40,791 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stake_currency: USDT
+2026-04-30 02:50:40,792 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stake_amount: 10
+2026-04-30 02:50:40,792 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using startup_candle_count: 480
+2026-04-30 02:50:40,792 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using unfilledtimeout: {'entry': 10, 'exit': 10, 'unit': 'minutes', 'exit_timeout_count': 0}
+2026-04-30 02:50:40,792 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using use_exit_signal: True
+2026-04-30 02:50:40,792 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using exit_profit_only: False
+2026-04-30 02:50:40,793 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using ignore_roi_if_entry_signal: False
+2026-04-30 02:50:40,793 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using exit_profit_offset: 0.0
+2026-04-30 02:50:40,793 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using disable_dataframe_checks: False
+2026-04-30 02:50:40,793 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using ignore_buying_expired_candle_after: 0
+2026-04-30 02:50:40,793 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using position_adjustment_enable: False
+2026-04-30 02:50:40,793 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using max_entry_position_adjustment: -1
+2026-04-30 02:50:40,794 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using max_open_trades: 1
+2026-04-30 02:50:40,794 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
+2026-04-30 02:50:40,796 - freqtrade.resolvers.iresolver - INFO - Using resolved pairlist StaticPairList from 
+'/home/lxy/.cache/uv/archive-v0/mUfiqGCKo_jp8tUPEZw-d/lib/python3.11/site-packages/freqtrade/plugins/pairlist/StaticPairList.py'...
+2026-04-30 02:50:40,798 - freqtrade.optimize.backtesting - INFO - Using fee 0.0500% - worst case fee from exchange (lowest tier).
+2026-04-30 02:50:40,799 - freqtrade.exchange.exchange - WARNING - Using 2 calls to get OHLCV. This can result in slower operations for the bot. Please check if you really need 480 candles for your 
+strategy.
+2026-04-30 02:50:41,298 - freqtrade.optimize.backtesting - INFO - Loading data from 2022-12-30 08:00:00 up to 2026-04-29 02:00:00 (1215 days).
+2026-04-30 02:50:41,299 - freqtrade.data.history.datahandlers.idatahandler - WARNING - No history for ETH/USDT:USDT, funding_rate, 1h found. Use `freqtrade download-data` to download the data
+2026-04-30 02:50:41,300 - freqtrade.data.history.datahandlers.idatahandler - WARNING - No history for ETH/USDT:USDT, mark, 1h found. Use `freqtrade download-data` to download the data
+2026-04-30 02:50:42,628 - freqtrade.optimize.backtesting - INFO - Dataload complete. Calculating indicators
+2026-04-30 02:50:42,628 - freqtrade.optimize.backtesting - WARNING - Backtest result caching disabled due to use of open-ended timerange.
+2026-04-30 02:50:42,629 - freqtrade.optimize.backtesting - INFO - Running backtesting for Strategy EthFocusedInformativeDry
+2026-04-30 02:50:42,635 - freqtrade.data.dataprovider - INFO - Loading data for BTC/USDT:USDT 5m from 2022-12-30 08:00:00 to unbounded
+2026-04-30 02:50:43,177 - freqtrade.data.dataprovider - INFO - Loading data for BTC/USDT:USDT 15m from 2022-12-27 00:00:00 to unbounded
+2026-04-30 02:50:43,426 - freqtrade.data.dataprovider - INFO - Loading data for ETH/USDT:USDT 15m from 2022-12-27 00:00:00 to unbounded
+2026-04-30 02:50:44,076 - freqtrade.optimize.backtesting - INFO - Backtesting with data from 2023-01-01 00:00:00 up to 2026-04-29 02:00:00 (1214 days).
+2026-04-30 02:50:46,516 - freqtrade.misc - INFO - dumping json to "/tmp/okx-codex-trader-freqtrade-eth-skeleton/user_data/backtest_results/backtest-result-2026-04-30_02-50-46.meta.json"
+```
+
+### stdout
+
+```text
+Result for strategy EthFocusedInformativeDry
+                                                BACKTESTING REPORT                                                
+┏━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃          Pair ┃ Trades ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃  Win  Draw  Loss  Win% ┃
+┡━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
+│ ETH/USDT:USDT │    715 │        -0.22 │         -15.203 │        -1.52 │      0:27:00 │  291     0   424  40.7 │
+│         TOTAL │    715 │        -0.22 │         -15.203 │        -1.52 │      0:27:00 │  291     0   424  40.7 │
+└───────────────┴────────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┘
+                                         LEFT OPEN TRADES REPORT                                          
+┏━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃  Pair ┃ Trades ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃  Win  Draw  Loss  Win% ┃
+┡━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
+│ TOTAL │      0 │          0.0 │           0.000 │          0.0 │         0:00 │    0     0     0     0 │
+└───────┴────────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┘
+                                                      ENTER TAG STATS                                                       
+┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃              Enter Tag ┃ Entries ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃  Win  Draw  Loss  Win% ┃
+┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
+│   btc_lead_eth_lag_15m │      90 │        -0.01 │          -0.056 │        -0.01 │      0:18:00 │   37     0    53  41.1 │
+│    btc_lead_eth_lag_5m │     229 │        -0.26 │          -5.647 │        -0.56 │      0:15:00 │   74     0   155  32.3 │
+│ eth_btc_rsi_filter_15m │     396 │        -0.25 │          -9.499 │        -0.95 │      0:36:00 │  180     0   216  45.5 │
+│                  TOTAL │     715 │        -0.22 │         -15.203 │        -1.52 │      0:27:00 │  291     0   424  40.7 │
+└────────────────────────┴─────────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┘
+                                                    EXIT REASON STATS                                                    
+┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃           Exit Reason ┃ Exits ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃  Win  Draw  Loss  Win% ┃
+┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
+│ rsi_or_btc_trend_exit │   392 │         0.35 │          12.861 │         1.29 │      0:35:00 │  232     0   160  59.2 │
+│  lead_lag_take_profit │    39 │         2.35 │           8.817 │         0.88 │      0:16:00 │   39     0     0   100 │
+│     lead_lag_max_hold │    28 │         0.42 │           1.116 │         0.11 │      0:40:00 │   20     0     8  71.4 │
+│         lead_lag_stop │   143 │        -0.97 │         -13.206 │        -1.32 │      0:12:00 │    0     0   143     0 │
+│             stop_loss │   113 │         -2.3 │         -24.791 │        -2.48 │      0:18:00 │    0     0   113     0 │
+│                 TOTAL │   715 │        -0.22 │         -15.203 │        -1.52 │      0:27:00 │  291     0   424  40.7 │
+└───────────────────────┴───────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┘
+                                                                  MIXED TAG STATS                                                                  
+┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃              Enter Tag ┃           Exit Reason ┃ Trades ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃  Win  Draw  Loss  Win% ┃
+┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
+│ eth_btc_rsi_filter_15m │ rsi_or_btc_trend_exit │    306 │         0.35 │          10.243 │         1.02 │      0:40:00 │  180     0   126  58.8 │
+│    btc_lead_eth_lag_5m │  lead_lag_take_profit │     29 │         2.37 │           6.590 │         0.66 │      0:17:00 │   29     0     0   100 │
+│   btc_lead_eth_lag_15m │  lead_lag_take_profit │     10 │         2.29 │           2.227 │         0.22 │      0:12:00 │   10     0     0   100 │
+│   btc_lead_eth_lag_15m │ rsi_or_btc_trend_exit │     29 │         0.73 │           2.013 │          0.2 │      0:24:00 │   21     0     8  72.4 │
+│    btc_lead_eth_lag_5m │     lead_lag_max_hold │     21 │         0.46 │           0.906 │         0.09 │      0:40:00 │   14     0     7  66.7 │
+│    btc_lead_eth_lag_5m │ rsi_or_btc_trend_exit │     57 │         0.12 │           0.605 │         0.06 │      0:15:00 │   31     0    26  54.4 │
+│   btc_lead_eth_lag_15m │     lead_lag_max_hold │      7 │         0.31 │           0.211 │         0.02 │      0:40:00 │    6     0     1  85.7 │
+│   btc_lead_eth_lag_15m │             stop_loss │      5 │         -2.3 │          -1.098 │        -0.11 │      0:00:00 │    0     0     5     0 │
+│   btc_lead_eth_lag_15m │         lead_lag_stop │     39 │        -0.93 │          -3.409 │        -0.34 │      0:14:00 │    0     0    39     0 │
+│    btc_lead_eth_lag_5m │             stop_loss │     18 │         -2.3 │          -3.951 │         -0.4 │      0:04:00 │    0     0    18     0 │
+│    btc_lead_eth_lag_5m │         lead_lag_stop │    104 │        -0.98 │          -9.797 │        -0.98 │      0:12:00 │    0     0   104     0 │
+│ eth_btc_rsi_filter_15m │             stop_loss │     90 │         -2.3 │         -19.743 │        -1.97 │      0:22:00 │    0     0    90     0 │
+│                  TOTAL │                       │    715 │        -0.22 │         -15.203 │        -1.52 │      0:27:00 │  291     0   424  40.7 │
+└────────────────────────┴───────────────────────┴────────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┘
+                         SUMMARY METRICS                          
+┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃ Metric                        ┃ Value                          ┃
+┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
+│ Backtesting from              │ 2023-01-01 00:00:00            │
+│ Backtesting to                │ 2026-04-29 02:00:00            │
+│ Trading Mode                  │ Isolated Futures               │
+│ Max open trades               │ 1                              │
+│                               │                                │
+│ Total/Daily Avg Trades        │ 715 / 0.59                     │
+│ Starting balance              │ 1000 USDT                      │
+│ Final balance                 │ 984.797 USDT                   │
+│ Absolute profit               │ -15.203 USDT                   │
+│ Total profit %                │ -1.52%                         │
+│ CAGR %                        │ -0.46%                         │
+│ Sortino                       │ -3.12                          │
+│ Sharpe                        │ -1.80                          │
+│ Calmar                        │ -1.57                          │
+│ SQN                           │ -4.27                          │
+│ Profit factor                 │ 0.66                           │
+│ Expectancy (Ratio)            │ -0.02 (-0.20)                  │
+│ Avg. daily profit             │ -0.013 USDT                    │
+│ Avg. stake amount             │ 9.549 USDT                     │
+│ Total trade volume            │ 40989.38 USDT                  │
+│                               │                                │
+│ Best Pair                     │ ETH/USDT:USDT -1.52%           │
+│ Worst Pair                    │ ETH/USDT:USDT -1.52%           │
+│ Best trade                    │ ETH/USDT:USDT 5.53%            │
+│ Worst trade                   │ ETH/USDT:USDT -2.30%           │
+│ Best day                      │ 0.578 USDT                     │
+│ Worst day                     │ -0.854 USDT                    │
+│ Days win/draw/lose            │ 149 / 843 / 220                │
+│ Min/Max/Avg. Duration Winners │ 0d 00:05 / 0d 01:45 / 0d 00:31 │
+│ Min/Max/Avg. Duration Losers  │ 0d 00:00 / 0d 02:00 / 0d 00:24 │
+│ Max Consecutive Wins / Loss   │ 10 / 10                        │
+│ Rejected Entry signals        │ 0                              │
+│ Entry/Exit Timeouts           │ 0 / 0                          │
+│                               │                                │
+│ Min balance                   │ 984.752 USDT                   │
+│ Max balance                   │ 1000.02 USDT                   │
+│ Max % of account underwater   │ 1.53%                          │
+│ Absolute drawdown             │ 15.267 USDT (1.53%)            │
+│ Drawdown duration             │ 1146 days 06:15:00             │
+│ Profit at drawdown start      │ 0.02 USDT                      │
+│ Profit at drawdown end        │ -15.248 USDT                   │
+│ Drawdown start                │ 2023-01-02 14:20:00            │
+│ Drawdown end                  │ 2026-02-21 20:35:00            │
+│ Market change                 │ 91.44%                         │
+└───────────────────────────────┴────────────────────────────────┘
+
+Backtested 2023-01-01 00:00:00 -> 2026-04-29 02:00:00 | Max open trades : 1
+                                                                 STRATEGY SUMMARY                                                                 
+┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
+┃                 Strategy ┃ Trades ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃  Win  Draw  Loss  Win% ┃           Drawdown ┃
+┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
+│ EthFocusedInformativeDry │    715 │        -0.22 │         -15.203 │        -1.52 │      0:27:00 │  291     0   424  40.7 │ 15.267 USDT  1.53% │
+└──────────────────────────┴────────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┴────────────────────┘
+```
+
+## Next step
+
+- Review the Freqtrade result table and compare trade count, drawdown, and total profit with the research backtest.

+ 8 - 4
scripts/run_freqtrade_eth_skeleton_backtest.py

@@ -67,10 +67,12 @@ def write_tmp_config() -> dict[str, Any]:
     config["exchange"]["pair_whitelist"] = [PAIR]
     config["exchange"]["pair_whitelist"] = [PAIR]
 
 
     proxy = proxy_url()
     proxy = proxy_url()
+    proxy_config_key = None
     if proxy:
     if proxy:
         for key in ("ccxt_config", "ccxt_async_config"):
         for key in ("ccxt_config", "ccxt_async_config"):
             config["exchange"].setdefault(key, {})
             config["exchange"].setdefault(key, {})
-            config["exchange"][key]["proxies"] = {"http": proxy, "https": proxy}
+            config["exchange"][key]["httpsProxy"] = proxy
+        proxy_config_key = "httpsProxy"
 
 
     TMP_ROOT.mkdir(parents=True, exist_ok=True)
     TMP_ROOT.mkdir(parents=True, exist_ok=True)
     TMP_CONFIG.write_text(json.dumps(config, indent=2, sort_keys=True) + "\n", encoding="utf-8")
     TMP_CONFIG.write_text(json.dumps(config, indent=2, sort_keys=True) + "\n", encoding="utf-8")
@@ -81,6 +83,7 @@ def write_tmp_config() -> dict[str, Any]:
         "dry_run": config["dry_run"],
         "dry_run": config["dry_run"],
         "proxy_injected": proxy is not None,
         "proxy_injected": proxy is not None,
         "proxy_source": "environment" if proxy else None,
         "proxy_source": "environment" if proxy else None,
+        "proxy_config_key": proxy_config_key,
     }
     }
 
 
 
 
@@ -175,6 +178,7 @@ def render_markdown(payload: dict[str, Any]) -> str:
             f"- Temporary userdir: `{payload['tmp_userdir']['userdir']}`",
             f"- Temporary userdir: `{payload['tmp_userdir']['userdir']}`",
             f"- Temporary config: `{payload['tmp_config']['path']}`",
             f"- Temporary config: `{payload['tmp_config']['path']}`",
             f"- Proxy injected: `{payload['tmp_config']['proxy_injected']}`",
             f"- Proxy injected: `{payload['tmp_config']['proxy_injected']}`",
+            f"- Proxy config key: `{payload['tmp_config']['proxy_config_key']}`",
             "",
             "",
             "## Data export",
             "## Data export",
             "",
             "",
@@ -185,7 +189,7 @@ def render_markdown(payload: dict[str, Any]) -> str:
             f"- Command: `{ ' '.join(backtest['command']) }`",
             f"- Command: `{ ' '.join(backtest['command']) }`",
             f"- Result: `{status}` with exit `{backtest['returncode']}`",
             f"- Result: `{status}` with exit `{backtest['returncode']}`",
             "",
             "",
-            "## Full failure output",
+            "## Full command output",
             "",
             "",
             "### stderr",
             "### stderr",
             "",
             "",
@@ -230,8 +234,8 @@ def main() -> int:
     payload["next_steps"] = next_steps(payload)
     payload["next_steps"] = next_steps(payload)
 
 
     REPORT_DIR.mkdir(parents=True, exist_ok=True)
     REPORT_DIR.mkdir(parents=True, exist_ok=True)
-    json_path = REPORT_DIR / f"freqtrade-eth-skeleton-backtest-{args.stamp}.json"
-    md_path = REPORT_DIR / f"freqtrade-eth-skeleton-backtest-{args.stamp}.md"
+    json_path = REPORT_DIR / f"freqtrade-eth-skeleton-backtest-fix-{args.stamp}.json"
+    md_path = REPORT_DIR / f"freqtrade-eth-skeleton-backtest-fix-{args.stamp}.md"
     payload["json_report"] = str(json_path.relative_to(ROOT))
     payload["json_report"] = str(json_path.relative_to(ROOT))
     payload["markdown_report"] = str(md_path.relative_to(ROOT))
     payload["markdown_report"] = str(md_path.relative_to(ROOT))
     json_path.write_text(json.dumps(payload, indent=2, sort_keys=True) + "\n", encoding="utf-8")
     json_path.write_text(json.dumps(payload, indent=2, sort_keys=True) + "\n", encoding="utf-8")

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است