/// <summary> /// Calculates the standard deviation under the 1 factor Hull White model. /// </summary> private void GetStandardDeviation(Vector stdDev, double t, double tExpiry, double tStart, double tEnd) { using (var cache = Vector.CacheLike(stdDev)) { Vector b1Vector = cache.Get(); Vector b2Vector = cache.Get(); Vector bDiff = cache.Get(); fModelParameters.GetB(b2Vector, t, tEnd); fModelParameters.GetB(b1Vector, t, tStart); bDiff.AssignDifference(b2Vector, b1Vector); fModelParameters.GetZeta(stdDev, t, tExpiry); stdDev.AssignSqrt(stdDev); stdDev.MultiplyBy(VectorMath.Abs(bDiff)); } }