This repository provides a framework for pricing Asian options using Monte Carlo simulations. It includes Python code for simulating stock price and volatility paths, calculating option prices, and estimating option Greeks (Delta and Vega) for exotic options.
- Monte Carlo Simulation: Simulate possible paths for the underlying asset and its volatility.
- Asian Option Pricing: Calculate the price of Asian options using simulated paths.
- Greeks Calculation: Estimate Delta and Vega using finite difference methods.
- Jupyter Notebook: Step-by-step demonstration and visualization of the pricing process.
- Modular Code: All quantitative functions are organized in a reusable Python module.
.
├── data/ # Data output directory
├── notebooks/
│ └── 01_asian_option_pricing.ipynb # Main notebook with explanations and results
├── src/
│ ├── QuantFunctions.py # Core quantitative functions for simulation and pricing
│ └── pycache/ # Python cache files
├── environment.yml # Conda environment specification
├── README.md # Project documentation
├── LICENSE # License file (MIT)
└── .gitignore # Git ignore rules
- Python 3.11
- Conda (recommended)
-
Clone the repository:
git clone https://github.com/yourusername/Asian-Options-Pricing.git cd Asian-Options-Pricing
-
Create and activate the Conda environment:
conda env create -f environment.yml conda activate asian-options-pricing
- Run the Jupyter Notebook:
jupyter notebook notebooks/Asian_Option_Pricing.ipynb
- Follow the notebook for a guided explenation and interactive code execution.
- To use the core functions in your own scripts:
from QuantFunctions import QuantStuff qs = QuantStuff() S_matrix, V_matrix = qs.PriceSimulations(params, num_simulations, seed) price = qs.OptionsPrice(params, S_matrix) delta = qs.DeltaSimulations(params, num_greek_simulations, seed) vega = qs.VegaSimulations(params, num_greek_simulations, seed)
The main parameters for simulations are set in the notebook and include:
- Initial stock price
- Mean reversion rate
- Long-term variance
- Initial variance
- Volatility of variance
- Correlation between stock and variance
- Risk-free rate
- Time step
- Years to maturity
- Strike price