Class MinimumVarianceHedge

java.lang.Object
com.quantfinlib.hedging.MinimumVarianceHedge

public final class MinimumVarianceHedge extends Object
Minimum-variance and beta hedging with futures or a correlated proxy:
  • Optimal hedge ratio h* = cov(asset, hedge) / var(hedge) — the classic OLS/minimum-variance ratio.
  • Hedge effectiveness — the fraction of variance removed at the optimal ratio (= correlation², the standard 80%+ effectiveness test).
  • Futures contract sizing — contracts to move a portfolio from its current beta to a target beta.
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    betaAdjustmentContracts(double currentBeta, double targetBeta, double portfolioValue, double futuresPrice, double contractMultiplier)
    Futures contracts (negative = sell) to shift a portfolio from currentBeta to targetBeta: N = (targetBeta - currentBeta) * V / (F * multiplier).
    static double
    fullHedgeContracts(double beta, double portfolioValue, double futuresPrice, double contractMultiplier)
    Contracts to fully hedge (target beta 0) — negative = sell futures.
    static double[]
    hedgedReturns(double[] assetReturns, double[] hedgeReturns, double ratio)
    Return series of the hedged position: asset - ratio × hedge.
    static double
    hedgeEffectiveness(double[] assetReturns, double[] hedgeReturns)
    Fraction of asset variance eliminated at the optimal hedge ratio (equals the squared correlation).
    static double
    hedgeRatio(double[] assetReturns, double[] hedgeReturns)
    Optimal (variance-minimizing) hedge ratio: units of hedge per unit of asset.
    static double
    varianceReduction(double[] assetReturns, double[] hedgeReturns, double ratio)
    Realized variance reduction of a given hedge ratio versus unhedged.

    Methods inherited from class java.lang.Object

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

    • hedgeRatio

      public static double hedgeRatio(double[] assetReturns, double[] hedgeReturns)
      Optimal (variance-minimizing) hedge ratio: units of hedge per unit of asset.
    • hedgeEffectiveness

      public static double hedgeEffectiveness(double[] assetReturns, double[] hedgeReturns)
      Fraction of asset variance eliminated at the optimal hedge ratio (equals the squared correlation).
    • hedgedReturns

      public static double[] hedgedReturns(double[] assetReturns, double[] hedgeReturns, double ratio)
      Return series of the hedged position: asset - ratio × hedge.
    • varianceReduction

      public static double varianceReduction(double[] assetReturns, double[] hedgeReturns, double ratio)
      Realized variance reduction of a given hedge ratio versus unhedged.
    • betaAdjustmentContracts

      public static double betaAdjustmentContracts(double currentBeta, double targetBeta, double portfolioValue, double futuresPrice, double contractMultiplier)
      Futures contracts (negative = sell) to shift a portfolio from currentBeta to targetBeta: N = (targetBeta - currentBeta) * V / (F * multiplier).
    • fullHedgeContracts

      public static double fullHedgeContracts(double beta, double portfolioValue, double futuresPrice, double contractMultiplier)
      Contracts to fully hedge (target beta 0) — negative = sell futures.