Various financial mathematics codes in Python for testing purposes.
See comment in files for what each does, but explanation is very limited.
Includes:
- Analytical pricing of European options under Black-Scholes-Merton, with Greeks
- Implied volatility calculation
- Monte Carlo simulation (and European option pricing) for
- Black-Scholes-Merton (with and without importance sampling)
- Cox-Ingersoll-Ross
- Heston (with and without importance sampling and antithetic variates)
- gamma
- variance gamma
- bilateral gamma
- Poisson
- American option pricing
- binomial tree
- Longstaff-Schwartz
- de-Americanization
- Carr-Madan FFT pricing of European options for
- Black-Scholes-Merton
- variance gamma
- bilateral gamma
- PDE pricing
- Black-Scholes PDE
While not necessary, full paths are always generated in Monte Carlo simulations for pricing, so that path-dependent options may be priced also.
Scripts should be ran from within this directory.
Plots are written to the out folder in this directory.