Minor release with mostly bug fixes and some minor enhancements.
Bug Fixes
-
Corrected trailing rolling axis for valuation ratios: The
show_dailyandtrailingcombination inget_enterprise_value,get_market_cap, and related valuation ratios was applying the rolling window on the wrong axis (tickers instead of dates), producing incorrect results when both parameters were active simultaneously. -
Resolved trailing parameter having no effect in
get_market_cap: The if/else branches for trailing were identical, meaning the parameter was silently ignored regardless of what was passed. -
Fixed cumulative return calculations for edge case data: Replaced
(1 + returns).cumprod()with(1 + returns.fillna(0)).cumprod()acrosshistorical_model.pyandrisk_model.py, and added.replace([np.inf, -np.inf], np.nan)before cumulative product computation to prevent inf propagation when input data contains gaps or anomalies. -
Resolved pandas FutureWarning in performance controller: Added
future_stack=Truetostack()calls inperformance_controller.pyto silence the upcoming default behaviour change in pandas. -
Fixed type annotation in
helpers.py: Correctedpd.PeriodIndextopd.DatetimeIndexin a function signature.
New Features
-
trailingparameter for Models: Added atrailingparameter to the Models sub-module (e.g.get_weighted_average_cost_of_capital). When supplied, financial statement inputs are rolled over the trailing period before calculation, enabling TTM-style model outputs consistent with the same parameter in Ratios and Performance. -
trailingparameter for Ratios: Valuation ratios (P/E, P/B, free cash flow yield, price-to-earnings, etc.) now accept an explicittrailingparameter. Previously, quarterly data defaulted unconditionally totrailing=4; the parameter now allows overriding or disabling that behaviour.
Test Coverage
Added missing snapshot tests for: collect_custom_ratios, get_cash_conversion_efficiency, get_effective_tax_rate, get_debt_service_coverage_ratio, get_weighted_dividend_yield, get_reinvestment_rate, get_ev_to_ebit, collect_all_metrics (performance + risk), and get_compound_growth_rate. Updated snapshots for valuation methods affected by the trailing and show_daily axis fixes. Added httpx2 as a dev dependency to resolve StarletteDeprecationWarning in MCP OAuth tests.
MCP Server
Updated MCPB manifest and build script to reflect the latest configuration. Removed conflicting description remarks from the registry and tools model.
Full comparison: v2.1.2...v2.1.3