double IAsianOptionPricingService.ComputeValue(OptionPricingParameters parameters) { // Preconditions if (parameters == null) { throw new ArgumentNullException("parameters"); } // Compute the current price of the option. return s_gpuPricingEngine.CalculatePrice(new AsianOptionSingle( // TEMP : The pricing engine uses an older bit of code which was only designed for // single-precision -- so for now, truncate the input parameters before computing the option value. (float)parameters.SpotPrice, (float)parameters.StrikePrice, (float)parameters.RiskFreeRate, (float)parameters.Volatility, (float)parameters.Tenor, (OptionType)(int)parameters.Kind, (float)parameters.TimestepLength )); }
double IAsianOptionPricingService.ComputeValue(OptionPricingParameters parameters) { // Preconditions if (parameters == null) { throw new ArgumentNullException("parameters"); } // Compute the current price of the option. return(s_gpuPricingEngine.CalculatePrice(new AsianOptionSingle( // TEMP : The pricing engine uses an older bit of code which was only designed for // single-precision -- so for now, truncate the input parameters before computing the option value. (float)parameters.SpotPrice, (float)parameters.StrikePrice, (float)parameters.RiskFreeRate, (float)parameters.Volatility, (float)parameters.Tenor, (OptionType)(int)parameters.Kind, (float)parameters.TimestepLength ))); }