F() public method

Calculates F(T, dt) of the model.
public F ( double T, double dt ) : double
T double The time where to calculate the function.
dt double /// The delta of time to consider to calculate the function. ///
return double
Example #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) }));
        }
 /// <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) });
 }