Skip to content

v0.5.0

Latest

Choose a tag to compare

@jaehyukchoi jaehyukchoi released this 26 May 05:26
· 36 commits to main since this release

What's new

New module: mathpf.mills_dd — symmetric divided differences of the Mills ratio for the Black-Scholes price-to-vega ratio.

New public API

mathpf.millsratio_dd(x, dx, theta=1)
#   theta = +1: (R(x-dx) - R(x+dx)) / (2 dx)   = Cv/sigma  (call branch)
#   theta = -1: (R(dx-x) + R(x+dx)) / (2 dx)   = (1-Cv)/sigma  (above branch)

mathpf.millsratio_dd_asymp(x, dx, n_terms=4)
#   Deep-OTM cancellation-free DD via the analytic 1/(z^2+3) asymptotic.
#   n_terms in {2,3,4,5} reaches ~100*eps at x - dx >= 352, 99.6, 51.2, 32.7.

The theta=+1 dispatcher splits into three regimes — asymp / R'''-seeded Taylor / direct mc.R difference — to keep relative error near eps across the full (x, dx) plane.

cdef kernels are noexcept nogil and re-use the existing mathpf.mills kernels via Cython cimport.

Notes

  • theta=-1 is not a literal divided difference — it's the BS above-inflection representation (1-Cv)/sigma, evaluated at two positive arguments to avoid cancellation for x < 0. See module docstring.

Full Changelog: v0.4.1...v0.5.0