Int() public method

Calculates the integral inside alpha(T).
public Int ( double t1, double t2 ) : double
t1 double The starting point of the integration.
t2 double The ending point of the integration.
return double
Esempio n. 1
0
        /// <summary>
        /// Format the y parameter so it can be made compatible with <see cref="Pelsser.Bond"/>.
        /// </summary>
        /// <param name="y">The y parameter wanted inside Bond.</param>
        /// <param name="process">The Pelsser process which will be used.</param>
        /// <returns>The Matrix to pass to Bond.</returns>
        private Matrix DynamicParam(double y, SquaredGaussianModel process)
        {
            double alphaT = process.F(process.CacheDates[0], process.CacheDates[1] - process.CacheDates[0]) +
                            2 * Math.Exp(-process.a1.V() * process.CacheDates[0]) * process.Int(0, process.CacheDates[0]);

            return(new Matrix(new double[] { Math.Pow(y + alphaT, 2) }));
        }
Esempio n. 2
0
 /// <summary>
 /// Format the y parameter so it can be made compatible with <see cref="Pelsser.Bond"/>.
 /// </summary>
 /// <param name="y">The y parameter wanted inside Bond.</param>
 /// <param name="process">The Pelsser process which will be used.</param>
 /// <returns>The Matrix to pass to Bond.</returns>
 private Matrix DynamicParam(double y, SquaredGaussianModel process)
 {
     double alphaT = process.F(process.CacheDates[0], process.CacheDates[1] - process.CacheDates[0]) +
                         2 * Math.Exp(-process.a1.V() * process.CacheDates[0]) * process.Int(0, process.CacheDates[0]);
     return new Matrix(new double[] { Math.Pow(y + alphaT, 2) });
 }