WebCab Options and Futures Web Services for .NET v3.1

FuturesHedging.ClosestHedge Method 

Evaluates the integer number of futures contracts which provide the closest to a perfect hedge for a physical position.

public double ClosestHedge(
   double hedgeRatio,
   double physicalPosition,
   double contractSize
);

Parameters

hedgeRatio
The optimal hedge ratio of the physical position which can be evaluated using HedgeRatio.
physicalPosition
The size of the absolute physical position.
contractSize
The contract size of each futures position. That is, the number of shares for an equity futures contract, the number of barrels for a crude oil contract and so on.

Return Value

The whole number of futures contracts which provide the closest to a perfect hedge for a physical position.

Remarks

Note that the physical position may refer to a physical or financial asset, for example for a stock position it will refer to the number of shares held, where as for a crude oil position it will refer to the number of barrels.

See Also

FuturesHedging Class | Futures Namespace