Beispiel #1
0
        public static Amount CalculateCurvatureAmount(Sensitivity sensitivity)
        {
            if (sensitivity == null)
            {
                throw new ArgumentNullException(nameof(sensitivity));
            }

            if (sensitivity.Category != SensitivityCategory.Vega)
            {
                throw new ArgumentException("Invalid sensitivity specified.", nameof(sensitivity));
            }

            Decimal days       = sensitivity.Tenor.Days;
            Decimal scaledDays = ModelParameters.GetCurvatureScaledDays(days);

            return(sensitivity.Amount * scaledDays);
        }