Esempio n. 1
0
        /// <summary>
        /// Prices the product.
        /// </summary>
        /// <param name="reportingParty"></param>
        /// <param name="valuationDate"></param>
        /// <param name="market"></param>
        /// <returns></returns>
        public double GetParRate(string reportingParty, DateTime valuationDate, IMarketEnvironment market)
        {
            var modelData = CreateInstrumentModelData(new List <string> {
                InstrumentMetrics.ImpliedQuote.ToString()
            }, valuationDate, market, PriceableProduct.PaymentCurrencies[0], reportingParty);
            var av = PriceableProduct.Calculate(modelData);

            return((double)av.quote[0].value);
        }
Esempio n. 2
0
        /// <summary>
        /// Returns the npv.
        /// </summary>
        /// <param name="reportingParty"></param>
        /// <param name="baseCurrency"></param>
        /// <param name="valuationDate"></param>
        /// <param name="market"></param>
        /// <returns></returns>
        public double GetNPV(string reportingParty, string baseCurrency, DateTime valuationDate, IMarketEnvironment market)
        {
            var modelData = CreateInstrumentModelData(new List <string> {
                InstrumentMetrics.NPV.ToString()
            }, valuationDate, market, baseCurrency, reportingParty);
            var av = PriceableProduct.Calculate(modelData);

            return((double)av.quote[0].value);
        }