Module net.finmath.lib
Class ExponentialNormalizer
java.lang.Object
net.finmath.singleswaprate.annuitymapping.ExponentialNormalizer
- All Implemented Interfaces:
NormalizingFunction
An exponential normalizing function following
\[
c e^{-(x / S)^2}
\]
where S is the swap rate and c is some scaling factor.
- Author:
- Christian Fries, Roland Bachl
-
Constructor Summary
ConstructorsConstructorDescriptionExponentialNormalizer(double initialSwapRate, double scale)
Create the exponential normalizer with parameters.ExponentialNormalizer(Schedule fixSchedule, Schedule floatSchedule, String discountCurveName, String forwardCurveName, String volatilityCubeName, VolatilityCubeModel model)
Create the exponential normalizer from information of the product. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getFirstDerivative(double swapRate)
Return the first derivative of the normalizing function at the given swap rate.double
getSecondDerivative(double swapRate)
Return the second derivative of the normalizing function at the given swap rate.double
getValue(double swapRate)
Return the value of the normalizing function for the given swap rate.
-
Constructor Details
-
ExponentialNormalizer
public ExponentialNormalizer(Schedule fixSchedule, Schedule floatSchedule, String discountCurveName, String forwardCurveName, String volatilityCubeName, VolatilityCubeModel model)Create the exponential normalizer from information of the product. The constructor assumes a period of 6M for the forward curve.- Parameters:
fixSchedule
- The fix schedule of the product.floatSchedule
- The float schedule of the product.discountCurveName
- The name of the discount curve.forwardCurveName
- The name of the forward curve.volatilityCubeName
- The name of the volatility cube.model
- The model for context.
-
ExponentialNormalizer
public ExponentialNormalizer(double initialSwapRate, double scale)Create the exponential normalizer with parameters.- Parameters:
initialSwapRate
- The par swap rate.scale
- The scale.
-
-
Method Details
-
getValue
public double getValue(double swapRate)Description copied from interface:NormalizingFunction
Return the value of the normalizing function for the given swap rate.- Specified by:
getValue
in interfaceNormalizingFunction
- Parameters:
swapRate
- The desired swap rate- Returns:
- The normalizing factor at the given swap rate.
-
getFirstDerivative
public double getFirstDerivative(double swapRate)Description copied from interface:NormalizingFunction
Return the first derivative of the normalizing function at the given swap rate.- Specified by:
getFirstDerivative
in interfaceNormalizingFunction
- Parameters:
swapRate
- The desired swap rate.- Returns:
- The first derivative of the normalizing function at the given swap rate.
-
getSecondDerivative
public double getSecondDerivative(double swapRate)Description copied from interface:NormalizingFunction
Return the second derivative of the normalizing function at the given swap rate.- Specified by:
getSecondDerivative
in interfaceNormalizingFunction
- Parameters:
swapRate
- The desired swap rate.- Returns:
- The second derivative of the normalizing function at the given swap rate.
-