Repository navigation
New release with some new modules, lots of verification checks and overall improvements. See the complete list below.
Library
New
toolkit.portfolio: optimal weights (minimum variance, maximum Sharpe, mean-variance, risk parity, HRP, inverse volatility, minimum CVaR, Black-Litterman), efficient frontier, risk contributions, stress tests, look-through exposure and Brinson-Fachler attribution.Portfoliotakes weights, holdings or transactions and ships 13 presets (#281).toolkit.etf: holdings, weightings, profile with premium/discount to NAV (stale_nav=Truefor a NAV that is not current), tracking, concentration, overlap, look-through valuation and liquidity (#288).- Models: peer comparison, Merton distance to default, synthetic credit rating, reverse DCF, Monte Carlo valuation and more (#282).
- Options: put/call ratio, max pain, gamma exposure, implied move, model-free implied volatility and the volatility risk premium (#283).
- Fixed income: zero-coupon curves, Nelson-Siegel-Svensson, yield curve PCA, Vasicek/CIR/Hull-White, callable bond OAS, implied default probabilities and Treasury auctions (#284).
- Econometrics on any series (
Econometrics(data=...)), Markov regime switching, structural breaks, time-varying beta, DCC-GARCH and pairs trading (#285). - Performance and technicals: style analysis, regional Fama-French factors, market breadth, seasonality, relative strength and index constituents (#287).
Improved
- Modules load statements and prices only when a calculation needs them (#290).
- Every calculating method documents its formula with the defaults it uses, and every docstring example is regenerated live (#286).
- Correctness, verified against the sources (#286): decimals everywhere, the traded close for market values, no look-ahead (figures apply from the fiscal period end), each ticker keeps its own history, quarterly ratios over a trailing year, continuous rates for options, the
archbackcast for GARCH, and many method-level fixes. show_columnsselects numeric column labels such as years, thanks to @jackiectl2 (#292).
Breaking
Toolkit.get_etf_holdings,get_etf_information,get_etf_sector_weightingsandget_etf_country_weightingsmoved totoolkit.etf(get_holdingsand so on).- ICE BofA option-adjusted spreads and the discovery quote changes are decimals.
- A Toolkit whose only ticker is the benchmark raises a clear error; pass
benchmark_ticker=None.
MCP server
- New
portfolioandetftools: 24 router tools. - Econometrics takes
series=to analyse any indicator. - Descriptions follow the new methods, units and defaults; the bundle manifest is synced.
Other
- A weekly GitHub Actions run checks every keyless data source and opens an issue per broken source (#289).