java.lang.Object
net.finmath.singleswaprate.data.ErrorEstimation
Provides several error estimates between values taken from market data and values taken from a model.
The estimates first have to be generated, after which each estimate can be requested.
- Author:
- Christian Fries, Roland Bachl
-
Constructor Summary
ConstructorsConstructorDescriptionErrorEstimation(LocalDate referenceDate, SchedulePrototype fixMetaSchedule, SchedulePrototype floatMetaSchedule, AnnuityMapping.AnnuityMappingType annuityMappingType, SwaptionDataLattice physicalPremiumsATM, SwaptionDataLattice cashPayerPremiums, SwaptionDataLattice cashReceiverPremiums, String discountCurveName, String forwardCurveName, String volatilityCubeName, double replicationLowerBound, double replicationUpperBound, int replicationNumberOfEvaluationPoints)
Create the class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
evaluate(SwaptionDataLattice nodes, VolatilityCubeModel model)
Evaluate the market data against the model.double
Get the average error in cash settled swaption premiums.double
getCashAverageError(int maturity, int termination, VolatilityCubeModel model)
Get the average error in cash settled swaption premiums at a specific node on the tenor grid.double
Get the average error in cash settled swaption premiums, in percent difference from the market data.double
getCashAverageErrorPercent(int maturity, int termination, VolatilityCubeModel model)
Get the average error in cash settled swaption premiums, in percent difference from the market data at a specific node on the tenor grid.double
Get the maximal error in cash settled swaption premiums.double
getCashMaxError(int maturity, int termination, VolatilityCubeModel model)
Get the maximal error in cash settled swaption premiums at a specific node on the tenor grid.double
Get the maximal error in cash settled swaption premiums, in percent difference from the market data.double
getCashMaxErrorPercent(int maturity, int termination, VolatilityCubeModel model)
Get the maximal error in cash settled swaption premiums, in percent difference from the market data at a specific node on the tenor grid.double
Get the average error in physically settled swaption premiums.double
Get the average error in physically settled swaption premiums, in percent difference from the market data.double
Get the maximal error in physically settled swaption premiums.double
Get the maximal error in physically settled swaption premiums, in percent difference from the market data.
-
Constructor Details
-
ErrorEstimation
public ErrorEstimation(LocalDate referenceDate, SchedulePrototype fixMetaSchedule, SchedulePrototype floatMetaSchedule, AnnuityMapping.AnnuityMappingType annuityMappingType, SwaptionDataLattice physicalPremiumsATM, SwaptionDataLattice cashPayerPremiums, SwaptionDataLattice cashReceiverPremiums, String discountCurveName, String forwardCurveName, String volatilityCubeName, double replicationLowerBound, double replicationUpperBound, int replicationNumberOfEvaluationPoints) throws IOExceptionCreate the class.- Parameters:
referenceDate
- The reference date.fixMetaSchedule
- The meta data with which to create schedules from the tenor grid for the fixed leg.floatMetaSchedule
- The meta data with which to create schedules from the tenor grid for the float leg.annuityMappingType
- The type of annuity mapping to use for cash settled swaptions.physicalPremiumsATM
- The lattice containing atm physically settled swaption premiums.cashPayerPremiums
- The lattice containing cash payer premiums.cashReceiverPremiums
- The lattice containing cash receiver premiums.discountCurveName
- The name of the discount curve in the model.forwardCurveName
- The name of the forward curve in the model.volatilityCubeName
- The name of the volatility cube in the model.replicationLowerBound
- The lowest strike to use during replication.replicationUpperBound
- The highest strike to use during replication.replicationNumberOfEvaluationPoints
- The number of strikes to evaluate during replication.- Throws:
IOException
- Thrown when there is a problem fetching data from the MarketDataHandler.
-
-
Method Details
-
evaluate
Evaluate the market data against the model. The nodes to be evaluated on are given by a lattice. The values of the lattice are not taken into account, only their position. If no lattice (null) is provided, all available data is evaluated.- Parameters:
nodes
- A lattice indicating on which points errors should be evaluated. Optional.model
- The model against which to evaluate.
-
getCashAverageError
public double getCashAverageError()Get the average error in cash settled swaption premiums.- Returns:
- The average error in cash settled swaption premiums.
-
getCashMaxError
public double getCashMaxError()Get the maximal error in cash settled swaption premiums.- Returns:
- The maximal error in cash settled swaption premiums.
-
getCashAverageErrorPercent
public double getCashAverageErrorPercent()Get the average error in cash settled swaption premiums, in percent difference from the market data.- Returns:
- The average error in cash settled swaption premiums, in percent difference from the market data.
-
getCashMaxErrorPercent
public double getCashMaxErrorPercent()Get the maximal error in cash settled swaption premiums, in percent difference from the market data.- Returns:
- The maximal error in cash settled swaption premiums, in percent difference from the market data.
-
getPhysicalAverageError
public double getPhysicalAverageError()Get the average error in physically settled swaption premiums.- Returns:
- The average error in physically settled swaption premiums.
-
getPhysicalMaxError
public double getPhysicalMaxError()Get the maximal error in physically settled swaption premiums.- Returns:
- The maximal error in physically settled swaption premiums.
-
getPhysicalAverageErrorPercent
public double getPhysicalAverageErrorPercent()Get the average error in physically settled swaption premiums, in percent difference from the market data.- Returns:
- The average error in physically settled swaption premiums, in percent difference from the market data.
-
getPhysicalMaxErrorPercent
public double getPhysicalMaxErrorPercent()Get the maximal error in physically settled swaption premiums, in percent difference from the market data.- Returns:
- The maximal error in physically settled swaption premiums, in percent difference from the market data.
-
getCashAverageError
Get the average error in cash settled swaption premiums at a specific node on the tenor grid.- Parameters:
maturity
- The maturity at which to evaluate.termination
- The termination at which to evaluate.model
- The model against which to evaluate.- Returns:
- The average error in cash settled swaption premiums.
-
getCashMaxError
Get the maximal error in cash settled swaption premiums at a specific node on the tenor grid.- Parameters:
maturity
- The maturity at which to evaluate.termination
- The termination at which to evaluate.model
- The model against which to evaluate.- Returns:
- The maximal error in cash settled swaption premiums.
-
getCashAverageErrorPercent
Get the average error in cash settled swaption premiums, in percent difference from the market data at a specific node on the tenor grid.- Parameters:
maturity
- The maturity at which to evaluate.termination
- The termination at which to evaluate.model
- The model against which to evaluate.- Returns:
- The average error in cash settled swaption premiums, in percent difference from the market data.
-
getCashMaxErrorPercent
Get the maximal error in cash settled swaption premiums, in percent difference from the market data at a specific node on the tenor grid.- Parameters:
maturity
- The maturity at which to evaluate.termination
- The termination at which to evaluate.model
- The model against which to evaluate.- Returns:
- The maximal error in cash settled swaption premiums, in percent difference from the market data.
-