28 private readonly
Option _futureOption;
55 public FuturesOptionsMarginModel(decimal requiredFreeBuyingPowerPercent = 0,
Option futureOption =
null) : base(requiredFreeBuyingPowerPercent, futureOption?.Underlying)
57 _futureOption = futureOption;
91 var underlyingRequirement = base.GetInitialMarginRequirement(parameters.
ForUnderlying()).
Value;
106 var maximumValue = underlyingRequirement;
107 var curveGrowthRate = -7.8m;
122 curveGrowthRate = -4m;
124 underlyingPrice *= 1.5m;
129 maximumValue *= 1.25m;
131 curveGrowthRate = 2.4m;
133 underlyingPrice *= 0.30m;
141 curveGrowthRate = 9m;
145 maximumValue *= 1.20m;
151 var denominator = Math.Pow(Math.E, (
double) (-curveGrowthRate * (option.
ScaledStrikePrice - underlyingPrice) / underlyingPrice));
153 if (
double.IsInfinity(denominator))
157 if (denominator.IsNaNOrZero())
159 return (
int) maximumValue;
162 return (
int) (maximumValue / (1 + denominator).SafeDecimalCast());