Algorithmic Momentum Trading System
Trailing Stop Strategy
Backtest, Risk Audit & PDT Analysis
April 16, 2026 | 90-Day Backtest Window | 100-Symbol Universe | PDT & Unrestricted Pools
Paper Trading — Pre-Live Validation

Executive Summary

This report documents the development, backtesting, and risk hardening of the ClosingDay Trader's new trailing stop exit strategy. The trailing stop replaces the previous fixed-target exit, allowing winning trades to capture extended moves while maintaining disciplined risk management.

90-Day Backtested Result ($1,000 Starting Equity)
$1,000 → $9,600
+860% return | +$8,600 PnL | 2,141 trades | 22.3% win rate | +0.12% expectancy/trade
vs Fixed Target
+$2,762
+40% improvement over fixed 3% target

Key Findings

Trailing Stop Advantage

  • Every trailing stop variation outperformed the fixed target
  • Average trailing stop exit: +4.12% vs fixed target cap of +3.00%
  • Best single trade captured +14.09% (MNTS, 11 min hold)
  • Win rate unchanged at ~22% — trailing stops help winners, don't hurt losers
  • Expectancy improved from +0.10% to +0.12% per trade

Critical Risk Fixes Applied

  • Bracket orders changed from TIF=day to TIF=gtc — stops survive overnight
  • Trailing stops also set to TIF=gtc
  • Independent price-based stop watchdog added
  • Equity circuit breaker at 50% drawdown
  • Position sizing now scales with current equity
  • Config-driven risk percentage (RISK_PER_TRADE_PCT)

Methodology

Strategy Overview

ClosingDay Trader is a momentum breakout system that scans a curated 100-symbol universe for intraday price momentum combined with volume spikes. When a stock breaks out, the system enters via a limit order with a bracket exit structure (target + stop loss).

Entry Criteria (All Must Pass)

Price Range$5.00+ (no upper cap — position sizing naturally limits exposure)
30-Bar MomentumClose must be ≥2% above close 30 bars ago
Volume SpikeCurrent bar volume ≥20% above 50-bar average volume
Time of Day Filter09:30-11:00 ET and 14:30-16:00 ET only (midday filtered out)
Relative StrengthSymbol must outperform SPY by ≥1% intraday
ATR Stop1.5x ATR(14) below entry — volatility-adapted stop distance

Exit Strategy: Trailing Stop Mechanism

How It Works

Before (Fixed Target): When price hit the +3% target, the bracket's limit leg filled and the position closed immediately. Parabolic moves beyond +3% were left on the table.

After (Trailing Stop): When price hits the +3% target, the bracket is cancelled and replaced with a 1% trailing stop. The stop slides up as price climbs, always staying 1% below the high water mark. When the stock inevitably reverses, the trailing stop triggers, locking in profit. Minimum locked-in profit = TARGET% - TRAIL% = 3% - 1% = 2%.

Decision Tree for Open Positions

#ConditionActionDashboard Badge
0Trailing stop already activeSkip all rules — let it rideTRAILING
1Price ≥ target priceCancel bracket, place 1% trailing stopTARGET
2Price ≤ stop price (watchdog)Force close — independent of bracket status
3Bracket legs all expired/cancelledMarket sell — naked position detected
4Held ≥30 min, gain <2%Market sell — momentum deadSTALE 32m
5Held ≥45 min (any gain)Market sell — cut itSTALE 45m
None of the aboveBracket stop/target active on AlpacaBRACKET

Position Sizing

Risk per trade: RISK_PER_TRADE_PCT (default 1%) of current realized equity, not starting equity. This means:

Backtest Results

Window: January 16 – April 16, 2026 (90 days) | Universe: 100 symbols across 3 price tiers | Data: 1-minute bars from Alpaca IEX feed | Starting Equity: $1,000

Fixed Target vs Trailing Stop

Fixed Target
$6,838
+584% from $1,000
Trailing Stop (1%)
$9,600
+860% from $1,000
Improvement
+$2,762
+40% better
Best Trail Trade
+14.1%
MNTS, 11 min

Head-to-Head Comparison

MetricFixed TargetTrailing Stop (1%)Delta
Trades2,1982,141-57
Win Rate22.2%22.3%+0.1pp
Avg Winner+2.71%+2.80%+0.09pp
Avg Loser-0.65%-0.65%
Expectancy/Trade+0.10%+0.12%+0.02pp
$1,000 Compounded$6,838$9,600+$2,762
Best Trade+4.00% (SOFI)+14.09% (MNTS)+10.09pp
Worst Trade-5.10% (MNTS)-5.10% (MNTS)

Trail Percentage Sweep

Tested 6 trail distances to find the optimal setting. All outperform the fixed target.

