/// <summary>
        /// Sets the marketQuote.
        /// </summary>
        /// <param name="quotes">The quotes.</param>
        /// <param name="measureType">The measure type.</param>
        protected void SetQuote(String measureType, IList <BasicQuotation> quotes)
        {
            BasicQuotation normalisedQuote = MarketQuoteHelper.GetMarketQuoteAndNormalise(measureType, quotes);

            IsVolatilityQuote = true;
            if (normalisedQuote != null)
            {
                if (normalisedQuote.measureType.Value == VolatilityQuotationType)
                {
                    MarketQuote = normalisedQuote;
                    Volatility  = normalisedQuote.value;
                }
                if (measureType == "SpotRate")
                {
                    ParRate = normalisedQuote.value;
                }
                if (measureType == "Strike")
                {
                    Strike = normalisedQuote.value;
                }
                if (measureType == "Premium")
                {
                    Premium = normalisedQuote.value;
                }
            }
        }
        /// <summary>
        /// Sets the marketQuote.
        /// </summary>
        /// <param name="quotes">The quotes.</param>
        /// <param name="measureType">The measure type.</param>
        private void SetQuote(String measureType, IList <BasicQuotation> quotes)
        {
            BasicQuotation normalisedQuote = MarketQuoteHelper.GetMarketQuoteAndNormalise(measureType, quotes);

            IsVolatilityQuote = true;
            if (normalisedQuote == null)
            {
                return;
            }
            if (normalisedQuote.measureType.Value == VolatilityQuotationType)
            {
                MarketQuote = normalisedQuote;
                Volatility  = normalisedQuote.value;
            }
        }
Exemple #3
0
        /// <summary>
        /// Sets the marketQuote.
        /// </summary>
        /// <param name="quotes">The quotes.</param>
        /// <param name="measureType">The measure type.</param>
        protected void SetQuote(String measureType, IList <BasicQuotation> quotes)
        {
            BasicQuotation normalisedQuote = MarketQuoteHelper.GetMarketQuoteAndNormalise(measureType, quotes);

            IsVolatilityQuote = true;
            if (normalisedQuote.measureType.Value == VolatilityQuotationType)
            {
                MarketQuote = normalisedQuote;
                Volatility  = MarketQuote.value;
            }
            if (measureType == "ForwardRate")
            {
                ForwardRate = normalisedQuote.value;
            }
            if (measureType == "Strike")
            {
                Strike = normalisedQuote.value;
            }
        }