예제 #1
0
        //-------------------------------------------------------------------------
        public virtual void test_presentValueSensitivity_noFixing()
        {
            PointSensitivities             computed      = PRICER.presentValueSensitivity(RDEPOSIT, IMM_PROV_NOFIX);
            CurrencyParameterSensitivities sensiComputed = IMM_PROV_NOFIX.parameterSensitivity(computed);
            CurrencyParameterSensitivities sensiExpected = CAL_FD.sensitivity(IMM_PROV_NOFIX, (p) => PRICER.presentValue(RDEPOSIT, (p)));

            assertTrue(sensiComputed.equalWithTolerance(sensiExpected, NOTIONAL * EPS_FD));
        }
        //-------------------------------------------------------------------------
        public virtual void test_presentValueSensitivity()
        {
            PointSensitivities ptsTrade   = PRICER_TRADE.presentValueSensitivity(RDEPOSIT_TRADE, IMM_PROV);
            PointSensitivities ptsProduct = PRICER_PRODUCT.presentValueSensitivity(RDEPOSIT_PRODUCT, IMM_PROV);

            assertTrue(ptsTrade.equalWithTolerance(ptsProduct, TOLERANCE_PV_DELTA));
        }
 /// <summary>
 /// Calculates the present value sensitivity of the Ibor fixing deposit trade.
 /// <para>
 /// The present value sensitivity of the trade is the sensitivity of the present value to
 /// the underlying curves.
 ///
 /// </para>
 /// </summary>
 /// <param name="trade">  the trade </param>
 /// <param name="provider">  the rates provider </param>
 /// <returns> the point sensitivity of the present value </returns>
 public virtual PointSensitivities presentValueSensitivity(ResolvedIborFixingDepositTrade trade, RatesProvider provider)
 {
     return(productPricer.presentValueSensitivity(trade.Product, provider));
 }