public virtual void test_resolve_twoLegs()
        {
            IborCapFloor         @base = IborCapFloor.of(CAPFLOOR_LEG, PAY_LEG);
            ResolvedIborCapFloor test  = @base.resolve(REF_DATA);

            assertEquals(test.CapFloorLeg, CAPFLOOR_LEG.resolve(REF_DATA));
            assertEquals(test.PayLeg.get(), PAY_LEG.resolve(REF_DATA));
        }
Exemplo n.º 2
0
        public virtual void test_resolve_twoLegs()
        {
            Cms         @base = sutCap();
            ResolvedCms test  = @base.resolve(REF_DATA);

            assertEquals(test.CmsLeg, CMS_LEG.resolve(REF_DATA));
            assertEquals(test.PayLeg.get(), PAY_LEG.resolve(REF_DATA));
        }
Exemplo n.º 3
0
        //-------------------------------------------------------------------------
        /// <summary>
        /// Create a pay leg.
        /// <para>
        /// The pay leg created is periodic fixed rate payments without compounding.
        /// The Ibor index is used to specify the payment frequency.
        ///
        /// </para>
        /// </summary>
        /// <param name="index">  the Ibor index </param>
        /// <param name="startDate">  the start date </param>
        /// <param name="endDate">  the end date </param>
        /// <param name="fixedRate">  the fixed rate </param>
        /// <param name="notional">  the notional </param>
        /// <param name="payRec">  pay or receive </param>
        /// <returns> the instance </returns>
        public static ResolvedSwapLeg createFixedPayLeg(IborIndex index, LocalDate startDate, LocalDate endDate, double fixedRate, double notional, PayReceive payRec)
        {
            SwapLeg leg = createFixedPayLegUnresolved(index, startDate, endDate, fixedRate, notional, payRec);

            return(leg.resolve(REF_DATA));
        }