Skip to content

Releases: petbox-dev/dca

Release list

v2.1.0

Choose a tag to compare

@dsfulf dsfulf released this 09 Jul 20:21

Bug Fix

  • Breaking numerical change: Fixed the missing gamma(1/n) factor in the Stretched Exponential (SE) closed-form cumulative and EUR (#20). SE._Nfn used the regularised lower incomplete gamma (scipy gammainc = P) without the gamma(1/n) coefficient, so cumulative volume and EUR were wrong by a factor of gamma(1/n) for any n != 0.5 — understated up to ~64% at n=0.3, exact at n=0.5, overstated ~10% for n > 0.5. Any SE forecast with n != 0.5 will now report different cumulative/EUR values. For very small n (where gamma(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 < 2 raises ValueError.

Other

  • Removed unreachable code in THM._validate (flagged by mypy) (#21).
  • Coverage is now uploaded to Coveralls via GitHub Actions.
  • Docs: n_grid convergence analysis (second-order; 10k → ~2e-6, 2,000 → ~5e-5), SE small-n fallback note, and a reproducible print_ngrid_convergence() helper.

Full history: see docs/versions.rst.

v2.0.0

Choose a tag to compare

@dsfulf dsfulf released this 14 Mar 21:45
1b3d3c4

Full Changelog: v1.3.0...v2.0.0