Skip to content

Vira-Kanishka/Tensor-Network-Asian-Options

Repository files navigation

Binomial Pricing of Arithmetic Asian Options with Tensor Networks

An implementation of the tensor-network method for binomial pricing of arithmetic-average Asian options, following Boosting Binomial Exotic Option Pricing with Tensor Networks by van Damme et al. (2025). The standard binomial method scales exponentially in number of time steps for path-dependent payoffs, representing the path sum as a matrix product state (tensor train) reduces this to linear scaling in the number of steps at a fixed bond dimension.

What it does

Three numerical methods price the same discrete binomial model and can be compared against one another:

  • Exact summation over all 2^N paths. The true binomial price with no approximation; used as the ground-truth reference, practical only for small N (up to roughly N = 22).
  • Monte Carlo sampling of binomial paths. The conventional benchmark, with error decreasing as 1/sqrt(N_s) in the number of samples.
  • Tensor-train cross (TTcross) approximation. Represents the path sum as a matrix product state and evaluates it in time linear in N at fixed bond dimension. This is the paper's method.

The pricer reports a TTcross price with a cross-check (exact summation when N is small, otherwise Monte Carlo), and a separate comparison function runs all three methods and reports price, accuracy, and walltime.

File

  • asian_tn_notebook.ipynb — the documented notebook: mathematical basis, assumptions, the three methods, worked examples, and the method comparison.

Installation

pip install -r requirements.txt

Dependencies: numpy, torch, tntorch. The TTcross step runs on a compiled torch/tntorch backend.

Usage

Notebook: open asian_tn_notebook.ipynb, run the cells from the top, and set parameters in the pricing cell (Section 6).

Script:

python asian_tn.py

prompts for spot, strike, maturity, rate, volatility, number of steps, scheme (CRR or RB), and option type (call or put), then prices the option.

Or import the functions directly:

from asian_tn import BinomialParams, price_report, print_report, compare_methods, print_comparison

params = BinomialParams(S0=100, K=100, T=1.0, r=0.10, sigma=0.50,
                        N=20, scheme="CRR", option="call")
print_report(price_report(params))
print_comparison(compare_methods(params))

A note on local execution

On some machines the torch/tntorch cross step can crash the Python kernel due to a duplicate OpenMP runtime conflict (a no-traceback "kernel died" message). If this occurs, set the following environment variables before importing any libraries:

import os
os.environ["OMP_NUM_THREADS"] = "1"
os.environ["MKL_NUM_THREADS"] = "1"
os.environ["MKL_THREADING_LAYER"] = "GNU"
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"

The notebook includes this cell at the top.

Scope and assumptions

  • European-style arithmetic Asian options (fixed strike), priced under constant-volatility geometric Brownian motion, a constant risk-free rate, no dividends, and a frictionless risk-neutral market.
  • Both the Cox-Ross-Rubinstein (CRR) and Rendleman-Bartter (RB) binomial schemes are supported. The two schemes give slightly different prices at finite N and converge as N grows.
  • American (early-exercise) Asian options are beyond scope.

References

About

Tensor-network method for Binomial pricing of arithmetic Asian options

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors