Releases: petbox-dev/dca
Releases · petbox-dev/dca
Release list
v2.1.0
Bug Fix
- Breaking numerical change: Fixed the missing
gamma(1/n)factor in the Stretched Exponential (SE) closed-form cumulative and EUR (#20).SE._Nfnused the regularised lower incomplete gamma (scipygammainc= P) without thegamma(1/n)coefficient, so cumulative volume and EUR were wrong by a factor ofgamma(1/n)for anyn != 0.5— understated up to ~64% atn=0.3, exact atn=0.5, overstated ~10% forn > 0.5. Any SE forecast withn != 0.5will now report different cumulative/EUR values. For very smalln(wheregamma(1/n)overflows and the closed-form EUR diverges), SE falls back to the bounded numerical integrator.
Performance
- Exposed a configurable integration grid via
cum(t, n_grid=...)and the other volume methods (#21). The default (10,000) is unchanged; a smaller value (e.g. 2,000, ~5e-5 relative error) trades accuracy for a proportional speed-up on the numerically-integrated path (PLE, associated yields).n_grid < 2raisesValueError.
Other
- Removed unreachable code in
THM._validate(flagged by mypy) (#21). - Coverage is now uploaded to Coveralls via GitHub Actions.
- Docs:
n_gridconvergence analysis (second-order; 10k → ~2e-6, 2,000 → ~5e-5), SE small-nfallback note, and a reproducibleprint_ngrid_convergence()helper.
Full history: see docs/versions.rst.