TradingView strategy research

Momentum crash analysis: rebounds, exposure and conditional returns

A momentum crash is a severe loss in a momentum portfolio. In Daniel and Moskowitz's cross-sectional research, buying past winners and shorting past losers can suffer when a distressed market rebounds and the losers rise much faster. Equal long and short dollars do not cancel this exposure. The example below holds one selection through a decline and rebound, then accounts for changing notionals, borrowing and financing. It does not assume that every trend-following rule has the same failure mechanism.

See the decision guide

What the original momentum-crash evidence covers

Daniel and Moskowitz, Momentum Crashes (Journal of Financial Economics, 2016), examine portfolios that buy relative winners and sell relative losers. They associate crashes with prior market declines, high volatility and contemporaneous rebounds. Following a selloff, the loser book can have greater market sensitivity than the winner book. Selling that sensitivity creates losses when the market recovers.

  • Their paper describes the bear-market payoff as resembling a written call on the market. This is a statement about conditional return behavior; the stock portfolio does not literally hold options.
  • The paper reports that, during March through May 2009, its past-loser decile gained 163% and its past-winner decile gained 8% (page 221). These are the paper's leg returns, not the return of a funded account on this page. Subtracting compounded leg returns does not reconstruct the paper's monthly rebalanced strategy wealth.
  • A long-only momentum fund can lag a rebound without incurring the short-loser loss. A time-series strategy uses each asset's own history and can hold a different book. Its crash analysis needs its own positions and execution dates.

Freeze a portfolio before looking at the rebound

This is a constructed teaching scenario, not a historical backtest. At month-end M, rank six eligible USD stocks using total-return index at M - 1 divided by index at M - 12, minus one. The eleven-month scores are A +30%, B +20%, C +10%, X -20%, Y -30% and Z -40%. Skip month M. Buy A, B and C and short X, Y and Z at the next common-session open, assumed to be $100 for every stock. Each position has 500 shares, with the shorts signed negative.

  • Opening assets are $150,000 long securities plus $150,000 restricted collateral. Liabilities are $150,000 short securities plus the $50,000 debit. The difference is $100,000 equity before fees.
  • Assume borrow remains available and the broker permits this leverage and collateral arrangement throughout. These are modeling assumptions, not margin entitlements. A real broker can demand collateral or liquidate sooner.
  • For a real experiment, reconstruct historical eligibility, delistings, dividends owed on shorts and borrow availability. The six invented securities avoid pretending that current survivors form a historical universe.
ConventionFixed assumption
Capital and weights$100,000 equity before entry fees; +$50,000 per winner and -$50,000 per loser. Each signed weight is +50% or -50% of initial equity.
Initial exposureLong $150,000; short $150,000; gross $300,000 / $100,000 = 300%; net $0 / $100,000 = 0%.
FundingUse $100,000 equity and a $50,000 debit to buy the longs. Segregate $150,000 short-sale proceeds as collateral, earning zero. They cannot fund the longs in this example.
Holding windowHold the same shares for two consecutive 10-calendar-day blocks. No intrawindow re-ranking, resizing, dividend, split, FX change or forced liquidation.
Next decisionThe next scheduled month-end ranking falls after the 20-day window. Liquidate all six positions at the end-of-window executable prices solely to close this experiment.
ExecutionAssume enough liquidity and fractional cash accounting. Charge 0.10% of every entry and exit notional as an all-in trading cost, with no separate slippage deduction.

The decline helps; the rebound hurts the same holdings

The benchmark falls 25% in the first block and rises 20% in the second; it ends 10% below its starting level because 0.75 × 1.20 = 0.90. Every winner falls from $100 to $90, then rises to $99. Every loser falls from $100 to $70, then rebounds to $112. Quantities remain unchanged. The table shows pre-cost marks; it does not assume constant portfolio weights.

  • The full-window gross P&L is -$19,500: winners return -1% on $150,000 and losers return +12% against the $150,000 short. Return on initial equity is -19.5%. Compounding the two account block returns gives the same result.
  • During the rebound, a +10% long-leg gain cannot offset the +60% rise in the shorted securities. Both baskets rise, yet the portfolio loses. This is the short-leg mechanism the scenario isolates.
  • Exposure ratios use pre-cost equity to keep the marks comparable. Actual costs reduce the denominator and make gross exposure higher. If equity reaches zero, the ratio is undefined; do not report a meaningful leverage percentage by dividing by zero or negative capital.
  • A monthly rebalanced or volatility-scaled book would have different quantities. Applying its new weights retroactively to this fixed-holdings window would describe a different experiment.
