net.finmath.montecarlo.conditionalexpectation.MonteCarloConditionalExpectationLocalizedOnDependentRegressionFactory 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.
package net.finmath.montecarlo.conditionalexpectation;
import net.finmath.stochastic.ConditionalExpectationEstimator;
import net.finmath.stochastic.RandomVariable;
/**
* Provides a localized linear regression with an indicator function as localization weight for a vector of regression basis functions.
*
* The regression only considers sample paths where \( - M < y_{i} < M \) where M is a multiple of the standard deviation of y.
*
* @author Christian Fries
*/
public class MonteCarloConditionalExpectationLocalizedOnDependentRegressionFactory implements MonteCarloConditionalExpectationRegressionFactory {
private final double standardDeviations;
public MonteCarloConditionalExpectationLocalizedOnDependentRegressionFactory(final double standardDeviations) {
super();
this.standardDeviations = standardDeviations;
}
@Override
public ConditionalExpectationEstimator getConditionalExpectationEstimator(final RandomVariable[] basisFunctionsEstimator, final RandomVariable[] basisFunctionsPredictor) {
return new MonteCarloConditionalExpectationRegressionLocalizedOnDependents(basisFunctionsEstimator, basisFunctionsPredictor, standardDeviations);
}
}