Skip to main content
This is the canonical QuantContext workflow: all three tools in sequence.

User prompt

“I want to build a value-momentum strategy. Screen for cheap stocks, rank by momentum, backtest it, and tell me if the alpha is real.”

Step 1:Preview the universe

Before backtesting, screen to see how many stocks pass the value filter today.
Response: 28 stocks pass. Enough to build a diversified portfolio.

Step 2:Backtest the two-stage pipeline

Screen for value stocks (stage 1), then rank survivors by 200-day momentum and keep the top 30% (stage 2).
Response:
3-year performance: +41.2% total, 12.2% CAGR, Sharpe 1.31. Max drawdown held at -15.7%:the 15% stop-loss contributed. The strategy held 8–10 positions on average with 2x annual turnover.

Step 3:Factor analysis

Response:

Reading the results

Is the alpha real? Probably, but not conclusively.
  • Alpha is 5.3% annualized with t-stat 1.92:close to the significance threshold of 2.0 but just below it. With a longer backtest (5+ years), it might cross.
  • Strong value loading (HML 0.57):highly significant at t=7.34. The strategy is heavily tilted to the value factor. That’s the intended bet.
  • Moderate momentum loading (0.23):significant at t=3.45. The momentum ranking in stage 2 is contributing.
  • Market beta 0.78:defensive. This helped during the 2022 rate-hiking drawdown, which is why 3-year performance is solid despite 2022 headwinds.
  • R-squared 0.75:75% of variance explained by the four factors.
Bottom line: The strategy works, but most of the return comes from the value factor premium, not stock-selection alpha. You could replicate ~75% of the return with VLUE + MTUM ETFs. That’s not necessarily bad:the value premium is real and persistent:but it’s useful to know what you’re actually paying for.

Ways to increase the alpha component

Tighter value screen

Use pe_lt: 10 instead of pe_lt: 15 to target deeper value, which may have more idiosyncratic premium.

Add quality filter

Add roe_gt: 15 and debt_equity_lt: 0.5 before the momentum rank to avoid value traps.

Longer backtest

Extend to 5+ years for more data points and higher statistical power on the alpha t-stat.