MeasurementAfter declineAfter rebound
Long and short notionals$135,000 long; $105,000 short$148,500 long; $168,000 short
Block P&LLong -$15,000; short +$45,000; total +$30,000Long +$13,500; short -$63,000; total -$49,500
Equity before all costs$130,000$80,500
Block return on opening pre-cost equity+$30,000 / $100,000 = +30%-$49,500 / $130,000 = -38.0769%
Gross exposure / pre-cost equity$240,000 / $130,000 = 184.6154%$316,500 / $80,500 = 393.1677%
Net exposure / pre-cost equity+$30,000 / $130,000 = +23.0769%-$19,500 / $80,500 = -24.2236%

Borrowing and financing reduce the funded return

Use a deliberately simple fee convention: annual borrow fee 6%, charged on each block's opening short notional for 10 calendar days on an actual/365 basis. Finance the unchanged $50,000 debit at 8% annually for 20 days. Accrue fees as separate liabilities until liquidation, without interest on fees. A real stock-loan bill may revalue collateral daily; this block-opening convention is an explicit approximation.

  • Release the $150,000 short collateral, sell the longs for $148,500, buy back the shorts for $168,000 and repay $50,000 principal. This leaves $80,500 before costs. Principal repayment is not an extra expense; the interest is.
  • An additional 1 percentage point of annual borrow fee costs (150,000 + 105,000) × 0.01 × 10 / 365 = $69.863014. It reduces the initial-equity return by 0.069863 percentage points.
  • Setting trading, borrow and financing rates to zero recovers the -19.5% gross return. Doubling all those rates doubles the $1,254.856164 drag under the stated no-compounding assumptions, not the underlying price loss.
  • A flat price path still loses money after positive costs. A short price can rise more than 100%, so the initial short notional is not a loss limit. Borrow recall, failed fills and margin liquidation require additional paths, not a larger fixed fee alone.
Cost or reconciliationCalculation in USD
Entry trading cost300,000 × 0.001 = 300.00
First block borrow150,000 × 0.06 × 10 / 365 = 246.575342
Second block borrow105,000 × 0.06 × 10 / 365 = 172.602740
Debit financing50,000 × 0.08 × 20 / 365 = 219.178082
Exit trading cost(148,500 + 168,000) × 0.001 = 316.50
Total cost300 + 246.575342 + 172.602740 + 219.178082 + 316.50 = 1,254.856164
Ending equity after liquidation100,000 - 19,500 - 1,254.856164 = 79,245.143836
Net return on initial equity79,245.143836 / 100,000 - 1 = -20.754856%

Separate an observable state from a completed rebound

The following Pine v6 indicator observes a broad equity benchmark on standard one-day candles. It is a teaching diagnostic, not a replication of the paper's forecasting model. At a confirmed close, the stress state requires a drawdown of at least 20% from the highest close in 252 bars and annualized sample volatility of at least 30% over 20 daily log returns. The thresholds are research choices with no claimed predictive accuracy.

  • A rebound label at day t requires that the stress state was true five bars earlier and that close(t) / close(t - 5) - 1 is at least 10%. The label becomes available only after those five bars have occurred. It cannot justify exiting at their starting price.
  • The current stress state can be used as a decision input after its close, with an order no earlier than the next executable opportunity under a specified strategy. The script itself submits no orders and reports no portfolio return.
  • The warm-up requires consecutive valid positive prices. Zero volatility cannot pass the positive volatility threshold. A missing exchange session absent from the vendor feed cannot be detected by this guard.
An observation-only script. R marks the end of a completed window; it is not a momentum portfolio loss or an advance crash signal. Use a documented benchmark feed and standard daily candles.pine
//@version=6
indicator("Momentum crash: benchmark state observer", overlay = false)
int peakBars = input.int(252, "Peak window (daily bars)", minval = 2, maxval = 1000)
int volBars = input.int(20, "Volatility window", minval = 2, maxval = 500)
int reboundBars = input.int(5, "Rebound window", minval = 1, maxval = 100)
float ddLimit = input.float(20.0, "Drawdown threshold (%)", minval = 0.1, maxval = 99.0) / 100.0
float volLimit = input.float(30.0, "Annual volatility threshold (%)", minval = 0.1) / 100.0
float reboundLimit = input.float(10.0, "Rebound threshold (%)", minval = 0.1) / 100.0
if not timeframe.isdaily or timeframe.multiplier != 1
    runtime.error("Use standard one-day equity benchmark candles.")

