public final class RatesCurveCalibrator extends Object
This calibrator takes an abstract curve definition and produces real curves.
Curves are calibrated in groups or one or more curves. In addition, more than one group may be calibrated together.
Each curve is defined using two or more nodes. Each node primarily defines enough information to produce a reference trade. Calibration involves pricing, and re-pricing, these trades to find the best fit using a root finder.
Once calibrated, the curves are then available for use. Each node in the curve definition becomes a parameter in the matching output curve.
| Modifier and Type | Method and Description |
|---|---|
ImmutableRatesProvider |
calibrate(List<RatesCurveGroupDefinition> allGroupDefns,
ImmutableRatesProvider knownData,
MarketData marketData,
ReferenceData refData)
Calibrates a list of curve groups, each containing one or more curves.
|
ImmutableRatesProvider |
calibrate(RatesCurveGroupDefinition curveGroupDefn,
MarketData marketData,
ReferenceData refData)
Calibrates a single curve group, containing one or more curves.
|
CalibrationMeasures |
getMeasures()
Gets the measures.
|
static RatesCurveCalibrator |
of(double toleranceAbs,
double toleranceRel,
int stepMaximum)
Obtains an instance specifying tolerances to use.
|
static RatesCurveCalibrator |
of(double toleranceAbs,
double toleranceRel,
int stepMaximum,
CalibrationMeasures measures)
Obtains an instance specifying tolerances and measures to use.
|
static RatesCurveCalibrator |
of(double toleranceAbs,
double toleranceRel,
int stepMaximum,
CalibrationMeasures measures,
CalibrationMeasures pvMeasures)
Obtains an instance specifying tolerances and measures to use.
|
static RatesCurveCalibrator |
of(com.opengamma.strata.math.rootfind.NewtonVectorRootFinder rootFinder,
CalibrationMeasures measures,
CalibrationMeasures pvMeasures)
Obtains an instance specifying the measures to use.
|
static RatesCurveCalibrator |
standard()
The standard curve calibrator.
|
String |
toString() |
public static RatesCurveCalibrator standard()
This uses the standard tolerance of 1e-9, a maximum of 1000 steps.
The default CalibrationMeasures.PAR_SPREAD measures are used.
public static RatesCurveCalibrator of(double toleranceAbs, double toleranceRel, int stepMaximum)
This uses a Broyden root finder.
The standard CalibrationMeasures.PAR_SPREAD and CalibrationMeasures.PRESENT_VALUE measures are used.
toleranceAbs - the absolute tolerancetoleranceRel - the relative tolerancestepMaximum - the maximum stepspublic static RatesCurveCalibrator of(double toleranceAbs, double toleranceRel, int stepMaximum, CalibrationMeasures measures)
This uses a Broyden root finder.
The standard CalibrationMeasures.PRESENT_VALUE measures are used.
toleranceAbs - the absolute tolerancetoleranceRel - the relative tolerancestepMaximum - the maximum stepsmeasures - the calibration measures, used to compute the function for which the root is foundpublic static RatesCurveCalibrator of(double toleranceAbs, double toleranceRel, int stepMaximum, CalibrationMeasures measures, CalibrationMeasures pvMeasures)
This uses a Broyden root finder.
toleranceAbs - the absolute tolerancetoleranceRel - the relative tolerancestepMaximum - the maximum stepsmeasures - the calibration measures, used to compute the function for which the root is foundpvMeasures - the present value measures, used to compute the present value sensitivity to market quotes
stored in the metadatapublic static RatesCurveCalibrator of(com.opengamma.strata.math.rootfind.NewtonVectorRootFinder rootFinder, CalibrationMeasures measures, CalibrationMeasures pvMeasures)
rootFinder - the root finder to usemeasures - the calibration measures, used to compute the function for which the root is foundpvMeasures - the present value measures, used to compute the present value sensitivity to market quotes
stored in the metadatapublic CalibrationMeasures getMeasures()
public ImmutableRatesProvider calibrate(RatesCurveGroupDefinition curveGroupDefn, MarketData marketData, ReferenceData refData)
The calibration is defined using RatesCurveGroupDefinition.
Observable market data, time-series and FX are also needed to complete the calibration.
The valuation date is defined by the market data.
The Jacobian matrices are computed and stored in curve metadata.
curveGroupDefn - the curve group definitionmarketData - the market data required to build a trade for the instrument, including time-seriesrefData - the reference data, used to resolve the tradespublic ImmutableRatesProvider calibrate(List<RatesCurveGroupDefinition> allGroupDefns, ImmutableRatesProvider knownData, MarketData marketData, ReferenceData refData)
The calibration is defined using a list of RatesCurveGroupDefinition.
Observable market data and existing known data are also needed to complete the calibration.
A curve must only exist in one group.
allGroupDefns - the curve group definitionsknownData - the starting data for the calibrationmarketData - the market data required to build a trade for the instrumentrefData - the reference data, used to resolve the tradesCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.