Skip to content

Astatium5/Quantum-Option-Pricing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantum Option Pricing

Python 3.11 Qiskit License: MIT

CSCI 5244: Quantum Computation and Information — Final Project

Project Overview

This project implements Quantum Amplitude Estimation (QAE) for pricing European Call Options, reproducing and extending the methodology from "Option Pricing using Quantum Computers" (Stamatopoulos et al., 2019).

Key Highlights

  • End-to-end workflow: From Black-Scholes financial model to IBM Quantum hardware execution
  • Quadratic speedup demonstration: Convergence analysis showing $O(M^{-1})$ vs $O(M^{-1/2})$ scaling
  • NISQ-compatible: Tested on real IBM Quantum hardware with noise analysis
  • Modular architecture: Reusable utility library for quantum finance experiments

Technical Architecture

┌─────────────────────────────────────────────────────────────────┐
│                    Black-Scholes Model                          │
│                (S₀, K, r, σ, T parameters)                      │
└─────────────────────────┬───────────────────────────────────────┘
                          ▼
┌─────────────────────────────────────────────────────────────────┐
│              LogNormal Distribution Circuit                      │
│         (Encodes price distribution into qubit amplitudes)       │
└─────────────────────────┬───────────────────────────────────────┘
                          ▼
┌─────────────────────────────────────────────────────────────────┐
│                 Payoff Encoding (RY rotations)                   │
│              (Maps max(S-K, 0) to objective qubit)               │
└─────────────────────────┬───────────────────────────────────────┘
                          ▼
┌──────────────────────────────────────────────────────────────────┐
│         Iterative Amplitude Estimation (IAE)                     │
│    (Estimates E[payoff] with O(1/M) convergence)                 │
└──────────────────────────────────────────────────────────────────┘

Algorithm: We use Iterative Amplitude Estimation (IAE) which avoids Quantum Phase Estimation, making it more suitable for NISQ devices with limited coherence times.


Results Summary

Convergence Analysis

The core result of this project: demonstrating the theoretical quadratic speedup of QAE over classical Monte Carlo.

Convergence Comparison

This log-log plot shows error vs computational budget. Classical MC scales as $O(M^{-1/2})$ (dashed line), while IAE achieves $O(M^{-1})$ scaling (solid line) — a quadratic improvement.

Method Convergence Rate Description
Classical Monte Carlo $O(M^{-1/2})$ Standard sampling error scaling
Quantum Amplitude Estimation $O(M^{-1})$ Quadratic speedup achieved

Price Estimation Comparison

Price Estimates

Comparison of price estimates from different methods. The dashed line shows the exact discretized baseline. Note the tighter confidence intervals from quantum methods compared to classical sampling.


Absolute Error Analysis

Absolute Error

Absolute error relative to the true discretized baseline across different estimation methods and configurations.


Hardware Execution Results

Configuration Estimated Price 95% CI
Classical MC (10M samples) $0.170
IAE (Ideal Simulation) $0.168 [0.161, 0.174]
3Q IAE (IBM ibm_fez) $0.243 [0.219, 0.266]

Note: Hardware results show deviation due to NISQ noise (decoherence, gate errors). The 3-qubit simplified circuit demonstrates the algorithm's execution on real hardware while highlighting current limitations.


Repository Structure

File/Directory Description
option_pricing.ipynb Main analysis notebook with all experiments
Final_Report.pdf Complete project report with methodology and findings
utils/ Reusable Python utilities for QAE experiments
results/ Convergence data (JSONL) and visualization plots
environment.yml Conda environment for reproducibility

Setup & Installation

1. Clone the repository

git clone https://github.com/Astatium5/Quantum-Option-Pricing.git
cd Quantum-Option-Pricing

2. Create the Conda environment

conda env create -f environment.yml
conda activate quantum-option-pricing

3. Configure IBM Quantum (optional, for hardware runs)

Create a .env file with your credentials:

IBM_QUANTUM_KEY=your_actual_api_key_here
IBM_QUANTUM_INSTANCE=your_ibm_quantum_instance_name_here

4. Run the notebook

jupyter notebook option_pricing.ipynb

Google Colab: Uncomment the !pip install cell at the top if using Colab.


References

  1. Stamatopoulos, N., et al. "Option Pricing using Quantum Computers." arXiv:1905.02666 (2019)
  2. Qiskit Finance — European Call Option Pricing Tutorial

Team

Name Role
Dima Golubenko Quantum Implementation Specialist
Navnith Bharadwaj Classical & Analysis Specialist

License

This project is licensed under the MIT License — see LICENSE for details.

About

Quantum Computing Final Project: Benchmarking Quantum Amplitude Estimation against Classical Monte Carlo for financial option pricing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors