FilAggressorBurstContinuation
假设数
FIL Aggressor-Burst Continuation, Long-Short (FILUSDT.BINANCE USD-M 1H: follow a >=4-sigma, >=5x-volume, extreme-close-location hour for a fixed 4 hours, flat ~98% of the time)
假设数
Adapted from a digest by 小草 on FMZ Quant, '5天赚80倍,高频策略的威力' (2020-11-04, https://www.fmz.com/digest-topic/6228). The source runs a sub-second maker bot on the Binance FIL perpetual. It infers short-term direction from recent aggressor trades and sizes up when volume surges. The author says it only works when a market is highly active and contested, and was mostly idle otherwise. The sub-second maker version cannot be tested here: our backtests are taker-filled, and at 100ms holds the capture sits far below the ~0.10% round trip. Our 6-month taker_ratio history is also too short. This hypothesis keeps the author's two claims, that aggressive one-sided flow predicts the next move and that the edge exists only in rare high-activity bursts. It moves them to a horizon that pays for the fees. It is a single-leg, long-short, pure-OHLCV strategy on FILUSDT.BINANCE (the author's own instrument, with 1H history back to 2020-10-16, about 52k bars). It stays flat until a one-hour bar shows an aggressor burst. A burst needs three things: an absolute 1h log return >= 4x the trailing 30-day std of hourly returns, dollar volume >= 5x the trailing 30-day median hourly dollar volume, and a close in the outer quarter of the bar's range on the side of the move (close-location value |CLV| > 0.5 with the same sign as the return). CLV is our bar-level proxy for aggressor imbalance. The strategy enters in the burst direction at the next bar and exits after exactly 4 hours. Pre-screen on FIL 1H (non-overlapping events): 172 events, mean signed 4h forward move +0.64%, positive in 6 of 7 calendar years (2023 was -0.32%). Honest caveat: that cell was the best of 18 screened (3 symbols x 3 holds x 2 thresholds), so the selection is disclosed. Neighbouring cells were weaker: FIL 12h +1.06% but mixed by year; FIL z3/v3 at 4h only +0.05%. The deflation step should count this. The same rule on DOGE gave +0.37% and on LINK +0.06%, so we expect the edge to be FIL-specific and fragile.
假设数
Iteration 2 makes the analyst's one change. A new boolean allow_short (default False) blocks SELL entries: in the last backtest, shorts lost -$60.6k over 72 trades while longs made +$157.5k over 91. The signal and thresholds are unchanged (z 4, volume 5x, CLV 0.5, 4h hold, 720-bar lookback). Sizing now caps notional at position_fraction*equity at 1.0x. The leverage multiplier is removed and config leverage is 1.0. An 8% fill_buffer haircut on the signal-bar close absorbs the price move from the signal close to the next-bar fill. That move is what pushed avg_position_pct to 112%. Disclosure: dropping shorts is a choice made after seeing the backtest. Count it as another trial on top of the 18 pre-screened cells. Expected: about 90 trades, PF about 1.5, avg trade about 1.2%. If long-only PF stays below 1.4, the premise should be abandoned.
实现
Trades FIL USD-M perpetual on 1H bars. It waits for a burst hour that meets three conditions: the absolute 1h log return is at least 4x the trailing 30-day std, dollar volume is at least 5x the trailing 30-day median, and the close-location value is beyond 0.5 on the side of the move. It then enters in the burst direction on the next bar and exits after exactly 4 hours. Long-only by default (allow_short=False). The optimizer can turn shorts back on.
验证结果
Record in the run metadata that the tested variant is long-only, count it as an extra trial in the deflation step, and have the analyst judge it against the long-only subset of the pre-screen.
验证结果
The hypothesis title and description say long-short, but allow_short defaults to False, so this iteration trades long only. The analyst's iterate verdict asked for this change, the developer disclosed it as an extra trial, and the short path is still in the code behind a parameter. So I am treating it as a deliberate, recorded deviation, not a mis-implementation. The pre-registered hypothesis is still long-short, though.
验证结果
Consider an optional catastrophic stop, for example a bracket with stop_loss_pct around 8-10%, or a position_fraction below 1.0, so that one reversal cannot cost more than a few percent of equity.
验证结果
Each position is sized at up to 1.0x equity and has no hard stop; only the 4-hour time exit closes it. The hypothesis names no stop, so this is not a mismatch. But a violent reversal after a burst, which FIL has had (moves of 15-25% within hours), could lose a large share of equity on a single trade.
验证结果
Acceptable. Optionally, derive entry time from position.ts_opened.
验证结果
_entry_ts lives only in memory. After a restart with a position open, _entry_ts is 0, so should_exit returns True and the position is closed on the next bar. That is safe, but the holding time will differ from a replay.
验证结果
None needed.
验证结果
min_bars_required() is overridden to return 2. Warm-up is handled internally, because the signal stays 0 until the 720-bar deque is full, so this override is correct.
验证结果
The smoke test is 25 long trades over 834 days, and the ledger is internally consistent: 2.80% x 25 is about +70%, against +71.9% reported, with PF 3.13. Three things cut against it. The cell is the best of at least 19 trials (18 pre-screened cells plus dropping shorts after seeing the backtest). The largest win ($35.5k) is about half of total PnL. Return skew is 3.1. Check year-by-year PnL and single-trade concentration before optimizing. On the full span, expect roughly 90 long trades, which leaves little room for walk-forward and holdout splits.
回测评审
The trades match the mechanism: 95 long-only entries, each held exactly 4h, all entered on the bar after a burst. The allow_short=false change from iteration 1 was applied as asked.
回测评审
Per-trade return is 1.26%, about 8x the 0.15% floor. PF is 1.69, commissions are 4.2% of gross and impact is 11.6%. Capacity is about $7.5M.
回测评审
6 of 7 years are positive by trade PnL; only 2022 lost money (-$13.3k).
回测评审
Max drawdown is 19.1%, under the 20% futures default, with no open position at the end.
回测评审
QA's concentration concern is partly borne out. The largest win ($49.2k) is 39% of the $124.8k net PnL, and the top 3 trades are 74%. November 2025 alone is +39.8%.
回测评审
Sharpe is 0.58, its confidence interval [-0.20, 1.19] straddles 0, and PSR is 0.64. The book is flat about 99% of the time, so Sharpe is mechanically low. Clearing 1.0 after deflation is unlikely.
回测评审
The cell was the best of 18 pre-screened, plus dropping shorts after seeing the backtest.
回测评审
The edge exists only in the stressed-volatility regime. The normal regime lost 17.6%, and the drawdown took 1457 days to recover.
回测评审
Suspected measurement quirk, not verified: pairs of daily returns that cancel exactly (e.g. -3.059%/+3.1555%) recur on days with no trades. They add variance without changing return. Flag for engine review.
分析
ONE change, one expected metric move. The short side destroys value: longs 91 trades net +$157.5k, shorts 72 trades net -$60.6k (short win rate 36% vs long 46%). This answers QA's question: the short side does not just add nothing, it takes away. Change: add a boolean parameter allow_short (default False). In should_enter, return SELL only when allow_short is true, so the optimizer can still test it. Keep everything else unchanged: z_thresh 4, vol_mult 5, clv_thresh 0.5, hold 4h, lookback 720. Expected: profit_factor rises from 1.28 to about 1.5 or higher, and avg_trade_return_pct rises from 0.75% to about 1.2% on roughly 90 trades. If long-only PF stays below 1.4, the burst-continuation premise is too weak and the run should be abandoned, not iterated again. Disclosure for deflation: dropping shorts is a choice made after seeing this backtest. Count it as another trial on top of the 18 pre-screen cells. Also cap notional at position_fraction*equity. Today avg_position_pct is 112% (leverage drifts to 1.05-1.06x). Hold it at 1.0x so drawdown (34%) is not inflated. ENGINE/METRICS NOTE, not a developer fix: the report's daily_returns series has phantom paired days, about -6% then +6.5%, repeating on a 17-day cadence from 2021-10-20 to 2022-09-09 (e.g. 2021-10-20/21, 2021-11-06/07, 2022-06-15/16, 2022-08-22/23). No trade exists on those dates and the equity curve is flat. Sharpe 0.39, Sortino, volatility, VaR/CVaR, max-DD duration and the stress/regime tables are all contaminated by these rows. Trade-level PnL reconciles exactly to total_return (+$96,856). Mechanism not verified; escalate to engine review before the optimizer uses Sharpe as its objective.
Stratmill 是研究与模拟交易工具,不提供财务建议,也不是经纪商。回测与模拟结果均为假设性结果。交易存在亏损风险。