Trail %TradesWin RateExpectancyAvg WinAvg Loss$1,000 →PnL
FIXED2,19822.2%+0.10%+2.71%-0.65%$6,838$5,838
0.50%2,17822.1%+0.12%+2.80%-0.64%$9,790$8,790
0.75%2,16322.3%+0.11%+2.75%-0.65%$8,316$7,316
1.00% ◄2,14122.3%+0.12%+2.79%-0.65%$9,600$8,600
1.25%2,12522.3%+0.12%+2.78%-0.64%$9,106$8,106
1.50%2,11222.3%+0.12%+2.78%-0.64%$9,448$8,448
2.00%2,07622.4%+0.12%+2.75%-0.64%$8,598$7,598

Selected: 1.00% trail — Near-optimal performance with better noise tolerance than 0.50%. Less likely to get shaken out by normal intraday volatility.

Outcome Breakdown

Fixed Target Outcomes

Stop Hit1,671 (76%)
EOD Close280 (13%)
Target Hit247 (11%)

Trailing Stop Outcomes

Stop Hit1,627 (76%)
EOD Close295 (14%)
Trailing Stop219 (10%)

219 trailing exits averaged +4.12% vs fixed cap of +3.00%

Backtest Limitations

Risk Audit & Safeguards

A comprehensive risk audit was performed on all trading logic, safety rails, and broker integration. Critical and high-severity issues were identified and fixed. Below is the full audit with current status.

Critical Issues (Fixed)

1. Bracket Order TIF=day — Stops Expired Overnight FIXED

Bracket stop/target legs were set to TIF=day, meaning they expired at 4:00 PM market close. Positions held overnight had zero stop protection. A gap-down at next-day open would eat the full loss with no safety net.

Fix: Changed to TIF=gtc (good-til-cancelled). Stop and target legs now persist across trading sessions until they fill or are explicitly cancelled.

2. Trailing Stop TIF=day — Same Overnight Risk FIXED

The new trailing stop feature also used TIF=day. If placed late in the session, it would expire at close, leaving the position naked overnight during the most vulnerable period.

Fix: Changed to TIF=gtc. Trailing stops now persist overnight.

3. Independent Price-Based Stop Watchdog FIXED

The system relied entirely on Alpaca's bracket mechanics for stop execution. If a bracket leg got stuck in "held" status or the API glitched, the stop would never fire.

Fix: Added Rule 1b — an independent watchdog that compares current price to the proposal's stop price every scan cycle. If price ≤ stop, force close regardless of bracket status.

High Issues (Fixed)

4. No Equity Circuit Breaker FIXED

The sim account had no floor — no mechanism to halt trading if equity dropped to dangerous levels.

Fix: Added equity circuit breaker safety rail. If realized equity drops below 50% of starting equity, all new entries are blocked until manual review. This is the last line of defense against cascading losses.

5. Position Sizing Used Starting Equity FIXED

Risk per trade was calculated as 1% of $1,000 (starting equity) regardless of current account size. After losses to $500, this meant risking 2% of actual equity — accelerating drawdowns.

Fix: Position sizing now uses current realized equity. Risk scales down after losses and up after gains, creating a natural anti-fragile sizing curve. The RISK_PER_TRADE_PCT config setting is now wired in.

Complete Safety Rail Architecture

Every entry must pass through all safety rails in order. The first failure blocks the trade and logs an audit record.

#RailDescriptionScope
1Trading SessionBlock entries outside regular hours (09:30-16:00 ET)All pools
2Late Entry CutoffBlock entries after 15:45 ET (not enough time for bracket)PDT only
3PDT BudgetBlock if daily or 5-day rolling day-trade limit is reachedPDT only
4Equity Circuit BreakerBlock if equity ≤ 50% of starting (catastrophic loss guard)All pools
5Position SizeBlock if position cost > MAX_POSITION_USD ($1,000)All pools
6Max Open PositionsBlock if already at MAX_OPEN_POSITIONS (3)All pools
7Daily Loss HaltBlock if today's realized loss ≥ MAX_DAILY_LOSS_PCT (3%) of equityAll pools
8Sufficient CashBlock if sim cash < position costAll pools

Exit Management Layers

LayerMechanismFailure Mode It Catches
Bracket Order (GTC)Alpaca-managed stop + target legsNormal exits — primary defense
Trailing Stop (GTC)Replaces bracket at target; rides winnersCaptures parabolic moves
Price WatchdogIndependent check: price vs stop each cycleBracket leg stuck/glitched
Naked Position DetectChecks if all bracket legs expiredTIF expiration, API cancellations
30-min Stale RuleClose if held 30+ min with <2% gainMomentum decay — dead breakout
45-min Hard ExitClose unconditionally at 45 minAny position held too long

Remaining Known Risks

PDT Pool Analysis

The PDT (Pattern Day Trader) pool operates under strict regulatory constraints that fundamentally change the strategy's behavior compared to unrestricted trading. This section analyzes the impact of PDT rules on the trailing stop strategy.

PDT Constraints Applied

ConstraintSettingImpact
Day Trades Per Day1 maxOnly one round-trip (buy + sell same day) allowed per trading day
Day Trades Per 5-Day Window3 maxRolling 5-business-day count cannot exceed 3 without PDT flag
Account Threshold< $25,000PDT rules only enforced when sim equity is under $25K
Late Entry Cutoff15:45 ETNo new entries after 15:45 — not enough time for bracket to work
Pre-Entry PDT Budget CheckBlockIf no day-trade budget left, entry is blocked (can't open what you can't close)

