Repository navigation
First packaged release: Black-Scholes-Merton core, portfolio aggregation, plotting layer and delta-neutral search.
LatestAdded
- Installable
src/-layout package (option_calculator) withpyproject.toml, optional[plot](matplotlib) and[dev]extras. OptionPositiondataclass with field validation.- Optional continuously compounded risk-free rate
racross the pricing engine. - Input validation with clear
ValueErrormessages for all pricing methods. - Test suite (
pytest) and GitHub Actions CI (Python 3.9–3.12, ruff + pytest). rufflinting/formatting configuration.- Documentation: expanded README,
CONTRIBUTING.md,CHANGELOG.md,docs/.
Changed
- Replaced the
BSM → Pricing → Plotinheritance chain with composition. Pricingaggregators no longer mutate the input positions; an explicitexpargument overrides positions andexp = 0is honoured.Search.searchDeltanow returns a list of results instead of printing, and compares deltas with a tolerance.- Deduplicated portfolio aggregation into a single
_aggregatehelper. - Vega/Theta scaling and day-count constants are now named (
VEGA_SCALE,DAYS_PER_YEAR).
Fixed
- Consistent
dTypehandling across all methods (unknown types now raise instead of silently producing wrong results). - Correct discounted intrinsic value for expired / zero-volatility options.
Full changelog: https://github.com/yzoz/python-option-calculator/blob/master/CHANGELOG.md