Skip to content

yaaks7/options-pricing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Project Overview

This project is an options pricing tool that allows users to calculate the prices of financial options using different models, generate heatmaps for price sensitivity, and analyze options' sensitivities to key factors. The application is built using a Python backend with FastAPI and a frontend to provide an interactive user interface. It also includes features for historical data analysis and Greeks sensitivity calculations.

2. Usage Guide

2.1 Generate Price

To generate the price of an option, navigate to the 'Options Pricing' section. Input the necessary data such as the strike price, current price, volatility, interest rate, and time to maturity. The application will calculate both the call and put option prices using the selected pricing model.

2.2 Heatmap

The heatmap feature allows users to visualize the profit and loss (P&L) across a range of volatility and spot prices. Select the desired input values, and a heatmap will be generated, showing the P&L gradients.

2.3 Option Sensitivity

Option sensitivity provides analysis on how the option's price responds to various inputs. When using the neural network model, the request may take 1 to 2 minutes. Do not worry if the processing time is slightly longer !

2.4 Greeks Sensitivity

The Greeks sensitivity tool calculates and displays the option Greeks (Delta, Gamma, Theta, Vega, and Rho) to help users understand how the option price is affected by changes in underlying factors.

2.5 History

The history feature tracks previous calculations, allowing users to review past option pricing data. Requests are automatically deleted from the history after 7 days, or you can delete them all manually using the delete button.

3. Dependencies

The project has the following dependencies:

  • fastapi==0.95.2: Modern, fast (high-performance) web framework for building APIs.
  • numpy: Library for numerical computations.
  • scipy==1.9.3: Used for scientific computing tasks.
  • pandas==1.5.2: Data analysis and manipulation library.
  • matplotlib==3.6.1: Plotting and visualization library.
  • scikit-learn==1.1.2: Machine learning library for data preprocessing and models.
  • uvicorn==0.19.0: ASGI server for running FastAPI applications.
  • requests==2.28.1: HTTP library for making requests.
  • tensorflow==2.17.0: Deep learning framework used for neural network models.
  • keras==3.3.3: Deep learning library running on top of TensorFlow.
  • joblib==1.2.0: Utility for saving and loading Python objects, used for saving models and scalers.