How PDT Affects the Strategy

Trade Volume Impact

The unrestricted backtest produced 2,141 trades over 90 days (~24/day). Under PDT rules:

  • Max possible day trades: ~54 (3 per 5-day window × 18 weeks)
  • Overnight holds are unlimited but require next-day exit
  • Estimated PDT trade count: 150–250 trades over 90 days
  • The system must be highly selective — only take the highest-conviction signals

Why Trailing Stops Matter More Under PDT

With fewer trades available, each trade carries more weight. The trailing stop becomes even more critical under PDT because:

  • Can't offset a loser with volume — each winner must count
  • Trailing stop captures +4.12% avg vs +3.00% fixed — 37% more per win
  • Overnight holds (forced by PDT) benefit from GTC trailing stops that persist
  • Fewer day trades = more overnight holds = GTC orders are essential safety

PDT Pool Safety Rails

The PDT pool runs two additional safety rails that the unrestricted pool does not:

RailLogicWhy It Matters
Late Entry Cutoff Block entries after 15:45 ET An entry at 15:50 has 10 minutes before close. Not enough for the bracket to work. Forcing an EOD flatten burns a precious day trade on a noise print.
PDT Budget Gate Block entry if day-trade budget is exhausted (daily or rolling 5-day) Core principle: never open a position you cannot close. If the budget is full, the entry would either force an overnight hold against plan, or blow the PDT rule on exit.

PDT Pool Projected Performance ($1,000 Account)

Projecting the backtest results under PDT constraints with a $1,000 starting account:

Est. Trades (90d)
~200
vs 2,141 unrestricted
Expectancy/Trade
+0.12%
same edge per trade
90-Day Projection
$1,250
+25% return
Max Drawdown Risk
-15%
~$150 from $1,000

Important: PDT-constrained returns are dramatically lower than unrestricted because the edge compounds over trade volume. With ~10x fewer trades, the 90-day compounding effect is ~10x smaller. The per-trade edge is identical — it's the frequency that's throttled.

PDT Pool Risk Considerations

PDT vs Unrestricted: Quick Comparison

MetricPDT PoolUnrestrictedNotes
Trades (90d)~2002,141~10x fewer
Day Trades Allowed1/day, 3/weekUnlimitedFINRA PDT rule
Overnight HoldsFrequentRarePDT forces holds
Gap Risk ExposureHigherLowerMore overnight = more gaps
Per-Trade Edge+0.12%+0.12%Identical
90d Return ($1,000)~+25%+860%Volume drives compounding
Safety Rails108+2 PDT-specific rails
Trailing Stop ValueCriticalImportantEach win matters more

Position Sizing Explained

Understanding how the system determines share quantity for each trade. Two rules compete — the smaller quantity wins.

Rule 1: Risk-Based Sizing

Formula: qty = (Equity × RISK_PER_TRADE_PCT) ÷ Stop Distance

Example: Equity $1,063 × 1% = $10.63 risk budget. If ATR stop = $0.14/share → 10.63 ÷ 0.14 = 75 shares

Rule 2: Position Dollar Cap

Formula: qty = MAX_POSITION_USD ÷ Entry Price

Example: $1,000 ÷ $71.39 = 14 shares

Result: Smaller Qty Wins

In the example above (HUT at $71.39): Risk-based = 75 shares, USD cap = 14 shares → 14 shares used

Max loss = 14 × $0.14 = $1.96 (well under the $10.63 risk budget)

This is a feature, not a bug. On high-priced stocks with tight stops, the USD cap is the binding constraint. You risk less than 1% of equity — conservative by design.

When Each Rule Dominates

Stock PriceStop DistanceRisk QtyUSD Cap QtyWinnerActual Risk
$5 (cheap)$0.5021200Risk (21)$10.50 (1.0%)
$25 (mid)$0.801340Risk (13)$10.40 (1.0%)
$71 (expensive)$0.147514USD Cap (14)$1.96 (0.2%)
$71 (expensive)$2.00514Risk (5)$10.00 (0.9%)

On expensive stocks with tight ATR stops, the USD cap dominates and actual risk is well below 1%. On cheap stocks with wide stops, risk-based sizing dominates and keeps exposure at exactly 1%.

Current Configuration

Strategy Parameters

Target %4.0%
Stop Method1.5x ATR(14)
Trail %1.0%
Trailing Stop at TargetEnabled
Risk Per Trade1.0% of equity
Time of Day FilterOn
Relative Strength FilterOn
Scanner Interval60 sec

Safety Parameters

Max Position USD$1,000
Max Open Positions3
Max Daily Loss3.0% of equity
Day Trades/Day (PDT)1
Day Trades/Week (PDT)3
Circuit Breaker50% drawdown
ModePaper
Auto ExecuteYes (paper only)

Share & Export

Links point to trader.closingday.info