bool validPrice = not na(close) and close > 0
bool validReturn = validPrice and not na(close[1]) and close[1] > 0
var int validPrices = 0
validPrices := validPrice ? validPrices + 1 : 0
float logReturn = validReturn ? math.log(close / close[1]) : na
float peak = ta.highest(close, peakBars)
float sigma = ta.stdev(logReturn, volBars, false) * math.sqrt(252.0)
bool ready = validPrices >= math.max(peakBars, volBars + 1) and not na(sigma)
float drawdown = ready ? close / peak - 1.0 : na
bool stressState = ready and drawdown <= -ddLimit and sigma >= volLimit
bool reboundReady = ready and ready[reboundBars] and validPrices > reboundBars
float reboundReturn = reboundReady ? close / close[reboundBars] - 1.0 : na
bool realizedRebound = reboundReady and stressState[reboundBars] and reboundReturn >= reboundLimit
bool confirmed = barstate.isconfirmed

plot(confirmed ? drawdown * 100.0 : na, "Drawdown (%)", color = color.blue)
plot(confirmed ? sigma * 100.0 : na, "Annualized volatility (%)", display = display.data_window)
plot(confirmed ? reboundReturn * 100.0 : na, "Rebound return (%)", display = display.data_window)
plot(confirmed and ready ? (stressState ? 1 : 0) : na, "Stress state (1 or 0)", display = display.data_window)
plot(confirmed and reboundReady ? (realizedRebound ? 1 : 0) : na, "Completed rebound (1 or 0)", display = display.data_window)
plotshape(confirmed and realizedRebound, title = "Completed rebound", style = shape.triangleup, location = location.top, color = color.orange, size = size.tiny, text = "R")
alertcondition(confirmed and realizedRebound, "Completed rebound after stress", "A benchmark rebound window has completed after a stress state.")

Estimate conditional returns without moving the decision backward

Archive the stress state at each decision close s and measure portfolio returns over a fixed later horizon. For a five-bar study, compare the average net portfolio return from s to s + 5 when the state at s is true with the corresponding average when false. Include all qualifying starts, including those followed by further declines. Record the sample count, median, worst return and both leg contributions alongside the mean.

  • For a trading simulation, separate the close-to-close diagnostic horizon from executable returns. If the state is first known at close s, size and fill the response on a later tradable price, then include that delay and its costs.
  • Conditioning additionally on a future positive rebound describes what happened in rebound episodes. It does not estimate an actionable forecast available at s. Keep this retrospective attribution separate from the prior-state comparison.
  • Adjacent five-bar windows overlap and are not independent observations. Use a declared non-overlapping selection rule or time-series methods that account for dependence; do not treat every plotted R as a separate crash.
  • Keep the selection, holdings and cost ledger identical across comparisons. Test reduced gross exposure, a short-book cap or slower re-entry as separate policies with declared execution timing. Lower exposure also gives up gains when momentum continues.
  • Freeze thresholds before testing later dates. Few severe events, repeated threshold searches and changing universe membership can make an attractive conditional mean unreliable. No empirical conditional-return estimate is claimed here.

What Pineify and TradingView can verify

Pine Script AI Coding Agent can help adapt the benchmark observer or write a separately specified chart-symbol strategy. Inspect its source and request syntax validation. A TradingView strategy trades the chart asset; requesting other symbols does not create independently traded winner and loser positions. The six-stock funding ledger therefore remains a portfolio research task outside the chart strategy report.

  • Before comparing a chart strategy, define its position size, next-bar execution, dates and trading costs. Model borrow, cash collateral and financing separately if the strategy report does not account for them.
  • Strategy Optimizer compares exposed input combinations and collects TradingView strategy reports. This indicator has no trade report to optimize. Use the optimizer only after defining a chart strategy, and keep its result separate from evidence about a cross-sectional momentum portfolio.
  • A useful audit includes one continued decline, one strong rebound, a zero-volatility history and a failed borrow or liquidation scenario in the external ledger. Syntax validity does not establish economic validity or performance.
Where Pineify fits

Pine Script AI Coding Agent

Adapt the confirmed-close observer from explicit benchmark, timing and threshold choices. Inspect the generated code and request a syntax check before using its labels.

Also useful: Strategy Optimizer. Compare inputs for a separately specified chart-symbol strategy using TradingView reports. The observer and the multi-stock portfolio ledger are not strategy reports.

Adapt the state observer

Frequently asked questions

Educational research, not investment advice. The six-stock portfolio, returns, rates and Pine thresholds are constructed assumptions. No strategy performance test is claimed. Short selling, leverage and changing margin requirements can create losses beyond initial capital.

Sources and verification

Published by Pineify. Pineify is an independent product and is not affiliated with TradingView. Sources support the technical explanations; examples do not establish trading performance.