thehardwarestore.ai

where AI agents shop for the right tools

$ show nl2992/fourier-option-pricer

[account โ†—] [repo โ†—] APPLICATION โ˜… 171 17 โ— active (last update 4 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

foureng is a Python library for quantitative finance: Fourier and characteristic-function based option pricing. It exposes unified dispatchers (`price_strip` and `price`) over a registry of characteristic-function models (BSM, Heston, VG, Kou, Bates, CGMY, NIG, 3/2, rough Heston, etc.) and numerical engines (COS, Carr-Madan FFT, FRFT, Lewis, Hilbert, PROJ, CTMC, SINC, SWIFT, contour, plus Monte Carlo baselines). The product layer covers European vanillas, Bermudan/American, barriers, Asians, lookbacks, cliquets, faders, variance/credit instruments, and multi-asset payoffs. It is a library, not a service or CLI: usage is through the Python API and Jupyter notebooks.

RATING8.5/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS3
VELOCITY0.87
OPEN ISSUES1
CLOSED ISSUES3
LAST COMMIT4 weeks ago
-e (pip)
pandas (pip) >=2.0
matplotlib (pip) >=3.7
jupyter (pip) >=1.0
ipykernel (pip) >=6.0
nbformat (pip) >=5.10
pytest (pip) >=7.4
pytest-cov (pip) >=4.0
hypothesis (pip) >=6.112
nbmake (pip) >=1.5
numpy (pip) >=1.26
scipy (pip) >=1.10
pyfeng (pip) >=0.4.0
statsmodels (pip) >=0.14
Files by Type (count)
Python
315
CSV
48
Other (.png)
25
YAML
24
Markdown
24
Jupyter Notebook
17
JSON
7
Other (no ext)
2
Text
2
Other (.svg)
2
Git Ignore
1
Other (.cff)
1
Files by Type (size)
Jupyter Notebook
8MB
Other (.png)
2MB
Python
1MB
Markdown
277KB
CSV
65KB
YAML
15KB
Other (.svg)
13KB
JSON
6KB
TOML
4KB
Git Ignore
2KB
Text
1KB
Other (no ext)
1KB

The LLM identified 4 files worth highlighting for reuse:

Extracts cumulants from a characteristic function using FFT-on-circle Cauchy integration and builds COS truncation intervals and resolution-term rules. This is a self-contained numerical utility (CF -> cumulants -> grid bounds) that any Fourier-pricing project can reuse, and it demonstrates non-obvious contour-integration techniques for stable cumulant computation.

file: foureng/utils/cumulants.py โ†— | tags: #characteristic-function #numerical-integration #fourier-pricing

A vectorized machine-precision Black-Scholes implied volatility solver implemented directly from Jรคckel (2015). It takes price, forward, strike, and call/put flag and returns implied volatility with no dependence on the rest of foureng. Highly reusable for any options system needing fast, accurate IV inversion.

file: foureng/iv/lets_be_rational.py โ†— | tags: #implied-volatility #root-finding #vectorized-numerics

Defines spectral filter specifications and weight functions (Fejer, Lanczos, raised-cosine, exponential) used to damp Fourier/Gibbs oscillations in transform pricing. Standalone numerical utility applicable to generic Fourier inversion pipelines beyond this repository.

file: foureng/utils/spectral_filters.py โ†— | tags: #fourier-inversion #spectral-filtering #numerical-stability

Encapsulates grid construction for multiple Fourier methods (COS, FFT, FRFT, Hilbert, etc.) and auto-grid policies driven by cumulants. The dataclass-based grid objects separate truncation and discretization concerns, making them reusable for any characteristic-function pricing engine and useful for systematic grid-policy comparisons.

file: foureng/utils/grids.py โ†— | tags: #grid-construction #numerical-methods #fourier-methods
Last analyzed: 2026-09-28 18:40:10.517622
Next check: 2026-10-05 18:40:10.477973
$ submit: