Skip to content

rfals/Asian-Options-Pricing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asian-Options-Pricing

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.

Features

  • 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.

Repository Structure

.
├── 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

Getting Started

Prerequisites

  • Python 3.11
  • Conda (recommended)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/Asian-Options-Pricing.git
    cd Asian-Options-Pricing
  2. Create and activate the Conda environment:

    conda env create -f environment.yml
    conda activate asian-options-pricing

Usage

  • 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)

Parameters

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

About

Asian Options Pricing Excersise with Monte Carlo method

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published