Hypothesis Driven Development An Understandable Example By Ilya
Hypothesis Driven Development: An Understandable Example By: Ilya Kipnis
The Base Strategy • The strategy in question is a cross-sectional bond rotation strategy, rotating through SHY, TLT, CWB, PCY, and JNK. • Constraints would be that flat transaction costs are negligible, as base strategy has either a 200% or 0% turnover. • Default objective: to outperform equally-weighted portfolio consisting of said securities. • Will use 5 mutual funds from latest inception to March 2009 for hypothesis period. CNSAX, FAHDX, VUSTX, VFISX, and PREMX
Statement of Hypotheses For Indicator • Want to test hypotheses for both cross-sectional and time-series momentum. • Cross-sectional rank hypothesis: future one-month return rank predicted by current momentum rank. • Time-series momentum hypothesis: future one-month returns are proportional to time-series momentum. • Use p-values of. 1 and. 05 • Use lookback periods of 1 -24
Time Series P-Values (L) and Cross-Sectional P -Values (R)
Signal Hypotheses • Indicator hypothesis testing shows TS momentum holds some predictive value, while cross-sectional momentum definitely holds value. (Of course it does, it’s momentum. ) • A good signal process will beat the equal-weight portfolio, as well as do well among monte-carlo simulations under the same conditions (one asset period, chosen at random). • Will test by comparing metrics vs. equal weight portfolio.
Signal Process vs. EW portfolio • Good results 1 -12 months. • Not good after.
Signal Process Boxplots vs. EW • Promising boxplots. • No single configuration convincing on its own. • Onto Monte Carlo.
Monte Carlo tests • Compare vs. 1 random asset per month. • CAGR, vol, and Sharpe comparisons. • Promising results.
Volatility Targeting Rule • “Momentum Has Its Moments” by Barroso & Santa. Clara says to target volatility. • Longer formation window better.
Andrew Lo’s Stop-Loss • Andrew Lo proposed stopping given a volbased threshold break for some amount of time. • Generally a bad idea at monthly decision interval.
Marcos Lopez de Prado’s Sharpe Deflation deflated. Sharpe <- function(sharpe, n. Trials, var. Trials, skew, kurt, num. Periods, periods. In. Year) { emc <-. 5772 sr 0_term 1 <- (1 - emc) * qnorm(1 - 1/n. Trials) sr 0_term 2 <- emc * qnorm(1 - 1/n. Trials * exp(-1)) sr 0 <- sqrt(var. Trials * 1/periods. In. Year) * (sr 0_term 1 + sr 0_term 2) numerator <- (sharpe/sqrt(periods. In. Year) - sr 0)*sqrt(num. Periods - 1) skewness. Term <- 1 - skew * sharpe/sqrt(periods. In. Year) kurtosis. Term <- (kurt-1)/4*(sharpe/sqrt(periods. In. Year))^2 denominator <- sqrt(skewness. Term + kurtosis. Term) result <- pnorm(numerator/denominator) pval <- 1 -result return(pval) } Ultimate strategy was an EW portfolio of 1 -12 month lookback configurations on 252 -day rolling volatility target of 10%. P – value was 0. 01311, signaling that the idea has merit.
Final In-Sample and Out-Of-Sample
Thank You! • Contact: ilya. Kipnis@gmail. com • Blog: www. quant. Strat. Trader. wordpress. com • Github: www. github. com/Ilya. Kipnis • Doing something interesting which my skills might help? Talk to me.
- Slides: 13