Get started
Skip to main content

Behavioral Finance & Market Efficiency

When Markets Aren't Random, and What to Do About It

Test the Efficient Market Hypothesis directly. Run autocorrelation, runs, and variance-ratio tests on real data. Decompose risk through a behavioral lens to see which anomalies are real signal and which are just survivorship.

Quants and portfolio managers curious about EMH violations and edge measurement.

By the end you will…
Test weak-form efficiency on any ticker using three rigorous statistical tests.
Quantify autocorrelation, runs, and variance-ratio deviations.
Decompose realized returns into systematic and behavioral components.
Evaluate fund performance through a behavioral lens: is alpha skill or β masquerading?
0 of 3 labs explored
SAVED ON THIS DEVICE

The journey

1
Stop 1, 30 min, Performance Measurement
● You are here
Market Efficiency Tester
Autocorrelation, runs, and variance-ratio tests for the EMH.
Three weak-form EMH tests on the data of your choice.
Open lab →
Worked example
Sample EMH test results on SPY (5y daily returns).
TestStatisticp-valueVerdict
Autocorrelation lag-1ρ = 0.012-Tiny: efficient
Ljung-Box (10 lags)Q = 14.30.16Fail to reject
Runs testz = 1.40.16Random sequence
Variance ratio (q=2)VR = 0.980.62≈ random walk
2
Stop 2, 30 min, Risk & Return
Risk Decomposition
Split a stock's risk into systematic (β-driven) vs idiosyncratic.
How much variance is explained by the market vs idiosyncratic noise?
Open lab →
Worked example
Risk attribution for a sample fund: fairly market-driven.
ComponentVariance ShareAnnualized σ
Systematic71%17.4%
Idiosyncratic29%11.2%
Total100%20.6%
3
Stop 3, 30 min, Performance Measurement
Sharpe / Treynor / Jensen
Compute every major risk-adjusted return ratio side-by-side.
Sharpe vs Treynor vs Jensen: which one tells you the most?
Open lab →
Worked example
Famous 'alpha' fund: does it survive a behavioral audit?
Sharpe
0.78
vs 0.66
Treynor
0.052
vs 0.060
Jensen α
−0.6%
vs -
Info Ratio
0.18
vs -

Apply what you learned

Case Study

Is Bitcoin's weekend autocorrelation a tradable signal?

Crypto markets trade 24/7, but volume drops 40-60% on weekends. Pre-2020 papers documented mild positive autocorrelation in BTC weekend returns (ρ ≈ 0.05-0.10). Run the Efficiency Tester on BTC-USD with daily data and see what the 5-year picture looks like now. With venues like Polymarket and Kalshi, weekend prediction-market liquidity has tightened the gap. Result: lag-1 ρ has decayed to ~0.02, no longer statistically significant after transaction costs. Lesson: documented anomalies often disappear once they're known and capital chases them.

Case Study

The 'low-vol anomaly': real signal or post-hoc rationalization?

Multiple papers show low-volatility stocks outperform high-vol stocks risk-adjusted (a violation of CAPM). Run risk decomposition on USMV (low-vol ETF) vs SPHB (high-beta ETF): USMV's β is ~0.7, SPHB's is ~1.4. Backtest 10 years: USMV returned 9.5% with σ=11%, SPHB returned 12% with σ=22%. Sharpe ratios: 0.50 vs 0.36 — the low-vol anomaly held over this window. But the gap shrank in the 2021-2023 'meme' regime. Lesson: anomalies persist when behavioral biases (lottery preference, leverage aversion) are durable; they fade when they're mispriced into ETFs.