コード例 #1
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 != 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;
                }
            }
        }
コード例 #2
0
        /// <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;
            }
        }
コード例 #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;
            }
        }