HullAndWhiteOneFactor.CapHW1.PZC C# (CSharp) Method

PZC() private method

Helper function to make functions easier to read. Just returns the value of the discount factor at position t. This is calculated with e^(-ZR(t)*t).
private PZC ( double t ) : double
t double The position where to get the value of discount factor from.
return double
        private double PZC(double t)
        {
            if (t == 0)
                return 1.0;
            else
                return Math.Exp(-ZR(t) * t);
        }