Case study · Backtest
🗓 Backtest period: 2018-01-01..2023-01-01
Spec ID: spec-multitimeframe-momentum-us-stocks-1783167355 · Generated: 2026-09-23 21:51 UTC
Cluster: Momentum · Sub Cluster: Weekly-Daily Aligned Trend Momentum
A long-only US equity strategy enters liquid stocks when completed-week and daily moving-average trends are jointly bullish. Positions are ATR-sized and exit on trend failure, a 3 ATR trailing stop, or a 126-day holding limit.
Price trends may persist because investors adjust gradually to information, institutional portfolios rebalance slowly, and herding or underreaction reinforces established moves. Requiring agreement between daily and weekly trends seeks to filter short-lived daily signals and retain moves supported by a longer horizon.
ATR-based sizing and trailing exits aim to normalize risk across stocks with different volatility while allowing positively skewed trend trades to run. The liquidity threshold reduces exposure to securities in which closing-auction execution may be difficult.
[code omitted from public view]
| Param | Value | Notes |
|---|---|---|
| Rule type | MULTI_TIMEFRAME_TREND_MOMENTUM | Long-only multi-timeframe trend rule |
| Data and rebalance | daily_prices; daily; close | Required columns: close, high, low, volume_in_dollars |
| Daily trend | SMA(20) > SMA(50); close > SMA(20); SMA(20) 5-day slope > 0 | All conditions required |
| Weekly trend | SMA(20) > SMA(50); weekly close > SMA(20); SMA(20) 4-week slope > 0 | All conditions required |
| Weekly resampling | Friday; last available daily close; completed week only | Method: resample_daily_to_weekly |
| Entry direction | long_only | Weekly and daily bullish alignment required |
| Liquidity rule | 20-day average dollar volume >= $10,000,000 | Applied before entry |
| Position sizing | 14-day ATR volatility-adjusted with cap | Target risk 1% per position; maximum position size 10% |
| Maximum leverage | 4.0x | Portfolio leverage ceiling |
| Exit rules | Trend failure; 3.0x ATR trailing stop; 126-day maximum holding period | ATR period is 14 days; either daily or weekly trend failure exits |
| Missing data | Skip signal or trade | No synthetic execution prices allowed |
| Universe | 20 US stocks, sorted by capitalization | AAPL, ACON, AMZN, BETR, BRK-A, BRK-B, GOODO, GOOG, GOOGL, HOLO, JNJ, JPM, MSFT, NVDA, PG, TSLA, UNH, V, WMT, XOM |
| Backtest window | 2018-01-01..2023-01-01 | Daily bars; WFA: null; position_limits: null; liquidity_filter: null in the backtest plan |
| 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 |
| Execution | daily bars, MOC (market-on-close) | Official closing-auction print |
| Minimum notional order limit | $0.00 | No minimum notional filter |
| # | Concern | Status |
|---|---|---|
| 1 | Weekly bars could include an unfinished week | ✓ Weekly resampling explicitly uses completed weeks only and Friday endpoints. |
| 2 | Daily close-derived signals and execution timing | ✓ Signals execute at the same official close under the platform's MOC convention; there is no same-day-open execution. |
| 3 | Rolling indicator construction | ✓ SMA, slope, ATR, and volume windows use current and historical observations only. |
| 4 | Universe selection and capitalization ranking | ⚠ The specification provides a fixed 20-symbol list but does not document point-in-time constituent or capitalization snapshots. |
| 5 | Missing observations | ✓ Required missing indicator inputs suppress signals, and missing execution prices suppress trades; synthetic prices are prohibited. |
| 6 | Transaction-cost treatment | ✓ commissions $0.0040/share (min $1.00/order); slippage 0 bps — not applied |
Over 2018-01-01 through 2023-01-01, the strategy produced a 38.96% total return with 9.08% volatility, a 0.86 Sharpe ratio, and a -10.66% maximum drawdown. The 38.22% win rate combined with a 1.62 profit factor is consistent with a trend-following payoff in which fewer winning trades outweigh more frequent losses. Beta versus SPY was 0.17. These results cover 1,078 trades and are net of the charged per-share commissions.
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 (years = n / 252). 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,259 | 1.00x the 1,260 trading days in 2018-01-01..2023-01-01 |
| Distinct dates | 1,259 | one row per date |
| Date span | 2018-01-02 .. 2022-12-30 | |
| Sum of daily returns | 38.96% | matches the reported total return |
| Sharpe from these rows | 0.86 | stored 0.86 |
| Volatility from these rows | 9.08% | stored 9.08% |
| Max drawdown from these rows | -10.66% | stored -10.66% |
| Lowest the book stood | -0.01% | low-water mark, in units of starting capital |
| CAGR from these rows | 6.81% | stored 6.81% |
| Metric | Value |
|---|---|
| Total Return | 38.96% |
| Sharpe | 0.86 |
| Sortino | 0.87 |
| Calmar | 0.64 |
| Max Drawdown | -10.66% |
| Volatility | 9.08% |
| Beta vs SPY | 0.17 |
| Win Rate | 38.22% |
| Profit Factor | 1.62 |
| Total Trades | 1078 |
| Symbols | 20 (AAPL, ACON, AMZN, BETR, BRK-A, BRK-B, GOODO, GOOG, GOOGL, HOLO, +10 more) |