Asian Option
- torchquantlib.core.asset_pricing.option.asian_option.asian_option(option_type: str, spot: Tensor, strike: Tensor, expiry: Tensor, volatility: Tensor, rate: Tensor, steps: int) Tensor[source]
Price an arithmetic average Asian option using a modified binomial tree model.
This function implements a binomial tree approach to price Asian options, which are path-dependent options where the payoff depends on the average price of the underlying asset over a specified period.
- Parameters:
option_type (str) – Type of option - either ‘call’ or ‘put’.
spot (Tensor) – Current price of the underlying asset.
strike (Tensor) – Strike price of the option.
expiry (Tensor) – Time to expiration in years.
volatility (Tensor) – Volatility of the underlying asset.
rate (Tensor) – Risk-free interest rate (annualized).
steps (int) – Number of time steps in the binomial tree.
- Returns:
The price of the arithmetic average Asian option.
- Return type:
Tensor
Note
This implementation uses a simplified approach for Asian options within the binomial tree framework. It approximates the average at each node using only the current and next time step prices. For more accurate pricing of Asian options, more sophisticated methods like Monte Carlo simulation are often preferred.
Overview
The Asian Option module provides functionality for pricing and analyzing Asian-style options using various numerical methods. Asian options are path-dependent options where the payoff depends on the average price of the underlying asset over a specific period.
Key Features
Pricing of Asian call and put options
Support for arithmetic and geometric average price calculations
Implementation of multiple pricing methods (e.g., Monte Carlo simulation, analytical approximations)
Greeks calculation for risk management
Classes
AsianOption
Functions
Examples
Here’s a basic example of how to use the AsianOption class:
from torchquantlib.core.asset_pricing.option.asian_option import AsianOption
# Create an Asian call option
option = AsianOption(
underlying=100,
strike=95,
expiry=1.0,
rf_rate=0.05,
volatility=0.2,
option_type='call',
averaging_type='arithmetic',
averaging_period=0.5
)
# Price the option using the Monte Carlo method
price = option.price(method='monte_carlo', num_simulations=100000)
print(f"Asian call option price: {price:.4f}")
# Calculate option Greeks
delta = option.delta()
gamma = option.gamma()
theta = option.theta()
vega = option.vega()
rho = option.rho()
print(f"Delta: {delta:.4f}")
print(f"Gamma: {gamma:.4f}")
print(f"Theta: {theta:.4f}")
print(f"Vega: {vega:.4f}")
print(f"Rho: {rho:.4f}")