zrb Python package — shared data,
backtest, beta, and alpha layers used by every strategy replication.
zrb is currently an internal library. B2B customers can get access scoped
through an engagement — contact
support@zentradings.com.Setup
zrb.data — price data
refresh=True to re-download.
zrb.backtest — portfolio simulation
runturns a weight matrix into portfolio returns net of transaction costs (cost_bps).long_shortbuilds a dollar-neutral portfolio from a cross-sectional signal: top/bottomfracof names, requiring at leastmin_namesper side.summaryannualizes (Sharpe, vol, etc.);drawdowngives the drawdown series.
zrb.beta — is there alpha left?
spanning_regression regresses strategy returns on known factor returns. A
statistically insignificant intercept means the “strategy” is repackaged beta
— you could have held the factors directly.
zrb.alpha — does the ranking predict?
ic— per-period rank information coefficient between signal and forward returns.quantiles— forward returns by signal quantile; a real signal shows a monotone ladder.report— the full verdict: mean IC, the quantile ladder, and gross-vs-net after turnover costs, side by side.

