/// <summary>
        /// Helper function used to set the ATM strike and volatility used in
        /// the calibration of the SABR engine.
        /// Preconditions: Methods SetStrikesForSABREngine and
        /// SetVolatilitiesForSABREngine have been called.
        /// Postconditions: data structures that store the strikes and
        /// volatilities used in the calibration of the SABR engine are each
        /// expanded by one element and then sorted, and the private field
        /// _assetPrice is set.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="cache">The cache.</param>
        /// <param name="nameSpace">The clients namespace</param>
        /// <param name="expiry">Caplet expiry.</param>
        private void SetATMDataForSABREngine(ILogger logger, ICoreCache cache, string nameSpace, DateTime expiry)
        {
            // Set the ATM volatility.
            var interpType =
                _smileSettings.ExpiryInterpolationType;
            var interpObj =
                new ExpiryInterpolatedVolatility
                    (_atmBootstrapEngine, interpType);
            var volatility = interpObj.ComputeVolatility(expiry);

            _sabrVolatilities.Add(volatility);
            _assetPrice = _atmBootstrapEngine.ComputeForwardPrice(logger, cache, nameSpace, expiry);
            _sabrStrikes.Add(_assetPrice);
            // Sort the strikes into ascending order, and maintain the
            // corresponding volatility.
            var strikeVol =
                new SortedList <decimal, decimal>(); // temporary container
            var idx = 0;

            foreach (var strike in _sabrStrikes)
            {
                strikeVol.Add(strike, _sabrVolatilities[idx]);
                ++idx;
            }
            _sabrStrikes      = new List <decimal>();
            _sabrVolatilities = new List <decimal>();
            foreach (var key in strikeVol.Keys)
            {
                _sabrStrikes.Add(key);
                _sabrVolatilities.Add(strikeVol[key]);
            }
        }
        /// <summary>
        /// Helper function used to set the volatilities used in the
        /// calibration of the SABR engine.
        /// Postcondition: private field _sabrVolatilities is set.
        /// </summary>
        /// <param name="expiry">The expiry.</param>
        private void SetVolatilitiesForSABREngine(DateTime expiry)
        {
            _sabrVolatilities = new List <decimal>();
            var interpType =
                _smileSettings.ExpiryInterpolationType;

            // Retrieve the volatility at the given expiry.
            foreach (var eng in _fixedStrikeBootstrapEngines)
            {
                var obj =
                    new ExpiryInterpolatedVolatility(eng, interpType);

                var volatility = obj.ComputeVolatility(expiry);
                _sabrVolatilities.Add(volatility);
            }
        }