Class Autocallable

java.lang.Object
com.quantfinlib.pricing.Autocallable

public final class Autocallable extends Object
Autocallable note pricer — the flagship equity structured product: a note that pays a fat coupon and redeems early ("autocalls") the first observation date the underlier closes at or above the autocall barrier. If it survives to maturity, the principal is protected UNLESS the underlier has fallen through the knock-in barrier, in which case the holder takes the equity loss — the note is, economically, a bond plus sold down-and-in put, funded by the coupons.

Structure priced here (single underlier, the classic form):

  • Observation dates observationYears[i]; at each, if S ≥ autocallBarrier × S₀: redeem notional + the coupon for that period, plus any previously missed coupons when memoryCoupons is set (the "Phoenix memory" feature);
  • At each observation where S ≥ couponBarrier × S₀ but below the autocall barrier: pay the coupon, note continues;
  • At maturity (the last observation) without autocall: redeem notional if S_T ≥ knockInBarrier × S₀, else redeem notional × S_T/S₀ — the equity loss.

Model honesty. Monte Carlo under Black-Scholes GBM with flat volatility and rates — the standard first pricer, NOT a desk-grade one: real autocall books are priced on local/stochastic vol because the knock-in put is deeply smile-sensitive (feed a vol appropriate to the downside strike region, e.g. from VolSurface, as a first-order correction). European knock-in (observed at maturity only), observation-date monitoring (no continuous barriers), no issuer credit spread — each a documented simplification. Antithetic variates halve the variance; a fixed seed makes every price reproducible and every test exact.

Immutable and thread-safe; construction validates, price(double, double, double, double, double, int, long) allocates only its path scratch (research lane).

  • Constructor Summary

    Constructors
    Constructor
    Description
    Autocallable(double notional, double[] observationYears, double autocallBarrier, double couponBarrier, double knockInBarrier, double couponPerPeriod, boolean memoryCoupons)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    int
     
    double
    price(double spot, double initial, double vol, double rate, double divYield, int paths, long seed)
    Monte Carlo present value under GBM.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Autocallable

      public Autocallable(double notional, double[] observationYears, double autocallBarrier, double couponBarrier, double knockInBarrier, double couponPerPeriod, boolean memoryCoupons)
      Parameters:
      notional - redemption amount, e.g. 1_000_000
      observationYears - strictly increasing observation times in years; the last is maturity
      autocallBarrier - autocall trigger as a fraction of initial spot, e.g. 1.00
      couponBarrier - coupon trigger as a fraction of initial spot, ≤ autocallBarrier, e.g. 0.80
      knockInBarrier - protection barrier as a fraction of initial spot, e.g. 0.60
      couponPerPeriod - coupon per observation period as a fraction of notional, e.g. 0.02
      memoryCoupons - missed coupons are caught up at the next paying observation (Phoenix memory)
  • Method Details

    • price

      public double price(double spot, double initial, double vol, double rate, double divYield, int paths, long seed)
      Monte Carlo present value under GBM.
      Parameters:
      spot - current underlier level (S₀ for a new issue)
      initial - the strike-setting initial level S₀ (equal to spot at issue; differs for a seasoned note)
      vol - Black-Scholes volatility, per √year — pick it from the downside smile region, not ATM (see class doc)
      rate - continuously-compounded discount rate
      divYield - continuous dividend yield
      paths - Monte Carlo paths (antithetic: 2 per draw), e.g. 100_000
      seed - RNG seed — fixed seed = reproducible price
    • notional

      public double notional()
    • observations

      public int observations()