Ejemplo n.º 1
0
        public virtual void test_of_ZeroRateSensitivity()
        {
            ZeroRateSensitivity            zeroPoint = ZeroRateSensitivity.of(USD, YEAR_FRACTION, GBP, VALUE);
            CreditCurveZeroRateSensitivity test      = CreditCurveZeroRateSensitivity.of(LEGAL_ENTITY, zeroPoint);

            assertEquals(test.Currency, GBP);
            assertEquals(test.CurveCurrency, USD);
            assertEquals(test.LegalEntityId, LEGAL_ENTITY);
            assertEquals(test.Sensitivity, VALUE);
            assertEquals(test.YearFraction, YEAR_FRACTION);
            assertEquals(test.toZeroRateSensitivity(), zeroPoint);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Calculates the parameter sensitivity from the point sensitivity.
 /// <para>
 /// This is used to convert a single point sensitivity to parameter sensitivity.
 /// The calculation typically involves multiplying the point and unit sensitivities.
 ///
 /// </para>
 /// </summary>
 /// <param name="pointSensitivity">  the point sensitivity to convert </param>
 /// <returns> the parameter sensitivity </returns>
 /// <exception cref="RuntimeException"> if the result cannot be calculated </exception>
 public CurrencyParameterSensitivities parameterSensitivity(CreditCurveZeroRateSensitivity pointSensitivity)
 {
     return(survivalProbabilities.parameterSensitivity(pointSensitivity.toZeroRateSensitivity()));
 }