public virtual void test_currentCash()
        {
            MultiCurrencyAmount cc1 = PRICER.currentCash(CAP_ONE_LEG, RATES, VOLS);
            MultiCurrencyAmount cc2 = PRICER.currentCash(CAP_TWO_LEGS, RATES, VOLS);

            assertEquals(cc1, MultiCurrencyAmount.of(CurrencyAmount.zero(EUR)));
            assertEquals(cc2, MultiCurrencyAmount.of(CurrencyAmount.zero(EUR)));
        }
Ejemplo n.º 2
0
        public virtual void test_currentCash_onPay()
        {
            MultiCurrencyAmount computedWithPayLeg  = PRICER.currentCash(TRADE_PAYLEG, RATES_PAY, VOLS_PAY);
            MultiCurrencyAmount computedWithPremium = PRICER.currentCash(TRADE_PREMIUM, RATES_PAY, VOLS_PAY);
            MultiCurrencyAmount expectedWithPayLeg  = PRICER_PRODUCT.currentCash(CAP_TWO_LEGS, RATES_PAY, VOLS_PAY);
            MultiCurrencyAmount expectedWithPremium = PRICER_PRODUCT.currentCash(CAP_ONE_LEG, RATES_PAY, VOLS_PAY);

            assertEquals(computedWithPayLeg, expectedWithPayLeg);
            assertEquals(computedWithPremium, expectedWithPremium);
        }