Module net.finmath.lib
Class MonteCarloConditionalExpectationRegressionLocalizedOnDependents
java.lang.Object
net.finmath.montecarlo.conditionalexpectation.MonteCarloConditionalExpectationRegression
net.finmath.montecarlo.conditionalexpectation.MonteCarloConditionalExpectationRegressionLocalizedOnDependents
- All Implemented Interfaces:
ConditionalExpectationEstimator
public class MonteCarloConditionalExpectationRegressionLocalizedOnDependents
extends MonteCarloConditionalExpectationRegression
A service that allows to estimate conditional expectation via regression.
This implementation uses a localization weight derived from the dependent variable.
The regression only considers sample paths where \( - M < y_{i} < M \) where M is a multiple of the standard deviation of y.
In oder to estimate the conditional expectation, basis functions have to be specified.
The class can either estimate and predict the conditional expectation within
the same simulation (which will eventually introduce a small foresight bias)
or use a different simulation for estimation (using
basisFunctionsEstimator
)
to predict conditional expectation within another simulation
(using basisFunctionsPredictor
). In the latter case, the
basis functions have to correspond to the same entities, however, generated in
different simulations (number of path, etc., may be different).- Version:
- 1.0
- Author:
- Christian Fries
-
Nested Class Summary
Nested classes/interfaces inherited from class net.finmath.montecarlo.conditionalexpectation.MonteCarloConditionalExpectationRegression
MonteCarloConditionalExpectationRegression.RegressionBasisFunctions, MonteCarloConditionalExpectationRegression.RegressionBasisFunctionsGiven
-
Constructor Summary
ConstructorsConstructorDescriptionMonteCarloConditionalExpectationRegressionLocalizedOnDependents(RandomVariable[] basisFunctions)
Creates a class for conditional expectation estimation.MonteCarloConditionalExpectationRegressionLocalizedOnDependents(RandomVariable[] basisFunctionsEstimator, double standardDeviations)
Creates a class for conditional expectation estimation.MonteCarloConditionalExpectationRegressionLocalizedOnDependents(RandomVariable[] basisFunctionsEstimator, RandomVariable[] basisFunctionsPredictor)
Creates a class for conditional expectation estimation.MonteCarloConditionalExpectationRegressionLocalizedOnDependents(RandomVariable[] basisFunctionsEstimator, RandomVariable[] basisFunctionsPredictor, double standardDeviations)
Creates a class for conditional expectation estimation. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
getLinearRegressionParameters(RandomVariable dependents)
Return the solution x of XTX x = XT y for a given y.Methods inherited from class net.finmath.montecarlo.conditionalexpectation.MonteCarloConditionalExpectationRegression
getBasisFunctionsEstimator, getBasisFunctionsPredictor, getConditionalExpectation
-
Constructor Details
-
MonteCarloConditionalExpectationRegressionLocalizedOnDependents
public MonteCarloConditionalExpectationRegressionLocalizedOnDependents(RandomVariable[] basisFunctionsEstimator, RandomVariable[] basisFunctionsPredictor, double standardDeviations)Creates a class for conditional expectation estimation.- Parameters:
basisFunctionsEstimator
- A vector of random variables to be used as basis functions for estimation.basisFunctionsPredictor
- A vector of random variables to be used as basis functions for prediction.standardDeviations
- A standard deviation parameter for the weight function.
-
MonteCarloConditionalExpectationRegressionLocalizedOnDependents
public MonteCarloConditionalExpectationRegressionLocalizedOnDependents(RandomVariable[] basisFunctionsEstimator, double standardDeviations)Creates a class for conditional expectation estimation.- Parameters:
basisFunctionsEstimator
- A vector of random variables to be used as basis functions for estimation.standardDeviations
- A standard deviation parameter for the weight function.
-
MonteCarloConditionalExpectationRegressionLocalizedOnDependents
public MonteCarloConditionalExpectationRegressionLocalizedOnDependents() -
MonteCarloConditionalExpectationRegressionLocalizedOnDependents
public MonteCarloConditionalExpectationRegressionLocalizedOnDependents(RandomVariable[] basisFunctions)Creates a class for conditional expectation estimation.- Parameters:
basisFunctions
- A vector of random variables to be used as basis functions.
-
MonteCarloConditionalExpectationRegressionLocalizedOnDependents
public MonteCarloConditionalExpectationRegressionLocalizedOnDependents(RandomVariable[] basisFunctionsEstimator, RandomVariable[] basisFunctionsPredictor)Creates a class for conditional expectation estimation.- Parameters:
basisFunctionsEstimator
- A vector of random variables to be used as basis functions for estimation.basisFunctionsPredictor
- A vector of random variables to be used as basis functions for prediction.
-
-
Method Details
-
getLinearRegressionParameters
Return the solution x of XTX x = XT y for a given y.- Overrides:
getLinearRegressionParameters
in classMonteCarloConditionalExpectationRegression
- Parameters:
dependents
- The sample vector of the random variable y.- Returns:
- The solution x of XTX x = XT y.
- To dos:
- Performance upon repeated call can be optimized by caching XTX.
-