15 related strategies (⧉ identical code, ≈ similar name)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | from __future__ import annotations from datetime import datetime from typing import Any import pandas as pd try: from freqtrade.persistence import Trade # pyright: ignore[reportMissingImports] from freqtrade.strategy import ( # pyright: ignore[reportMissingImports] DecimalParameter, IntParameter, IStrategy, stoploss_from_absolute, ) except ModuleNotFoundError: # Fallback for IDE/lint environments without freqtrade installed. class _Param: # type: ignore[override] def __init__(self, *args: Any, **kwargs: Any) -> None: self.value = kwargs.get("default", args[2] if len(args) > 2 else 0) def __repr__(self) -> str: return str(self.value) IntParameter = _Param # type: ignore[misc, assignment] DecimalParameter = _Param # type: ignore[misc, assignment] class IStrategy: # type: ignore[override] pass class Trade: # type: ignore[override] open_rate: float = 0.0 is_short: bool = False class FreqtradeFuturesStrategy(IStrategy): """ MA + RSI + ADX + MACD + ATR futures strategy (long/short). Hyperopt spaces: buy : ma_short, ma_long, rsi_overbought, rsi_oversold, adx_threshold sell : atr_sl_mult, rr_ratio Anti-overfitting protocol: - Train : --timerange 20240101-20250601 (17 months) - Validate: --timerange 20250601-20260401 (10 months, out-of-sample) - Loss : SharpeHyperOptLossDaily - Min trades: 80 """ INTERFACE_VERSION = 3 timeframe = "1h" can_short = True process_only_new_candles = True # startup_candle_count 须覆盖最大 MA 周期(ma_long 上限 = 60) startup_candle_count = 100 minimal_roi = {"0": 10} stoploss = -0.99 use_custom_stoploss = True # T1后启用ATR跟踪止损 use_custom_exit = True # 加仓 & 部分平仓开关 position_adjustment_enable = True # 加仓参数(与 bot.py 对齐) SCALE_TRIGGER_MULT = 0.5 # 价格顺方向移动 N×ATR 后触发加仓 SCALE_INIT_RATIO = 0.60 # 首次建仓比例(60%) SCALE_ADD_RATIO = 0.40 # 加仓补足比例(40%) PARTIAL_CLOSE_RATIO = 0.50 # 1R 处部分平仓比例(50%) PARTIAL_TARGET_MULT = 1.0 # 第一目标:1×止损距离 # 日线趋势过滤 DAILY_MA_PERIOD = 20 # 日线 MA20:close > MA20 → 牛市,< MA20 → 熊市 # ---------------------------------------------------------------- # 固定参数(不参与 hyperopt) # ---------------------------------------------------------------- RSI_PERIOD = 14 ADX_PERIOD = 14 ATR_PERIOD = 14 MACD_FAST = 12 MACD_SLOW = 26 MACD_SIGNAL = 9 MAX_LEVERAGE = 10.0 TARGET_LEVERAGE = 10.0 # ---------------------------------------------------------------- # Hyperopt 参数空间 # ---------------------------------------------------------------- # 均线周期 —— buy 空间 ma_short = IntParameter(5, 20, default=12, space="buy", optimize=True) ma_long = IntParameter(21, 60, default=51, space="buy", optimize=True) # RSI 阈值 —— buy 空间 rsi_overbought = IntParameter(60, 85, default=66, space="buy", optimize=True) rsi_oversold = IntParameter(15, 45, default=40, space="buy", optimize=True) # ADX 趋势过滤阈值 —— buy 空间(多空独立阈值) adx_threshold = IntParameter(15, 45, default=27, space="buy", optimize=True) adx_threshold_short = IntParameter(20, 50, default=33, space="buy", optimize=True) # ATR 止损倍数 & 跟踪止损倍数 —— sell 空间 # 关键权衡:止损太宽 → 单次亏损大;止损太窄 → 被震出频繁 # 回测数据驱动:3.5×ATR @ 10x 杠杆 ≈ 账户 -32%/笔,盈亏比被稀释到 1:1 atr_sl_mult = DecimalParameter(1.0, 3.5, default=2.5, decimals=1, space="sell", optimize=True) atr_trail_mult = DecimalParameter(1.0, 3.0, default=2.0, decimals=1, space="sell", optimize=True) # 波动率过滤:ATR/Close 超过此阈值不开仓(极端行情易扫损) MAX_ATR_PCT = 0.035 # 最大持仓时长(小时),超过强平(防长期横盘消耗) MAX_HOLD_HOURS = 72 # ---------------------------------------------------------------- # 工具函数 # ---------------------------------------------------------------- def leverage( self, pair: str, current_time: datetime, current_rate: float, proposed_leverage: float, max_leverage: float, entry_tag: str | None, side: str, **kwargs: Any, ) -> float: return min(self.TARGET_LEVERAGE, self.MAX_LEVERAGE, max_leverage) @staticmethod def _true_range(dataframe: pd.DataFrame) -> pd.Series: high = dataframe["high"] low = dataframe["low"] prev_close = dataframe["close"].shift(1) return pd.concat( [(high - low), (high - prev_close).abs(), (low - prev_close).abs()], axis=1, ).max(axis=1) def _compute_rsi(self, series: pd.Series, period: int) -> pd.Series: delta = series.diff() gain = delta.clip(lower=0) loss = (-delta).clip(lower=0) avg_gain = gain.ewm(com=period - 1, min_periods=period).mean() avg_loss = loss.ewm(com=period - 1, min_periods=period).mean() return 100 - (100 / (1 + avg_gain / avg_loss)) def _compute_macd(self, series: pd.Series) -> tuple[pd.Series, pd.Series]: ema_fast = series.ewm(span=self.MACD_FAST, min_periods=self.MACD_FAST).mean() ema_slow = series.ewm(span=self.MACD_SLOW, min_periods=self.MACD_SLOW).mean() macd_line = ema_fast - ema_slow signal_line = macd_line.ewm(span=self.MACD_SIGNAL, min_periods=self.MACD_SIGNAL).mean() return macd_line, signal_line def _compute_atr(self, dataframe: pd.DataFrame) -> pd.Series: return self._true_range(dataframe).ewm( span=self.ATR_PERIOD, min_periods=self.ATR_PERIOD ).mean() def _compute_adx(self, dataframe: pd.DataFrame) -> pd.Series: up = dataframe["high"].diff() down = -dataframe["low"].diff() plus_dm = up.where((up > down) & (up > 0), 0.0) minus_dm = down.where((down > up) & (down > 0), 0.0) atr = self._true_range(dataframe).ewm( span=self.ADX_PERIOD, min_periods=self.ADX_PERIOD ).mean() plus_di = 100 * plus_dm.ewm(span=self.ADX_PERIOD, min_periods=self.ADX_PERIOD).mean() / atr minus_di = 100 * minus_dm.ewm(span=self.ADX_PERIOD, min_periods=self.ADX_PERIOD).mean() / atr dx = ((plus_di - minus_di).abs() / (plus_di + minus_di)) * 100 return dx.ewm(span=self.ADX_PERIOD, min_periods=self.ADX_PERIOD).mean() # ---------------------------------------------------------------- # 指标计算 —— 只跑一次(不受 hyperopt 参数影响) # # MA 预计算技巧:一次性算出所有候选周期,存为独立列 # populate_entry_trend 根据当前 hyperopt 参数值选列, # 避免每轮 hyperopt 重跑 populate_indicators(性能提升 ~10x) # ---------------------------------------------------------------- # ma_short 候选范围 [5, 20],ma_long 候选范围 [21, 60] _MA_SHORT_RANGE = range(5, 21) # 16 个周期 _MA_LONG_RANGE = range(21, 61) # 40 个周期 def populate_indicators(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame: # 预计算所有候选 MA for p in self._MA_SHORT_RANGE: dataframe[f"ma_{p}"] = dataframe["close"].rolling(p).mean() for p in self._MA_LONG_RANGE: dataframe[f"ma_{p}"] = dataframe["close"].rolling(p).mean() # 固定周期指标(只算一次) dataframe["rsi"] = self._compute_rsi(dataframe["close"], self.RSI_PERIOD) dataframe["atr"] = self._compute_atr(dataframe) dataframe["adx"] = self._compute_adx(dataframe) dataframe["macd"], dataframe["macd_sig"] = self._compute_macd(dataframe["close"]) # 日线趋势(merge 1d MA20) informative_1d = self.dp.get_pair_dataframe(metadata["pair"], "1d") if not informative_1d.empty and "date" in dataframe.columns: informative_1d = informative_1d.copy() informative_1d["daily_ma20"] = informative_1d["close"].rolling(self.DAILY_MA_PERIOD).mean() informative_1d["daily_bull"] = (informative_1d["close"] > informative_1d["daily_ma20"]).astype(int) informative_1d["date"] = pd.to_datetime(informative_1d["date"]) # 以 1h K 线的 date 对应的"当日"去匹配日线:用 merge_asof 向前对齐 df_sorted = dataframe.sort_values("date").reset_index(drop=True) df_sorted["date"] = pd.to_datetime(df_sorted["date"]) info_sorted = informative_1d[["date", "daily_bull"]].sort_values("date").reset_index(drop=True) merged = pd.merge_asof( df_sorted, info_sorted, on="date", direction="backward" ) dataframe = merged dataframe["daily_bull"] = dataframe["daily_bull"].ffill().fillna(-1).astype(int) else: dataframe["daily_bull"] = -1 # 获取失败时不过滤 return dataframe # ---------------------------------------------------------------- # 入场信号 —— 六因子过滤(多空独立 ADX + 日线趋势) # ---------------------------------------------------------------- def populate_entry_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame: ms = self.ma_short.value ml = self.ma_long.value if ms >= ml or f"ma_{ms}" not in dataframe or f"ma_{ml}" not in dataframe: dataframe["enter_long"] = 0 dataframe["enter_short"] = 0 return dataframe cur_short = dataframe[f"ma_{ms}"] cur_long = dataframe[f"ma_{ml}"] prev_short = cur_short.shift(1) prev_long = cur_long.shift(1) # 多空使用独立 ADX 阈值 long_adx_ok = dataframe["adx"] >= self.adx_threshold.value short_adx_ok = dataframe["adx"] >= self.adx_threshold_short.value # 日线趋势:1=牛,0=熊,-1=未知 daily_bull = dataframe.get("daily_bull", pd.Series(-1, index=dataframe.index)) bull_ok = (daily_bull != 0) # 牛市或未知 → 可做多 bear_ok = (daily_bull != 1) # 熊市或未知 → 可做空 # 波动率过滤:ATR/Close 过高 → 极端行情,不入场 atr_pct = dataframe["atr"] / dataframe["close"] vol_ok = atr_pct <= self.MAX_ATR_PCT long_cond = ( (prev_short < prev_long) & (cur_short > cur_long) & (dataframe["rsi"] < self.rsi_overbought.value) & (dataframe["macd"] > dataframe["macd_sig"]) & long_adx_ok & bull_ok & vol_ok ) short_cond = ( (prev_short > prev_long) & (cur_short < cur_long) & (dataframe["rsi"] > self.rsi_oversold.value) & (dataframe["macd"] < dataframe["macd_sig"]) & short_adx_ok & bear_ok & vol_ok ) dataframe.loc[long_cond, "enter_long"] = 1 dataframe.loc[short_cond, "enter_short"] = 1 return dataframe def populate_exit_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame: dataframe["exit_long"] = 0 dataframe["exit_short"] = 0 return dataframe # ---------------------------------------------------------------- # ATR 动态止损止盈 # ---------------------------------------------------------------- def custom_exit( self, pair: str, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, **kwargs: Any, ) -> str | None: dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe) if dataframe.empty: return None last = dataframe.iloc[-1] atr = float(last["atr"]) if not pd.isna(last["atr"]) else 0.0 if atr <= 0: return None stop_dist = self.atr_sl_mult.value * atr entry = trade.open_rate # 最大持仓时长:超过 MAX_HOLD_HOURS 强平(防横盘消耗) hold_hours = (current_time - trade.open_date_utc).total_seconds() / 3600 if hold_hours >= self.MAX_HOLD_HOURS: return "max_hold_timeout" # T1 触发前:固定 ATR 止损(T1后止损由 custom_stoploss 跟踪接管) if trade.nr_of_successful_exits == 0: if trade.is_short: if current_rate >= entry + stop_dist: return "atr_stop_short" else: if current_rate <= entry - stop_dist: return "atr_stop_long" return None def adjust_trade_position( self, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, min_stake: float | None, max_stake: float, current_entry_rate: float, current_exit_rate: float, current_entry_profit: float, current_exit_profit: float, **kwargs: Any, ) -> float | None: """ 加仓 & 部分平仓逻辑(与 bot.py 对齐) 加仓规则: - 首次建仓 60%(通过 stake_amount × SCALE_INIT_RATIO 控制初始仓位) - 触发条件:价格顺方向移动 SCALE_TRIGGER_MULT × ATR - 仅加仓一次(nr_of_successful_entries == 1 时检查) 部分平仓规则: - 1R 处平掉 50%(返回负数 stake,Freqtrade 卖出对应仓位) - 仅触发一次(nr_of_successful_exits == 0 时检查) """ dataframe, _ = self.dp.get_analyzed_dataframe(trade.pair, self.timeframe) if dataframe.empty: return None last = dataframe.iloc[-1] atr = float(last["atr"]) if not pd.isna(last["atr"]) else 0.0 if atr <= 0: return None stop_dist = self.atr_sl_mult.value * atr entry = trade.open_rate nr_entries = trade.nr_of_successful_entries nr_exits = trade.nr_of_successful_exits # ---- 加仓逻辑(仅执行一次)---- if nr_entries == 1: scale_trigger = ( entry + atr * self.SCALE_TRIGGER_MULT if not trade.is_short else entry - atr * self.SCALE_TRIGGER_MULT ) triggered = ( current_rate >= scale_trigger if not trade.is_short else current_rate <= scale_trigger ) if triggered: add_stake = trade.stake_amount * (self.SCALE_ADD_RATIO / self.SCALE_INIT_RATIO) add_stake = min(add_stake, max_stake) if min_stake and add_stake >= min_stake: return add_stake # ---- 部分平仓逻辑(1R 处,仅执行一次)---- # T1 触发后止损由 custom_stoploss 跟踪接管(利润自由奔跑) if nr_exits == 0: target1 = ( entry + stop_dist * self.PARTIAL_TARGET_MULT if not trade.is_short else entry - stop_dist * self.PARTIAL_TARGET_MULT ) hit = ( current_rate >= target1 if not trade.is_short else current_rate <= target1 ) if hit: reduce_stake = -(trade.stake_amount * self.PARTIAL_CLOSE_RATIO) return reduce_stake return None # ---------------------------------------------------------------- # 跟踪止损 —— T1 触发后启用,T1前直接用固定止损 # ---------------------------------------------------------------- def custom_stoploss( self, pair: str, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, after_fill: bool, **kwargs: Any, ) -> float: """ T1(部分平仓)触发前:使用固定 ATR 止损(由 custom_exit 处理,此处返回默认) T1 触发后:切换为 ATR 跟踪止损,以 max_rate/min_rate 为基准 """ # T1 触发前,返回 stoploss 默认值(custom_exit 处理固定止损) if trade.nr_of_successful_exits == 0: return self.stoploss dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe) if dataframe.empty: return self.stoploss last = dataframe.iloc[-1] atr = float(last["atr"]) if not pd.isna(last["atr"]) else 0.0 if atr <= 0: return self.stoploss trail_dist = self.atr_trail_mult.value * atr if trade.is_short: # 跟踪最低价,止损在 min_rate + trail_dist stop_price = (trade.min_rate or current_rate) + trail_dist if stop_price >= current_rate: return -0.001 # 立即平仓 # 返回相对于 current_rate 的负数百分比 return (stop_price / current_rate) - 1.0 else: # 跟踪最高价,止损在 max_rate - trail_dist stop_price = (trade.max_rate or current_rate) - trail_dist if stop_price <= 0 or stop_price >= current_rate: return -0.001 # stoploss_from_absolute 将绝对价格转为相对值 try: return stoploss_from_absolute(stop_price, current_rate, is_short=False) except Exception: return (stop_price / current_rate) - 1.0 # ---------------------------------------------------------------- # 日线 informative pairs(Freqtrade 内部数据接口) # ---------------------------------------------------------------- def informative_pairs(self): pairs = self.dp.current_whitelist() return [(pair, "1d") for pair in pairs] |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 211.5s
ℹ️ This strategy uses custom_stoploss() — freqtrade only
re-checks these once per 1h candle by default, not against the price movement within it.
For a more accurate read, re-run this backtest locally with --timeframe-detail 1m
(or 5m — freqtrade's own docs use 5m detail for an hourly strategy as a lighter
alternative). Freqle doesn't do this for every check here: multiplying every
League/sweep backtest by a finer detail timeframe is more compute than the sandbox can sustain
across every indexed strategy. why this matters →
- statistically significant edge (p=0.00)
- 100% of resampled runs stayed profitable
- profitable across 84% of rolling 3-month windows
- comfortably beat buy-and-hold
Resampling the trade sequence 2,000× shows the spread of results this edge could plausibly produce — separating a dependable strategy from one that got lucky once.
Loading charts…
Monthly breakdown
| Month | Regime | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|---|
| Dec 2025 | bearish trending low vol | 61 | +93.88 | 6.37 | 35 | 26 | 57.4 | -2.85 | 22h 20m |
| Nov 2025 | bearish trending high vol | 67 | -31.33 | -6.71 | 28 | 39 | 41.8 | -3.43 | 21h 52m |
| Oct 2025 | bearish trending low vol | 65 | -19.63 | -4.84 | 28 | 37 | 43.1 | -2.5 | 19h 01m |
| Sep 2025 | bullish choppy low vol | 72 | +52.92 | 2.73 | 37 | 35 | 51.4 | -1.35 | 23h 52m |
| Aug 2025 | bearish choppy low vol | 68 | +51.10 | 1.92 | 37 | 31 | 54.4 | -1.01 | 19h 57m |
| Jul 2025 | bullish choppy low vol | 87 | +321.29 | 21.78 | 69 | 18 | 79.3 | -1.73 | 24h 35m |
| Jun 2025 | bearish choppy low vol | 32 | +65.12 | 10.50 | 21 | 11 | 65.6 | -1.19 | 19h 17m |
| May 2025 | bullish trending low vol | 96 | +86.01 | 2.44 | 49 | 47 | 51.0 | -5.67 | 20h 36m |
| Apr 2025 | bullish choppy low vol | 72 | +80.08 | 2.74 | 38 | 34 | 52.8 | -6.83 | 22h 27m |
| Mar 2025 | bearish trending high vol | 76 | +49.58 | 1.34 | 37 | 39 | 48.7 | -10.06 | 22h 47m |
| Feb 2025 | bearish trending low vol | 72 | -105.78 | -11.98 | 27 | 45 | 37.5 | -10.2 | 23h 30m |
| Jan 2025 | bearish choppy low vol | 65 | -37.50 | -6.29 | 26 | 39 | 40.0 | -5.1 | 25h 06m |
| Dec 2024 | bullish trending low vol | 68 | -58.84 | -7.01 | 25 | 43 | 36.8 | -3.5 | 27h 24m |
| Nov 2024 | bullish trending low vol | 69 | +200.24 | 12.80 | 41 | 28 | 59.4 | -7.6 | 26h 06m |
| Oct 2024 | bullish choppy low vol | 94 | +25.81 | -0.79 | 52 | 42 | 55.3 | -10.06 | 21h 18m |
| Sep 2024 | bearish choppy low vol | 88 | +57.85 | 1.80 | 43 | 45 | 48.9 | -11.59 | 26h 46m |
| Aug 2024 | bearish choppy high vol | 53 | -200.40 | -28.73 | 10 | 43 | 18.9 | -10.36 | 19h 49m |
| Jul 2024 | bearish trending low vol | 78 | +13.28 | -2.41 | 38 | 40 | 48.7 | -4.56 | 23h 28m |
| Jun 2024 | bearish choppy low vol | 54 | +24.08 | 1.54 | 30 | 24 | 55.6 | -5.74 | 24h 27m |
| May 2024 | bullish choppy high vol | 60 | +30.72 | 1.31 | 29 | 31 | 48.3 | -5.5 | 27h 08m |
| Apr 2024 | bearish choppy high vol | 66 | -43.06 | -7.83 | 22 | 44 | 33.3 | -6.49 | 24h 17m |
| Mar 2024 | bullish trending high vol | 91 | -77.39 | -9.45 | 32 | 59 | 35.2 | -5.74 | 22h 07m |
| Feb 2024 | bullish trending low vol | 88 | +60.27 | 2.72 | 46 | 42 | 52.3 | -2.24 | 25h 12m |
| Jan 2024 | bearish choppy high vol | 73 | -52.80 | -7.80 | 31 | 42 | 42.5 | -3.8 | 22h 21m |
| Dec 2023 | bullish trending low vol | 113 | +198.37 | 6.84 | 58 | 55 | 51.3 | -1.75 | 25h 13m |
| Nov 2023 | bullish trending low vol | 96 | +289.46 | 16.24 | 62 | 34 | 64.6 | -2.24 | 23h 33m |
| Oct 2023 | bullish trending low vol | 60 | +86.82 | 6.76 | 36 | 24 | 60.0 | -1.41 | 25h 55m |
| Sep 2023 | bearish choppy low vol | 75 | +27.39 | -0.64 | 33 | 42 | 44.0 | -1.04 | 24h 07m |
| Aug 2023 | bearish choppy low vol | 58 | +42.09 | 3.39 | 27 | 31 | 46.6 | -2.1 | 27h 39m |
| Jul 2023 | bullish trending low vol | 85 | +45.25 | 0.18 | 40 | 45 | 47.1 | -5.41 | 26h 45m |
| Jun 2023 | bullish trending low vol | 79 | -34.45 | -6.24 | 33 | 46 | 41.8 | -3.98 | 23h 14m |
| May 2023 | bearish choppy low vol | 62 | +52.86 | 4.08 | 36 | 26 | 58.1 | -3.16 | 27h 29m |
| Apr 2023 | bullish trending low vol | 76 | -1.26 | -2.99 | 32 | 44 | 42.1 | -3.59 | 27h 24m |
| Mar 2023 | bullish trending high vol | 88 | +20.60 | -2.09 | 42 | 46 | 47.7 | -4.87 | 21h 27m |
| Feb 2023 | bullish trending low vol | 69 | +49.89 | -0.18 | 30 | 39 | 43.5 | -4.75 | 21h 44m |
| Jan 2023 | bullish trending low vol | 78 | +52.87 | 1.14 | 40 | 38 | 51.3 | -3.62 | 27h 39m |
| Dec 2022 | bearish trending low vol | 72 | +46.52 | 2.61 | 38 | 34 | 52.8 | -2.04 | 26h 38m |
| Nov 2022 | bearish trending high vol | 60 | +101.06 | 6.05 | 34 | 26 | 56.7 | -3.3 | 23h 01m |
| Oct 2022 | bullish choppy low vol | 73 | +16.35 | -0.15 | 32 | 41 | 43.8 | -4.5 | 27h 21m |
| Sep 2022 | bearish choppy high vol | 59 | +66.53 | 2.47 | 31 | 28 | 52.5 | -2.92 | 22h 16m |
| Aug 2022 | bullish choppy high vol | 73 | +130.62 | 7.85 | 42 | 31 | 57.5 | -1.6 | 21h 25m |
| Jul 2022 | bullish trending high vol | 74 | +112.24 | 6.42 | 36 | 38 | 48.6 | -7.32 | 20h 07m |
| Jun 2022 | bearish trending high vol | 29 | +15.88 | -1.85 | 12 | 17 | 41.4 | -3.81 | 26h 02m |
| May 2022 | bearish trending high vol | 29 | -26.92 | -10.67 | 11 | 18 | 37.9 | -4.8 | 20h 46m |
| Apr 2022 | bearish choppy high vol | 45 | -21.93 | -5.58 | 19 | 26 | 42.2 | -5.55 | 25h 59m |
| Mar 2022 | bullish choppy high vol | 58 | +94.84 | 8.45 | 35 | 23 | 60.3 | -3.55 | 25h 49m |
| Feb 2022 | bearish trending high vol | 61 | +38.20 | 1.36 | 31 | 30 | 50.8 | -4.71 | 18h 57m |
| Jan 2022 | bearish trending high vol | 42 | +1.68 | -2.46 | 20 | 22 | 47.6 | -3.47 | 24h 11m |
| Dec 2021 | bearish trending high vol | 58 | +157.83 | 15.07 | 38 | 20 | 65.5 | -1.79 | 17h 30m |
| Nov 2021 | bearish trending high vol | 56 | +105.64 | 8.14 | 32 | 24 | 57.1 | -2.69 | 22h 30m |
| Oct 2021 | bullish trending high vol | 83 | +98.32 | 4.33 | 42 | 41 | 50.6 | -3.49 | 24h 14m |
| Sep 2021 | bearish trending high vol | 47 | +171.12 | 17.45 | 28 | 19 | 59.6 | -7.76 | 20h 38m |
| Aug 2021 | bullish trending high vol | 79 | +148.24 | 8.52 | 43 | 36 | 54.4 | -9.84 | 26h 17m |
| Jul 2021 | bullish trending high vol | 50 | +38.99 | 2.34 | 26 | 24 | 52.0 | -12.84 | 25h 11m |
| Jun 2021 | bearish trending high vol | 25 | -49.40 | -18.30 | 9 | 16 | 36.0 | -8.49 | 16h 41m |
| May 2021 | bearish trending high vol | 62 | +70.74 | -0.43 | 26 | 36 | 41.9 | -12.06 | 16h 52m |
| Apr 2021 | bearish choppy high vol | 77 | +212.82 | 11.02 | 43 | 34 | 55.8 | -7.1 | 20h 05m |
| Mar 2021 | bullish choppy high vol | 59 | +70.18 | 5.47 | 27 | 32 | 45.8 | -14.76 | 26h 00m |
| Feb 2021 | bullish trending high vol | 54 | +111.10 | 9.28 | 29 | 25 | 53.7 | -14.17 | 25h 18m |
| Jan 2021 | bullish trending high vol | 63 | +181.44 | 13.96 | 34 | 29 | 54.0 | -14.76 | 20h 28m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2025 | 833 | +605.74 | 1.73 | 432 | 401 | 51.9 | -10.2 | 22h 16m |
| 2024 | 882 | -20.24 | -3.13 | 399 | 483 | 45.2 | -11.59 | 24h 10m |
| 2023 | 939 | +829.89 | 2.48 | 469 | 470 | 49.9 | -5.41 | 25h 03m |
| 2022 | 675 | +575.07 | 2.35 | 341 | 334 | 50.5 | -7.32 | 23h 29m |
| 2021 | 713 | +1317.02 | 7.53 | 377 | 336 | 52.9 | -14.76 | 22h 09m |
Trade charts — best 2 and worst 2 performing pairs (full OHLC candles are expensive to render for every pair)
Backtests — over a market period
Backtest this strategy over a chosen crypto-cycle period. These don't affect the League ranking, and need that period's candle data downloaded.
Log in or sign up to run backtests.
| Period | Range | Total % | Win % | Max DD | Trades | |
|---|---|---|---|---|---|---|
| 2020 · DeFi Summer & Pre-Halving Rally | 20200101-20210101 | not run | ||||
| 2021 · Institutional Bull Market | 20210101-20220101 | not run | ||||
| 2022 · Post-Bull Crash & Macro Tightening | 20220101-20230101 | not run | ||||
| 2023–2024 · Recovery & ETF Anticipation | 20230101-20250101 | not run | ||||
| 2025–2026 · Current Cycle | 20250101-20260101 | not run | ||||
Walk forward
Out-of-sample backtest on recent data · 33 pairs · 20260101-20260701.
Backtest trust check
no lookahead patterns · 1 thing(s) worth reviewing before trusting the numbers
| Line | Pattern | Detail | |
|---|---|---|---|
| 64 | review | unbounded_dca | position_adjustment_enable is on but max_entry_position_adjustment is unset (default -1 = unlimited), so nothing caps how many times a losing position can be added to. backtesting.py only bounds entries when that value is > -1 |
ran by Ron · took s
Lookahead analysis
Freqtrade logsno lookahead bias detected
20 signal(s) analysed · 0 biased entries · 0 biased exits
ran by Ron · took 55.8s