Case study · Backtest
🗓 Backtest period: 2020-01-01..2026-11-01
Spec ID: spec-multitimeframe-momentum-us-stocks-1783167355_v36 · Generated: 2026-11-05 09:56 UTC
Cluster: Momentum · Sub Cluster: Weekly-Daily Trend Alignment
Buy stocks only when daily and completed-week price trends are simultaneously bullish. Size positions using ATR-based risk controls and exit on trend deterioration, a trailing stop, or a holding-period limit.
The strategy seeks to exploit persistence in stock returns associated with gradual information diffusion, investor underreaction, and sustained institutional flows. Weekly trend confirmation filters for established directional moves, while daily confirmation controls entry timing. These filters may reduce countertrend entries but also delay participation and create whipsaw losses when trends reverse or prices move sideways.
[code omitted from public view] The supplied code is truncated; the exact risk-to-notional formula, trailing-stop update convention, and simultaneous entry/exit precedence are not verified.
| Param | Value | Notes |
|---|---|---|
| Data source and fields | daily_prices; close, high, low, volume_in_dollars | Daily bars |
| Daily trend | Fast SMA 20; slow SMA 50; slope lookback 5 days | Require close above fast SMA, fast SMA above slow SMA, and positive fast-SMA slope |
| Weekly trend | Fast SMA 20; slow SMA 50; slope lookback 4 weeks | Require weekly close above fast SMA, fast SMA above slow SMA, and positive fast-SMA slope |
| Weekly construction | resample_daily_to_weekly; Friday; last_available_daily_close | use_completed_week_only = true |
| Entry | long_only; weekly and daily bullish alignment required | Both alignment and bullish-entry flags are true |
| Liquidity threshold | $10,000,000 average daily dollar volume over 20 days | Strategy-level entry filter; separate backtest liquidity_filter is null |
| Position sizing | atr_volatility_adjusted_with_cap; ATR 14 days | Target risk 0.01 of equity per position; maximum position size 0.1 of equity |
| Maximum leverage | 4.0 | Portfolio ceiling, not evidence of realized leverage |
| Exits | ATR 14 days; trailing stop 3.0 × ATR; maximum holding 126 days | Exit when either daily or weekly trend is not bullish |
| Rebalancing | daily; close | daily bars, MOC (market-on-close) |
| Missing data | skip_trade_if_missing; skip_signal_if_required_price_or_volume_missing | synthetic_execution_prices_allowed = false |
| Universe selection | STOCK; top_n = 20; sort_by = capitalization | Point-in-time capitalization selection is not verified |
| Supplied symbols | AAPL, ACON, AMZN, BETR, BRK-A, BRK-B, GOODO, GOOG, GOOGL, HOLO, JNJ, JPM, MSFT, NVDA, PG, TSLA, UNH, V, WMT, XOM | All supplied identifiers use &US&STOCK; 20 listed symbols |
| Planned backtest window | 2020-01-01..2026-11-01 | Bar = 1d; wfa = null; position_limits = null |
| Declared data period | 2018-01-01..2023-01-01 | Does not cover the full planned window; effective tested endpoint is unverified |
| Annualization start | 2020-01-02 | Supplied measurement origin |
| Initial capital | $1,000,000 | Default visible in supplied constructor; not explicitly set in rule_params |
| Commissions | $0.0040 per share, minimum $1.00 per order, capped at 1.00% of trade value | Charged per fill by the results module; all metrics are net of them |
| Slippage | 0 bps — not applied | Not an omission — MOC (market-on-close) fills at the auction print the backtest uses |
| Costs not modelled | short borrow fees / rebate, margin financing on leverage, market impact, exchange/regulatory/clearing pass-through fees, taxes | Excluded deliberately, not unknown |
| # | Concern | Status |
|---|---|---|
| 1 | Weekly information availability | Spec requires completed Friday-ending weeks only; verify resampling labels and holiday handling in the full implementation. |
| 2 | Indicator history and data filling | Spec skips missing inputs and prohibits synthetic execution prices; verify sufficient 50-week history and backward-only rolling calculations. |
| 3 | Signal and execution timing | Close execution follows the platform MOC convention; no same-day open execution is specified. |
| 4 | Universe and corporate actions | Unverified: historical capitalization ranks, delisted securities, identifier mappings, and consistently adjusted OHLC data require inspection. |
| 5 | Backtest coverage | Unresolved: planned end is 2026-11-01, but declared data ends 2023-01-01; reconcile the actual traded dates. |
| 6 | Charged costs | ✓ commissions $0.0040/share (min $1.00/order); slippage 0 bps — not applied |
Reported performance is net of charged commissions: total return is 59.28%, Sharpe 0.89, Sortino 1.05, and maximum drawdown 12.22%. Across 1,616 reported trades, the 35.77% win rate and 1.56 profit factor indicate dependence on larger winners rather than frequent wins; average winning and losing trades are approximately $5,717 and -$2,041. These results suggest a profitable trend-following profile in the reported run, but unresolved date coverage and universe inconsistencies limit confidence in its interpretation.
Recomputed here from the run's stored daily returns, because every annualized figure in the table above is derived from the LENGTH of that array from its first active row (years = n / 252, counted from the first trade). Only total return and max drawdown do not depend on the row count, so when the recomputed and stored values differ by a common factor, those two are the numbers to trust.
| Check | From the run's own returns | Note |
|---|---|---|
| Daily-return rows | 1,717 | 1.00x the 1,722 trading days in 2020-01-01..2026-11-01 |
| Distinct dates | 1,717 | one row per date |
| Date span | 2020-01-02 .. 2026-10-30 | |
| Sum of daily returns | 59.28% | matches the reported total return |
| Sharpe from these rows | 0.89 | stored 0.89 |
| Volatility from these rows | 9.81% | stored 9.81% |
| Max drawdown from these rows | -12.22% | stored -12.22% |
| Lowest the book stood | -1.58% | low-water mark, in units of starting capital |
| CAGR from these rows | 7.07% | stored 7.07% |
| Metric | Value |
|---|---|
| Total Return | 59.28% |
| Sharpe | 0.89 |
| Sortino | 1.05 |
| Calmar | 0.58 |
| Max Drawdown | -12.22% |
| Volatility | 9.81% |
| Beta vs SPY | 0.19 |
| Annualized from | 2020-01-02 |
| Win Rate | 35.77% |
| Profit Factor | 1.56 |
| Total Trades | 1616 |
| Symbols | 20 (AAPL, ACON, AMZN, BETR, BRK-A, BRK-B, GOODO, GOOG, GOOGL, HOLO, +10 more) |