Skip to content

skfolio/skfolio-weight-drift-uncompounded

Rule skfolio-weight-drift-uncompounded
Pack skfolio
Severity info
Fix unsafe, with xpd check --fix --unsafe-fixes
Library versions skfolio 1.14.4 and later

skfolio weight drift changes holdings and period returns. Compounding controls how those returns accumulate.

Portfolio(returns, weights, weight_drift=True)
Portfolio(returns, weights, weight_drift=True, compounded=True)

Two periods with returns of 10% and 10.9091% end with cumulative simple return of 0.2091 or wealth of 1.22 from starting wealth of 1. Set compounded=True separately on a MultiPeriodPortfolio when you want compounded wealth across child portfolios.

Use xpd check --fix --unsafe-fixes to add or set compounded=True when weight_drift=True.

xpd prints this message with the issue. A name that starts with $ stands for code from your file.

skfolio weight drift changes period returns. Set compounded=True if you want accumulated wealth. Two drifted periods ended at 1.22 with compounding.

Browse the other rules of the skfolio pack.