Module net.finmath.lib
Class CurveEstimation
- java.lang.Object
-
- net.finmath.marketdata.model.curves.locallinearregression.CurveEstimation
-
public class CurveEstimation extends Object
This class implements the method of local linear regression with discrete kernel function, see see https://ssrn.com/abstract=3073942 In particular it represents the implementation of proposition 2 and 3 of the paper. This class allows choosing between three different kernel functions, i.e. a normal, a Laplace or a Cauchy kernel. For the kernel types provided seeCurveEstimation.Distribution
. The resulting curve is piecewise linear. That means, only the knot points of the curve are computed in this algorithm. The final curve is then provided with linear interpolation of the knot points, seeCurveInterpolation
.- Version:
- 1.0
- Author:
- Moritz Scherrmann, Christian Fries
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CurveEstimation.Distribution
Possible kernel types.
-
Constructor Summary
Constructors Constructor Description CurveEstimation(LocalDate referenceDate, double bandwidth, double[] independentValues, double[] dependentValues, double[] partitionValues, double weight)
Creates a curve estimation object with a normal kernel.CurveEstimation(LocalDate referenceDate, double bandwidth, double[] independentValues, double[] dependentValues, double[] partitionValues, double weight, CurveEstimation.Distribution distribution)
Creates a curve estimation object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Curve
getRegressionCurve()
Returns the curve resulting from the local linear regression with discrete kernel.
-
-
-
Constructor Detail
-
CurveEstimation
public CurveEstimation(LocalDate referenceDate, double bandwidth, double[] independentValues, double[] dependentValues, double[] partitionValues, double weight, CurveEstimation.Distribution distribution)
Creates a curve estimation object.- Parameters:
referenceDate
- The reference date for the resulting regression curve, i.e., the date which defined t=0.bandwidth
- The bandwidth parameter of the regression.independentValues
- The realization of a random variable X.dependentValues
- The realization of a random variable Y.partitionValues
- The values to create a partition. It is important that min(partition) ≤ min(X) and max(partition) ≥ max(X).weight
- The weight needed to create a partition.distribution
- The kernel type.
-
CurveEstimation
public CurveEstimation(LocalDate referenceDate, double bandwidth, double[] independentValues, double[] dependentValues, double[] partitionValues, double weight)
Creates a curve estimation object with a normal kernel.- Parameters:
referenceDate
- The reference date for the resulting regression curve, i.e., the date which defined t=0.bandwidth
- The bandwidth parameter of the regression.independentValues
- The realization of a random variable X.dependentValues
- The realization of a random variable Y.partitionValues
- The values to create a partition. It is important that min(partition) ≤ min(X) and max(partition) ≥ max(X).weight
- The weight needed to create a partition.
-
-
Method Detail
-
getRegressionCurve
public Curve getRegressionCurve()
Returns the curve resulting from the local linear regression with discrete kernel.- Returns:
- The regression curve.
-
-