├── .flake8 ├── .github └── FUNDING.yml ├── .gitignore ├── 1.1 Black-Scholes numerical methods.ipynb ├── 1.2 SDE simulations and statistics.ipynb ├── 1.3 Fourier transform methods.ipynb ├── 1.4 SDE - Heston model.ipynb ├── 1.5 SDE - Lévy processes.ipynb ├── 2.1 Black-Scholes PDE and sparse matrices.ipynb ├── 2.2 Exotic options.ipynb ├── 2.3 American Options.ipynb ├── 3.1 Merton jump-diffusion, PIDE method.ipynb ├── 3.2 Variance Gamma model, PIDE method.ipynb ├── 3.3 Pricing with the NIG Process.ipynb ├── 4.1 Option pricing with transaction costs.ipynb ├── 4.2 Volatility smile and model calibration.ipynb ├── 5.1 Linear regression - Kalman filter.ipynb ├── 5.2 Kalman auto-correlation tracking - AR(1) process.ipynb ├── 5.3 Volatility tracking.ipynb ├── 6.1 Ornstein-Uhlenbeck process and applications.ipynb ├── 7.1 Classical MVO.ipynb ├── A.1 Solution of linear equations.ipynb ├── A.2 Optimize and speed up the code. (SOR algorithm, Cython and C).ipynb ├── A.3 Introduction to Lévy processes and PIDEs.pdf ├── CITATION.cff ├── Dockerfile ├── LICENSE ├── README.md ├── data ├── historical_data.csv ├── spy-options-exp-2020-07-10-weekly-show-all-stacked-07-05-2020.csv ├── spy-options-exp-2021-01-15-weekly-show-all-stacked-07-05-2020.csv └── stocks_data.csv ├── docker-compose.yml ├── environment.yml ├── latex ├── A.3 Introduction to Lévy processes and PIDEs.bbl └── A.3 Introduction to Lévy processes and PIDEs.tex ├── list_of_packages.txt ├── pyproject.toml ├── requirements.txt ├── setup.py └── src ├── C ├── BS_SOR_main.c ├── BS_sor ├── Makefile ├── PDE_solver.c ├── PDE_solver.h ├── SOR.c ├── SOR.h └── mainSOR.c └── FMNM ├── BS_pricer.py ├── CF.py ├── FFT.py ├── Heston_pricer.py ├── Kalman_filter.py ├── Merton_pricer.py ├── NIG_pricer.py ├── Parameters.py ├── Processes.py ├── Solvers.py ├── TC_pricer.py ├── VG_pricer.py ├── __init__.py ├── cost_utils.py ├── cython ├── __init__.py ├── heston.pyx └── solvers.pyx ├── portfolio_optimization.py └── probabilities.py /.flake8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/.flake8 -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/.github/FUNDING.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/.gitignore -------------------------------------------------------------------------------- /1.1 Black-Scholes numerical methods.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/1.1 Black-Scholes numerical methods.ipynb -------------------------------------------------------------------------------- /1.2 SDE simulations and statistics.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/1.2 SDE simulations and statistics.ipynb -------------------------------------------------------------------------------- /1.3 Fourier transform methods.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/1.3 Fourier transform methods.ipynb -------------------------------------------------------------------------------- /1.4 SDE - Heston model.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/1.4 SDE - Heston model.ipynb -------------------------------------------------------------------------------- /1.5 SDE - Lévy processes.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/1.5 SDE - Lévy processes.ipynb -------------------------------------------------------------------------------- /2.1 Black-Scholes PDE and sparse matrices.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/2.1 Black-Scholes PDE and sparse matrices.ipynb -------------------------------------------------------------------------------- /2.2 Exotic options.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/2.2 Exotic options.ipynb -------------------------------------------------------------------------------- /2.3 American Options.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/2.3 American Options.ipynb -------------------------------------------------------------------------------- /3.1 Merton jump-diffusion, PIDE method.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/3.1 Merton jump-diffusion, PIDE method.ipynb -------------------------------------------------------------------------------- /3.2 Variance Gamma model, PIDE method.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/3.2 Variance Gamma model, PIDE method.ipynb -------------------------------------------------------------------------------- /3.3 Pricing with the NIG Process.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/3.3 Pricing with the NIG Process.ipynb -------------------------------------------------------------------------------- /4.1 Option pricing with transaction costs.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/4.1 Option pricing with transaction costs.ipynb -------------------------------------------------------------------------------- /4.2 Volatility smile and model calibration.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/4.2 Volatility smile and model calibration.ipynb -------------------------------------------------------------------------------- /5.1 Linear regression - Kalman filter.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/5.1 Linear regression - Kalman filter.ipynb -------------------------------------------------------------------------------- /5.2 Kalman auto-correlation tracking - AR(1) process.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/5.2 Kalman auto-correlation tracking - AR(1) process.ipynb -------------------------------------------------------------------------------- /5.3 Volatility tracking.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/5.3 Volatility tracking.ipynb -------------------------------------------------------------------------------- /6.1 Ornstein-Uhlenbeck process and applications.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/6.1 Ornstein-Uhlenbeck process and applications.ipynb -------------------------------------------------------------------------------- /7.1 Classical MVO.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/7.1 Classical MVO.ipynb -------------------------------------------------------------------------------- /A.1 Solution of linear equations.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/A.1 Solution of linear equations.ipynb -------------------------------------------------------------------------------- /A.2 Optimize and speed up the code. (SOR algorithm, Cython and C).ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/A.2 Optimize and speed up the code. (SOR algorithm, Cython and C).ipynb -------------------------------------------------------------------------------- /A.3 Introduction to Lévy processes and PIDEs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/A.3 Introduction to Lévy processes and PIDEs.pdf -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/CITATION.cff -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/README.md -------------------------------------------------------------------------------- /data/historical_data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/data/historical_data.csv -------------------------------------------------------------------------------- /data/spy-options-exp-2020-07-10-weekly-show-all-stacked-07-05-2020.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/data/spy-options-exp-2020-07-10-weekly-show-all-stacked-07-05-2020.csv -------------------------------------------------------------------------------- /data/spy-options-exp-2021-01-15-weekly-show-all-stacked-07-05-2020.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/data/spy-options-exp-2021-01-15-weekly-show-all-stacked-07-05-2020.csv -------------------------------------------------------------------------------- /data/stocks_data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/data/stocks_data.csv -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/environment.yml -------------------------------------------------------------------------------- /latex/A.3 Introduction to Lévy processes and PIDEs.bbl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/latex/A.3 Introduction to Lévy processes and PIDEs.bbl -------------------------------------------------------------------------------- /latex/A.3 Introduction to Lévy processes and PIDEs.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/latex/A.3 Introduction to Lévy processes and PIDEs.tex -------------------------------------------------------------------------------- /list_of_packages.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/list_of_packages.txt -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/pyproject.toml -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/requirements.txt -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/setup.py -------------------------------------------------------------------------------- /src/C/BS_SOR_main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/C/BS_SOR_main.c -------------------------------------------------------------------------------- /src/C/BS_sor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/C/BS_sor -------------------------------------------------------------------------------- /src/C/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/C/Makefile -------------------------------------------------------------------------------- /src/C/PDE_solver.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/C/PDE_solver.c -------------------------------------------------------------------------------- /src/C/PDE_solver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/C/PDE_solver.h -------------------------------------------------------------------------------- /src/C/SOR.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/C/SOR.c -------------------------------------------------------------------------------- /src/C/SOR.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/C/SOR.h -------------------------------------------------------------------------------- /src/C/mainSOR.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/C/mainSOR.c -------------------------------------------------------------------------------- /src/FMNM/BS_pricer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/BS_pricer.py -------------------------------------------------------------------------------- /src/FMNM/CF.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/CF.py -------------------------------------------------------------------------------- /src/FMNM/FFT.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/FFT.py -------------------------------------------------------------------------------- /src/FMNM/Heston_pricer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/Heston_pricer.py -------------------------------------------------------------------------------- /src/FMNM/Kalman_filter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/Kalman_filter.py -------------------------------------------------------------------------------- /src/FMNM/Merton_pricer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/Merton_pricer.py -------------------------------------------------------------------------------- /src/FMNM/NIG_pricer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/NIG_pricer.py -------------------------------------------------------------------------------- /src/FMNM/Parameters.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/Parameters.py -------------------------------------------------------------------------------- /src/FMNM/Processes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/Processes.py -------------------------------------------------------------------------------- /src/FMNM/Solvers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/Solvers.py -------------------------------------------------------------------------------- /src/FMNM/TC_pricer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/TC_pricer.py -------------------------------------------------------------------------------- /src/FMNM/VG_pricer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/VG_pricer.py -------------------------------------------------------------------------------- /src/FMNM/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/__init__.py -------------------------------------------------------------------------------- /src/FMNM/cost_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/cost_utils.py -------------------------------------------------------------------------------- /src/FMNM/cython/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/FMNM/cython/heston.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/cython/heston.pyx -------------------------------------------------------------------------------- /src/FMNM/cython/solvers.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/cython/solvers.pyx -------------------------------------------------------------------------------- /src/FMNM/portfolio_optimization.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/portfolio_optimization.py -------------------------------------------------------------------------------- /src/FMNM/probabilities.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cantaro86/Financial-Models-Numerical-Methods/HEAD/src/FMNM/probabilities.py --------------------------------------------------------------------------------