public void CanAddAndGetAllInstrumentTypes()
        {
            using (FinancialClient financialClient = Context.CreateFinancialClient())
            {
                InterpolatedYieldCurveDefinitionMaster interpolatedYieldCurveDefinitionMaster =
                    financialClient.InterpolatedYieldCurveDefinitionMaster;
                YieldCurveDefinitionDocument yieldCurveDefinitionDocument = GenerateDocument();

                foreach (StripInstrumentType stripInstrumentType in Enum.GetValues(typeof(StripInstrumentType)))
                {
                    var fixedIncomeStrip = new FixedIncomeStrip
                    {
                        ConventionName     = "DEFAULT",
                        CurveNodePointTime = Tenor.Day,
                        InstrumentType     = stripInstrumentType
                    };
                    if (stripInstrumentType == StripInstrumentType.Future)
                    {
                        fixedIncomeStrip.NthFutureFromTenor = 12;
                    }

                    yieldCurveDefinitionDocument.YieldCurveDefinition.AddStrip(fixedIncomeStrip);
                }

                AssertRoundTrip(interpolatedYieldCurveDefinitionMaster, yieldCurveDefinitionDocument);
            }
        }
Beispiel #2
0
 private FixedIncomeStripWithSecurity(FixedIncomeStrip originalStrip, Tenor resolvedTenor, DateTimeOffset maturity, ExternalId securityIdentifier, ISecurity security)
 {
     _resolvedTenor = resolvedTenor;
     _originalStrip = originalStrip;
     _maturity = maturity;
     _securityIdentifier = securityIdentifier;
     _security = security;
 }
        public void CanAddAndGetAllInstrumentTypes()
        {
            using (FinancialClient financialClient = Context.CreateFinancialClient())
            {
                InterpolatedYieldCurveDefinitionMaster interpolatedYieldCurveDefinitionMaster =
                    financialClient.InterpolatedYieldCurveDefinitionMaster;
                YieldCurveDefinitionDocument yieldCurveDefinitionDocument = GenerateDocument();

                foreach (StripInstrumentType stripInstrumentType in Enum.GetValues(typeof(StripInstrumentType)))
                {
                    var fixedIncomeStrip = new FixedIncomeStrip
                                            {
                                                ConventionName = "DEFAULT",
                                                CurveNodePointTime = Tenor.Day,
                                                InstrumentType = stripInstrumentType
                                            };
                    if (stripInstrumentType == StripInstrumentType.Future)
                        fixedIncomeStrip.NthFutureFromTenor = 12;

                    yieldCurveDefinitionDocument.YieldCurveDefinition.AddStrip(fixedIncomeStrip);
                }

                AssertRoundTrip(interpolatedYieldCurveDefinitionMaster, yieldCurveDefinitionDocument);
            }
        }
Beispiel #4
0
 public FixedIncomeStripWithIdentifier(ExternalId security, FixedIncomeStrip strip)
 {
     _security = security;
     _strip = strip;
 }