Strategies
ETH 双 EMA 同步拐点与固定价差止盈:FMZ 教学源码补全实验
Outcome: Abandoned
EthBinanceSynchronizedEmaTurningPoints
Outcome Summary
After two iterations, the ETH adaptation reached backtest review using hourly EMA periods of 10 and 21, although the hypothesis described 10 and 20. It lost 47.24% across 4,100 closed trades, with Sharpe -1.345 and negative returns in every reported year. Review abandoned the run for negative expectancy and losing reversal exits, so optimization and later review stages were not reached. The summary could not be saved to the specified outbox because this session has read-only filesystem access.
Hypothesis
Derived by the Research Lead from "数字货币期货双均线拐点策略(教学)" by 发明者量化-小小梦 (fmz) https://www.fmz.com/digest-topic/8479: 来源提供完整信号与退出公式;研究负责人补全未显示的参数默认值、权益相对仓位和 5 分钟离散执行时序。 依据发明者量化-小小梦《数字货币期货双均线拐点策略(教学)》的明确代码规则构建。保留 ETHUSDT.BINANCE、1 小时 EMA、同步局部极值信号、双向交易、反向平仓后反手及绝对美元价差止盈。公开页面和附件未提供 ema1Period、ema2Period、profitTarget 的默认数值,因此本实验明确补全为 10、20、50 美元,不宣称这些是作者默认值。将原源码 500 毫秒轮询离散为每根已完成 5 分钟 K 线评估一次,属于执行采样适配,不能复现轮询间发生的交易。使用已完成小时线计算指标,市价订单在当前 5 分钟信号线收盘提交并成交。五张图片分别为教学封面、ETH Binance 收益概览、带两条 EMA 与 L/S/CL/CS 标记的小时图、另一张收益截图和运行状态日志;图表展示反复开平仓,日志可见 0.1 ETH 下单,但图片中的收益均未经本平台验证。采用权益相对仓位代替固定数量,不新增趋势过滤、止损或冷却条件。
这是提交源码的机制检验,因此保留来源指定的 ETH 与 Binance 小时信号,尽管 Binance 占比 55.5%、单品种占比 62.5% 已高于政策目标。换成跨市场对冲或期权会改变提交规则。双 EMA 同步局部极值不同于失败的 LTC 10/20 SMA 交叉,不据既有失败拒绝测试。corpus_concentration 为空,无法确认 ETH 或 1 小时的近期使用份额。此实验补充双向交易,针对多头占比 79.8% 的偏重,但不声称解决全部组合多样性缺口。
negative_expectancy: decline optimization of this parameter-completed ETH adaptation. A substantial executed sample loses after modeled costs and credited funding, with negative returns in every reported year and losing reversal exits. No verified implementation defect provides a concrete recovery path. This rejects the Research Lead's operationalization, not the source author's strategy or EMA turning-point strategies generally. The exact outbox file could not be written because this session permits read-only filesystem access.
Implementation
ETH Binance long/short synchronized hourly EMA extrema evaluated on five-minute closes, with opposite-signal reversals and absolute USD profit targets. Uses 10% equity notional at 1x without added stops, filters or cooldowns.
Fixes Layer 1.5 by changing ema2Period from 20 to 21 in the fallback and config. The narrative baseline 20 conflicts with the explicit research domain [21, 60]; 21 is the smallest permitted adjustment. Existing signal, execution, reversal, exit and sizing logic is preserved.
Verification Results
Set hold_reference_price only after the reversal or entry is confirmed (e.g. in on_position_opened/on_position_changed), or keep the old value when the submit is dropped.
position_size() writes hold_reference_price as a side effect. In the reversal path (should_exit) it is overwritten before _submit_entry runs. If _submit_entry drops or shrinks the order (margin_capped_size, entry in flight, paused), the existing position keeps a profit-target anchor that is no longer its own. A capped reversal could also leave a smaller net position than intended. None of this happens in a normal 1x backtest, because the reversal order is 0.2x equity.
Seed hold_reference_price from position.avg_px_open when it is 0 and a position is open.
Paper/live restart: hold_reference_price restarts at 0.0. With an open long position, distance = price - 0 is far above profitTarget, so the position exits on the first post-restart bar. Hourly EMA state is rebuilt from warmup, which is fine. The backtest never restarts, so this only matters in paper.
Optionally detect a crossed hour boundary (ts // hour > last // hour) and use the last close before the boundary.
The hourly sample is taken only when a 5-minute bar is stamped exactly on the hour (ts % 3.6e12 == 0; bars are close-stamped, so this is correct). If that one 5-minute bar is missing from the data, the whole hour is skipped and the EMAs advance over two hours in one step. The effect is minor on Binance data.
Sandbox (46 days, unoptimized): 115 closed trades, avg_trade_return_pct -0.24%, PF 0.51, win rate 14.8%, max 25 consecutive losses, commissions 40% of gross. That is about 2.5 round trips a day. Over the ~2,443-day history this projects to roughly 6,000 trades at about 0.10% round-trip taker cost, so the mechanism needs well over 0.15% gross per trade. The $50 target (~1.5-2% of ETH) is reached rarely, and most exits are signal reversals that pay fees twice on double-size orders. The analyst should check whether reversal-exit trades alone carry any gross edge before optimizing. If the full backtest shows >1000 trades with PF near 1, treat the mechanism as measured rather than re-tuning it.
Backtest Review
- Sharpe
- -1.34
- Total return
- -47.24%
- Max drawdown
- 47.87%
- Trades
- 4100
- Win rate
- 29.5%
- Profit factor
- 0.85
Reliable 2,419-day evaluation with 4,100 closed trades, balanced long/short activity, valid accounting and no terminal unrealized gain.
Code implements synchronized hourly EMA turns, reversal priority and an absolute-price profit target; sampled trades show opposite-direction reversals.
Measured negative expectancy: average net trade return -0.1163% versus the supplied Binance review floor of +0.15%; PF 0.846 and total return -47.24%.
Sharpe -1.345, with its reported confidence interval entirely negative; every reported calendar year lost money. QA's economic concern is borne out.
3,096 exits matched a same-time opposite-direction entry and averaged -89.19 USDT net. This supports reversal-exit losses; gross reversal expectancy was not independently reconstructed.
The sampled buy-and-hold curve returned approximately +1,431.93% with 78.28% drawdown. Strategy drawdown was 47.87%; rejection rests on negative net expectancy, not benchmark underperformance.
The evaluated slow EMA is 21 rather than the description's completed default of 20. That discrepancy merits documentation but supplies no demonstrated repair for the losses.
Iteration History
Verification failed (Layer 1.5 — hypothesis/config consistency) [class=hypothesis_mismatch]: - optimization_plan baseline ema2Period is missing or outside its domain
Outcome Summary
This parameter-completed adaptation needs evidence of positive net expectancy before optimization; its rejection does not establish that the source strategy or EMA turning-point strategies generally fail.
Backtest review returned abandon because the substantial executed sample showed negative expectancy after modeled costs and credited funding, with no verified implementation defect offering a concrete recovery path. Optimization, post-optimization analysis, and risk review were not reached.
Trade ETH Binance futures long and short on synchronized hourly EMA turning points, evaluated at five-minute closes, with opposite-signal reversals and a $50 price-distance profit target.
Across 2,419 days and 4,100 closed trades, net return was -47.24%, Sharpe was -1.345, and maximum drawdown was 47.87%. Average net trade return was -0.1163%, profit factor was 0.846, and every reported calendar year lost money.
Analysis
数字货币期货双均线拐点策略(教学)
Backtest and paper results are hypothetical. Trading involves risk of loss.