示例#1
0
        private static Pair <PricingStructure, PricingStructureValuation> CreateFpmlPair(ILogger logger, ICoreCache cache, string nameSpace, DateTime baseDate,
                                                                                         EquityCurveIdentifier curveId, FxRateSet assetSet, TermCurve termCurve, IBusinessCalendar fixingCalendar, IBusinessCalendar rollCalendar)
        {
            FpML.V5r3.Reporting.FxCurve fxCurve          = CreateEquityCurve(curveId.Id, curveId.CurveName, curveId.Currency);
            FxCurveValuation            fxCurveValuation = CreateEquityCurveValuation(logger, cache, nameSpace, curveId, fixingCalendar, rollCalendar, baseDate, assetSet, fxCurve.id, termCurve);

            return(new Pair <PricingStructure, PricingStructureValuation>(fxCurve, fxCurveValuation));
        }
示例#2
0
        /// <summary>
        /// Creates the pricing structure.
        /// </summary>
        protected void CreatePricingStructure(EquityCurveIdentifier curveId, TermCurve termCurve, FxRateSet quotedAssetSet)
        {
            FpML.V5r3.Reporting.FxCurve fxCurve          = CreateEquityCurve(curveId);
            FxCurveValuation            fxCurveValuation = CreateEquityCurveValuation(curveId, quotedAssetSet, termCurve);
            var fpmlData = new Pair <PricingStructure, PricingStructureValuation>(fxCurve, fxCurveValuation);

            SetFpMLData(fpmlData, false);
        }
示例#3
0
        /// <summary>
        /// Creates the pricing structure.
        /// </summary>
        protected void CreatePricingStructure(CommodityCurveIdentifier curveId, TermCurve termCurve, FxRateSet quotedAssetSet)
        {
            FpML.V5r3.Reporting.FxCurve yieldCurve          = CreateCommodityCurve(curveId);
            FxCurveValuation            yieldCurveValuation = CreateCommodiyCurveValuation(curveId, quotedAssetSet, yieldCurve.id, termCurve);
            var fpmlData = new Pair <PricingStructure, PricingStructureValuation>(yieldCurve, yieldCurveValuation);

            SetFpMLData(fpmlData, false);
        }
示例#4
0
        /// <summary>
        /// Creates the equity curve.
        /// </summary>
        /// <param name="curveId">The curve id.</param>
        /// <returns></returns>
        protected static FpML.V5r3.Reporting.FxCurve CreateEquityCurve(EquityCurveIdentifier curveId)
        {
            var fxCurve = new FpML.V5r3.Reporting.FxCurve
            {
                id       = curveId.Id,
                name     = curveId.CurveName,
                currency = curveId.Currency,
            };

            return(fxCurve);
        }
示例#5
0
        /// <summary>
        /// </summary>
        /// <param name="id">The curve id.</param>
        /// <param name="name">The name.</param>
        /// <param name="currency"></param>
        /// <returns></returns>
        private static FpML.V5r3.Reporting.FxCurve CreateEquityCurve(string id, string name, Currency currency)
        {
            var fxCurve = new FpML.V5r3.Reporting.FxCurve
            {
                id       = id,
                name     = name,
                currency = currency,
            };

            return(fxCurve);
        }
示例#6
0
        /// <summary>
        /// Creates the yield curve.
        /// </summary>
        /// <param name="curveId">The curve id.</param>
        /// <returns></returns>
        protected static FpML.V5r3.Reporting.FxCurve CreateCommodityCurve(CommodityCurveIdentifier curveId)
        {
            var yieldCurve = new FpML.V5r3.Reporting.FxCurve
            {
                id       = curveId.Id,
                name     = curveId.CurveName,
                currency = curveId.Currency,
            };

            return(yieldCurve);
        }
示例#7
0
        /// <summary>
        /// Creates the yield curve.
        /// </summary>
        /// <param name="curveId">The curve id.</param>
        /// <param name="name">The name.</param>
        /// <param name="currency">The currency.</param>
        /// <returns></returns>
        private static FpML.V5r3.Reporting.FxCurve CreateCommodityCurve(string curveId, string name, Currency currency)
        {
            //            var currencyPair = QuotedCurrencyPairHelper.Parse(currency.Value, currency.Value, QuoteBasisEnum.Currency2PerCurrency1);

            var commodityCurve = new FpML.V5r3.Reporting.FxCurve
            {
                id       = curveId,
                name     = name,
                currency = currency
                           //                                  , quotedCurrencyPair = currencyPair
            };

            return(commodityCurve);
        }