Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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.

NotificationsYou must be signed in to change notification settings

mcf-long-short/option-pricing-fourier-transform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stramlit app:https://share.streamlit.io/mcf-long-short/option-pricing-fourier-transform/main/app.py

Introduction

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.

Demo

streamlit-app-2021-09-12-14-09-33.mp4

How to run the code?

Running in docker container

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/

Running locally

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp