Exemple #1
0
        public virtual void test_metadata_end()
        {
            TermDepositCurveNode node          = TermDepositCurveNode.of(TEMPLATE, QUOTE_ID, SPREAD);
            LocalDate            valuationDate = LocalDate.of(2015, 1, 22);
            ParameterMetadata    metadata      = node.metadata(valuationDate, REF_DATA);

            assertEquals(((TenorDateParameterMetadata)metadata).Date, LocalDate.of(2015, 4, 27));
            assertEquals(((TenorDateParameterMetadata)metadata).Tenor, Tenor.TENOR_3M);
        }
Exemple #2
0
        public virtual void test_metadata_fixed()
        {
            LocalDate              nodeDate      = VAL_DATE.plusMonths(1);
            TermDepositCurveNode   node          = TermDepositCurveNode.of(TEMPLATE, QUOTE_ID, SPREAD).withDate(CurveNodeDate.of(nodeDate));
            LocalDate              valuationDate = LocalDate.of(2015, 1, 22);
            DatedParameterMetadata metadata      = node.metadata(valuationDate, REF_DATA);

            assertEquals(metadata.Date, nodeDate);
            assertEquals(metadata.Label, node.Label);
        }
Exemple #3
0
        public virtual void test_metadata_last_fixing()
        {
            TermDepositCurveNode node = TermDepositCurveNode.of(TEMPLATE, QUOTE_ID, SPREAD).withDate(CurveNodeDate.LAST_FIXING);

            assertThrowsWithCause(() => node.metadata(VAL_DATE, REF_DATA), typeof(System.NotSupportedException));
        }