DUCKQUANT / THE QUANT & AI DIRECTORY
Donchian distance oscillator — daily rule variant
Public rule reference · Channel momentum
Published variant · FMZ · source checked 2026-10-25
Strategy research profile
Strategy overview
Price's relationship to rolling channel extremes is smoothed and compared with a slower signal. This is a channel-derived oscillator rather than a direct trade at a Donchian boundary.
- Strategy style
- Momentum
- Rule family
- Channel momentum
- Source platform
- FMZ
- Source attribution
- ChaoZhang
- Source example / declared timeframe
- 1d
- Benchmark timeframe
- 1D · completed bars
- Primary tested assets
- Bitcoin · GLD gold ETF · QQQ Nasdaq-100 ETF
- Supplementary asset
- Ethereum · Binance spot
- Direction / sizing
- Long / cash · all available cash at entry
- Evaluation window
- 2024-01-01 → 2025-12-31
- Indicator warm-up
- Crypto 2022–2023; ETFs Jun 2021–2023
- Execution
- Next daily open · fractional units
- Initial capital
- 10,000 quote units · USD or USDT
Theoretical basis
Price changes or transformed oscillators are interpreted as evidence of continuation. Signal sign, slope and crossover are different hypotheses; agreement between related indicators is not independent confirmation.
Market-regime hypothesis
Directional acceleration or persistent momentum; the exact state convention matters.
DuckQuant editorial interpretation of the rule. These mechanisms and regime expectations are hypotheses, not independently established explanations of the measured returns.
Risks and failure modes
Abrupt reversals, correlated indicator inputs, smoothing lag and persistent exposure can dominate outcomes.
- A retrospective two-year window and ETF proxy choices do not establish general robustness.
- Daily-open fills omit order-book depth, lot constraints, taxes and intrabar stop behavior.
- Related rules and identical execution paths are not independent evidence.
Exact rule
EMA5 of 2 close-highestHigh42-lowestLow42 crosses EMA45 up/down.
Indicators and rule tokens
All thresholds, lookbacks and timing conventions are specified in the exact rule above and the downloadable adapter. Source platform settings do not override this frozen benchmark rule.
Original source
View original public source ↗ · View source code at the reviewed commit ↗
Reviewed source SHA256: ae2b911b47a017d91868ed7d55264cc141a2025eb053138fa0f5f78be4d4b01c
Reading and theoretical references
- Reviewed strategy / indicator source ↗
Published rule or indicator reference; adaptation is described separately.
Adaptation and interpretation
Daily closed-bar signals, next-open all-in long/cash, fixed fees/slippage. Short entries become cash. Source risk sizing, intraday orders, ROI, TP/SL, trailing stops, pyramiding, sessions and protections are NOT native replicas unless explicitly implemented in the stated rule. Source conflict signals resolve to cash. Common indicators are not certified TA-Lib/Pine identical.
These are normalized daily long/cash rule tests. They do not reproduce every original platform order, risk control or indicator initialization. Indicator-rule references are explicit interpretations of teaching documentation, rather than complete original published systems.
Standardized backtest results
2024-01-01 → 2025-12-31 · crypto 2022–2023 / ETF Jun 2021–2023 warm-up · 10,000 quote units initial capital · 10 bps fee + 5 bps adverse slippage per side · completed-bar signals, next-open execution.

| Asset | Rank / 100 | Net return | CAGR | Max drawdown | Sharpe | Orders | 2024 restarted return | 2025 restarted return | Double-cost return |
|---|---|---|---|---|---|---|---|---|---|
| BTCUSDT | 77 | 16.39% | 7.87% | -38.41% | 0.40 | 42 | 31.51% | -11.49% | 9.28% |
| GLD | 55 | 34.33% | 15.88% | -10.98% | 1.17 | 26 | 9.08% | 23.14% | 29.19% |
| QQQ | 67 | 7.39% | 3.62% | -14.41% | 0.38 | 34 | -1.37% | 8.88% | 2.05% |
| ETHUSDT | 50 | 18.70% | 8.94% | -50.39% | 0.41 | 36 | -5.46% | 25.55% | 12.46% |
Additional measured diagnostics
| Asset | Annualized volatility | Sortino | Calmar | vs buy & hold (pp) | Double-cost drag (pp) | Longest underwater (days) |
|---|---|---|---|---|---|---|
| BTCUSDT | 31.81% | 0.59 | 0.20 | -90.28 | 7.11 | 434 |
| GLD | 13.42% | 1.65 | 1.45 | -72.07 | 5.14 | 195 |
| QQQ | 11.14% | 0.51 | 0.25 | -44.91 | 5.34 | 350 |
| ETHUSDT | 45.04% | 0.63 | 0.18 | -11.14 | 6.24 | 495 |
Metric definitions and unavailable statistics
- annualized volatility
- Sample standard deviation of daily equity returns, including initial cash, multiplied by sqrt(365) for crypto or sqrt(252) for ETFs.
- sortino
- Mean daily return / sqrt(mean(min(return,0)^2)) × sqrt(asset annualization sessions); minimum acceptable daily return 0; N/A without downside.
- calmar
- Evaluation CAGR / absolute evaluation maximum drawdown; N/A with zero drawdown.
- relative return pp
- Strategy total net return minus same-asset buy-and-hold total net return, in percentage points; not factor-adjusted alpha.
- cost drag pp
- Base net return minus doubled-cost net return, in percentage points.
- longest underwater days
- Longest observed calendar duration from a daily equity peak until a later below-peak close, including initial cash. Unrecovered runs are censored at sample end; closed-market days between observations count as calendar time.
- monthly returns
- Continuous account month-end equity change from preceding month-end (initial cash for first month); differs from yearly cash-restart subtests.
Orders are entry/exit operations. Round-trip win rate, profit factor and trade-level holding periods are not available in the stored run and are not estimated.
Primary coverage: BTCUSDT, GLD gold ETF and QQQ Nasdaq-100 ETF; ETH is supplementary. ETF prices are raw traded USD OHLCV. Dividend entitlements accrue for prior-close holders and settle on official payment dates; paid dividends remain cash until a later entry, with no automatic reinvestment. Sharpe uses 252 ETF sessions or 365 crypto days. CAGR uses 731 calendar days. Gold spot and the Nasdaq-100 index are represented by traded proxies; USD and USDT are not FX-normalized.
Retrospective historical comparison; no sealed out-of-sample validation or future return claim. Read the complete evaluation protocol.
Data and reproduction
GLD gold ETF results · QQQ Nasdaq-100 ETF results · Asset definitions and data conventions
BTC daily equity JSON · ETH daily equity JSON · Source registry · Download engine, data and tests
Strategy identifier: community-fmz-donchian-osc