v0.4.1 — Comprehensive Accuracy Audit
What's Changed
Fixes 13 data accuracy issues discovered during a comprehensive codebase audit:
Financial Accuracy
- Net Debt formula now subtracts short-term and long-term investments (not just cash)
- Current Ratio returns
NaNwhen current liabilities = 0 (previously returned0.0, which falsely implied zero liquidity) - ROE returns
NaNfor zero equity (consistent with Debt-to-Equity behavior) - ROE/ROA alerts now fire for negative values, not just low-positive
- Margin percentages (Gross, Net, Operating) return
NaNwhen revenue = 0
Forecasting
- Forecast output validated for
NaN/Inf— falls back to naive (last known value) instead of propagating bad data - Fallback uses last known value instead of misleading
0.0when models fail or data is insufficient - Warning suppression narrowed from blanket
ignoreto specific convergence/UserWarning categories
Data Integrity
- Synonym partial-match sort key made consistent between
find_synonym_valueandfind_best_synonym_row pd.isna()replacesnp.isnan()to preventTypeErroronNonein capex computation- Quarterly FCF calculation skips periods with missing operating CF instead of silently using
0.0 - CSV export preserves full numeric precision (K/M/B formatting only in console)
- CLI rejects directories for
--csvpath
Tests
- 7 new test cases covering zero-denominator ratios, NaN/Inf forecasts, negative ROE/ROA alerts, investment-adjusted Net Debt
- 3 existing tests updated for corrected NaN behavior
Full Changelog: v0.3.0...v0.4.1