/// <summary> /// Calculates the price of a hedged certificate /// </summary> /// <param name="underlyingPrice">Current price of the underlying</param> /// <param name="multiplier">Multiplier</param> /// <param name="strikePrice">Strike price</param> /// <param name="isLong">Long or short</param> /// <returns>Underlying Price</returns> public JsonResult CalculatePriceFromUnderlying(decimal?underlyingPrice, decimal?multiplier, decimal?strikePrice, bool?isLong) { var price = _priceCalculatorService.CalculatePriceFromUnderlying(underlyingPrice, multiplier, strikePrice, isLong); return(Json(price, JsonRequestBehavior.AllowGet)); }
/// <summary> /// Calculates the price of a hedged certificate /// </summary> /// <param name="underlyingPrice">Current price of the underlying</param> /// <param name="multiplier">Multiplier</param> /// <param name="strikePrice">Strike price</param> /// <param name="isLong">Long or short</param> /// <returns>Underlying Price</returns> public IActionResult CalculatePriceFromUnderlying(decimal?underlyingPrice, decimal?multiplier, decimal?strikePrice, bool?isLong) { var price = _priceCalculatorService.CalculatePriceFromUnderlying(underlyingPrice, multiplier, strikePrice, isLong); return(Json(price)); }