Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="expirationAsDate"></param>
        /// <param name="strike"></param>
        /// <returns></returns>
        public double GetValueByExpirationAndStrike(DateTime expirationAsDate, double strike)
        {
            var    dataPoints = GetDataPoints();
            var    baseDate   = PricingStructureValuation.baseDate.Value;
            double dimension1 = (expirationAsDate - baseDate).TotalDays / 365.0;

            return(VolatilitySurfaceHelper.GetValue(dataPoints, dimension1, strike));
        }
Beispiel #2
0
        ///<summary>
        ///</summary>
        ///<param name="dimension1"></param>
        ///<param name="dimension2"></param>
        ///<returns></returns>
        ///<exception cref="NotImplementedException"></exception>
        public double GetValue(double dimension1, double dimension2)
        {
            var dataPoints = GetDataPoints();

            return(VolatilitySurfaceHelper.GetValue(dataPoints, dimension1, dimension2));
        }