Ejemplo n.º 1
0
 /// <summary>
 /// Vector of expected loss as of time t, for equity tranche with horizon T and detachment adjustedDetachment.
 /// Expressed as fraction of total index. adjustedDetachment is compensated for vector of realised losses.
 /// </summary>
 /// <param name="expectedLoss">Return the expected loss.</param>
 /// <param name="expectedRecovery">Return the expected recovery.</param>
 /// <param name="realizedLoss">Input realized loss.</param>
 /// <param name="realizedRecovery">Input realized recovery.</param>
 public override void ExpectedLossAndRecovery(Vector expectedLoss, Vector expectedRecovery, double t, double T, Vector adjustedDetachment, Vector realizedLoss, Vector realizedRecovery)
 {
     expectedRecovery.Clear();
     EL.GetValue(expectedLoss, t, T, adjustedDetachment);
     expectedLoss.MultiplyBy(VectorMath.Max(0.0, 1.0 - realizedLoss));
 }