net.finmath.fouriermethod.calibration.NegativityConstraint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finmath-lib Show documentation
Show all versions of finmath-lib Show documentation
finmath lib is a Mathematical Finance Library in Java.
It provides algorithms and methodologies related to mathematical finance.
The newest version!
package net.finmath.fouriermethod.calibration;
/**
* Negativity constraint for calibration parameters.
*
* @author Alessandro Gnoatto
*
*/
public class NegativityConstraint extends BoundConstraint {
public NegativityConstraint() {
super(Double.NEGATIVE_INFINITY, 0.0);
}
@Override
public double apply(final double parameterToTest) {
return -Math.abs(parameterToTest);
}
}