Asian Option
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}")