Class AlphaFormLinearHyperbolic
The alpha form √(1 + α t_i (atan(α t_i) − π/2)).
[WorkingType]
public sealed class AlphaFormLinearHyperbolic : AlphaForm
- Inheritance
-
AlphaFormLinearHyperbolic
- Inherited Members
Remarks
A working type. A rate past the times, which QuantLib reads unchecked, is refused.
Constructors
AlphaFormLinearHyperbolic(ReadOnlySpan<double>, double)
Initializes a new instance of the AlphaFormLinearHyperbolic class.
public AlphaFormLinearHyperbolic(ReadOnlySpan<double> times, double alpha = 0)
Parameters
timesReadOnlySpan<double>Each rate's time.
alphadoubleThe initial α.
Methods
Clone()
Copies the form deeply, its α with it.
public override AlphaForm Clone()
Returns
- AlphaForm
The copy.
Evaluate(int)
The form's value at the i-th rate, at the current α.
public override double Evaluate(int i)
Parameters
iintThe rate.
Returns
- double
The multiplier.
Exceptions
- ArgumentOutOfRangeException
iisn't a rate.
SetAlpha(double)
Sets the form's α.
public override void SetAlpha(double alpha)
Parameters
alphadoubleThe α.