Following structure of this course.
Topics Include:
- Binomial tree/pricer
- American & path-dependent options
- Monte Carlo methods
- Non linear solvers for implied vol
- Curve construction
- Short rate modelling
- HJM
- LMM
- SABR
- etc...
Contributions are more than welcome!
The current format/set-up is largely based on this repo. Special thanks to Kelvin for letting me copy his set up.
- Python binding of c++ code via
pybind11
(see this readme file for more info) - Unit test suite supported by
googletest
- CI via Github Actions
- Code review of jupyter notebooks via ReviewNB App
- Auto formatting via
clang-format
- CMake
- C++11 compliant compiler
- Python3.7 or above
- Gtest
All commands below are assumed to be run from root of the repo, unless specified otherwise.
cmake -S ./ -B build
cmake --build build
./build/exec
ctest --test-dir ./build --output-on-failure
The following script only works for linux/macOS users:
./build_and_test_proj.sh
See this separate readme file for details
The following scripts only work for linux/macOS users (and assumes dependencies have been installed) - best to refer to this readme file for set up.
Install our c++ python binding fineng_irfx
into the virtual env .venv
:
./deploy_cpp_module.sh
Now, you can also launch a jupyter lab session with the required virtual env:
./launch_jupyter.sh
- The C++ code can be found here
- The Python code can be found here
- Example tests can be found here
- Project to-do list are here
- Binomial tree option pricing
- using function pointers to switch payoffs
- different choices of tree structure
- analysing prob distribution generated by binomial tree
- computing Binomial coeff using recurrsion
- Binomial tree option pricing continued:
- improve code design by using OO design patterns
- pricing path-dependent (knock-out) options
- CRR model, numerical/analytical implementation
- connection to Black Scholes
- risks computation via finite differencing
-
Binomial tree option pricing continued:
- pricing early excerise payoffs (American/Bermudans)
- introduction of C++ templates
- multiple inheritance in C++
- numerical stability and convergence analysis
-
- pricing vanilla options
- using Box-muller as RNG
- discretisation via the Euler–Maruyama scheme
- pricing path-dependent payoffs (barrier/Asian)
- discretisation error in long stepping (terminal correlation)
- Monte Carlo methods continued:
- Monte Carlo error analysis and convergence
- variance reduction techniques
- pricing arithmetic Asian with geometric asian as control variate
- pricing barrier with vanilla option as control variate
- error analysis continued
- risks computation & error analysis
-
Monte Carlo methods continued:
- American Options - Longstaff-Schwartz method
- multi-asset simulation
- pricing basket options
-
1 factor short rate modelling:
- introduction to short rate models - 1 factor models
- Merton Model - bond pricing
- Merton Model - implied yield curve
- 1 factor short rate modelling continued:
- Vasicek Model - bond pricing
- Vasicek Model - implied yield curve
- calibration of the Vasicek model to the day-0 yield curve
- intro to the Hull White model
- calibration of the Hull White model to the day-0 yield curve