- Notifications
You must be signed in to change notification settings - Fork3
Option pricing: Simple app for vanilla option pricing using Black-Scholes model and Merton model via Fourier Transform. Spot prices for the underlying are fetched from Yahoo Finance API.
mcf-long-short/option-pricing-fourier-transform
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Stramlit app:https://share.streamlit.io/mcf-long-short/option-pricing-fourier-transform/main/app.py
Fourier Transform
andFast Fourier transforms (FFT)
represent popular approaches to option pricing. They provide a semi-closed form expressions forEuropean
andAmerican option prices
. Most importantly, calculation using these methods is fast and accurate, very useful when we need to bring the model to data (to calibrate it). A number of methods have been proposed in the literature. The goal of this project is to implement these algorithms forBlack–Scholes
andMerton model
. Brief introduction to the methods as well as implementation of various models in Python can be found inHilpisch (2015)
. A really nicely written intro to the Fourier transform and their applications in option pricing can be found inSchmeltze (2010)
.
This repository contains implementation of various Fourier transform methods for pricing options: Black–Scholes and Merton model via FT and FFT. There is an implementation of those models, astreamlit
web app for testing those models and jupyter notebook for model performance comparison under/notebooks/
directory.
Key implementation references:
- Hilpisch, Y. (2015) Derivatives Analytics with Python, John Wiley
- Schmeltze (2010) Fourier Pricing. Full title: Option Pricing formulae using Fourier Transform: Theory and Applications
This repository represents group project work for course inDerivatives
for advanced degreeMasters in Computational Finance, Union University.
streamlit-app-2021-09-12-14-09-33.mp4
Build image and run docker container:
docker build -t option-pricing-fourier:latest .docker run -p 8080:8080 option-pricing-fourier:latest
Streamlit app should be at:http://localhost:8080/
Create python venv and install requirements
# Create virtual envpython3 -m venv venv#Activate venv (Unix/MaxOS)source venv/bin/activate#Activate venv (Windows)venv\Scripts\activate.bat# Install requirementspython -m pip install -r requirements.txt
To run streamlit app:streamlit run app.py
About
Option pricing: Simple app for vanilla option pricing using Black-Scholes model and Merton model via Fourier Transform. Spot prices for the underlying are fetched from Yahoo Finance API.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.