Price Exotic & Multi-Asset Trades

Price an Asian Option and Its Averaging Risk

The Java Asian call prices the path average and differentiates the same recorded tape for spot and volatility.

Market
SimulationOptional

The browser workload defaults to 20,000 scenarios on the portable CPU engine.

Java source
AsianOptionRiskStudio.java

This exact source runs in TeaVM. Form changes update its Java literals and reset manual edits.

import com.nablatensor.engine.Nabla;
import com.nablatensor.quant.EquityMarket;
import com.nablatensor.quant.MonteCarlo;
import com.nablatensor.quant.Products;

public final class AsianOptionRiskStudio {
  private AsianOptionRiskStudio() {}

  public static void main(String[] args) {
    EquityMarket market = EquityMarket.of()
        .spot(100)
        .strike(100)
        .vol(20 / 100.0)
        .rate(3 / 100.0)
        .maturity(1)
        .build();
    int steps = 60;
    long scenarios = 20000L;
    long seed = 42L;
    try (MonteCarlo<EquityMarket> pricer = MonteCarlo.of(Products.asianCall())
        .market(market)
        .steps(steps)
        .fp64()
        .greeks()
        .on("cpu")
        .build()) {
      Nabla.TypedValuation<EquityMarket> v = pricer.run(scenarios, seed);
      System.out.println("RESULT|" + v.price() + "|" + v.standardError() + "|" + v.greek(EquityMarket::spot)
          + "|" + v.greek(EquityMarket::vol) + "|" + pricer.nodes() + "|" + v.seconds());
    }
  }
}
TeaVM compiles and runs the Java source above in this browser.
Implementation guide

Averaging creates path dependence

An Asian option depends on a sequence of fixings, so its risk reflects the entire simulated path rather than only terminal price.

Core mechanism

The valuation accumulates a path average before applying the payoff. The tape captures each fixing's contribution, allowing the reverse pass to return Greeks through the same path computation.

Practical workflow

Set the observation schedule and averaging convention explicitly, use convergence diagnostics for paths and time steps, and compare selected cases to an analytic approximation or independent engine.

Key details

*Keywords: asian option monte carlo java, gpu monte carlo greeks, java vector api monte carlo, adjoint aad asian option*

An arithmetic-average Asian call has no closed form. The Java cell records the payoff and computes its price, spot delta and vega on the portable TeaVM CPU backend.

Adjust the market inputs, number of fixings, scenario count and seed to explore averaging risk and Monte Carlo uncertainty. The displayed replay time belongs to that browser run.

JVM benchmarks using cpu-jit, SIMD or GPU engines require a separate Java runtime and suitable hardware. Their throughput figures do not describe this browser calculator.

Scope and review point

The demonstration uses stylised GBM and a simple schedule. Contractual averaging, corporate actions and volatility-surface dynamics need fuller treatment in production.