Class MinimumVarianceHedge
java.lang.Object
com.quantfinlib.hedging.MinimumVarianceHedge
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 TypeMethodDescriptionstatic doublebetaAdjustmentContracts(double currentBeta, double targetBeta, double portfolioValue, double futuresPrice, double contractMultiplier) Futures contracts (negative = sell) to shift a portfolio fromcurrentBetatotargetBeta:N = (targetBeta - currentBeta) * V / (F * multiplier).static doublefullHedgeContracts(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 doublehedgeEffectiveness(double[] assetReturns, double[] hedgeReturns) Fraction of asset variance eliminated at the optimal hedge ratio (equals the squared correlation).static doublehedgeRatio(double[] assetReturns, double[] hedgeReturns) Optimal (variance-minimizing) hedge ratio: units of hedge per unit of asset.static doublevarianceReduction(double[] assetReturns, double[] hedgeReturns, double ratio) Realized variance reduction of a given hedge ratio versus unhedged.
-
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 fromcurrentBetatotargetBeta: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.
-