Module net.finmath.lib
Class MonteCarloConditionalExpectationRegression
java.lang.Object
net.finmath.montecarlo.conditionalexpectation.MonteCarloConditionalExpectationRegression
- All Implemented Interfaces:
ConditionalExpectationEstimator
- Direct Known Subclasses:
MonteCarloConditionalExpectationRegressionLocalizedOnDependents
public class MonteCarloConditionalExpectationRegression
extends Object
implements ConditionalExpectationEstimator
A service that allows to estimate conditional expectation via regression.
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 ClassesModifier and TypeClassDescriptionstatic interface
Interface for objects specifying regression basis functions (a vector of random variables).static class
Wrapper to an array of RandomVariable[] implementing RegressionBasisFunctions -
Constructor Summary
ConstructorsConstructorDescriptionMonteCarloConditionalExpectationRegression(RandomVariable[] basisFunctions)
Creates a class for conditional expectation estimation.MonteCarloConditionalExpectationRegression(RandomVariable[] basisFunctionsEstimator, RandomVariable[] basisFunctionsPredictor)
Creates a class for conditional expectation estimation. -
Method Summary
Modifier and TypeMethodDescriptiongetConditionalExpectation(RandomVariable randomVariable)
Return the conditional expectation of a given random variable.double[]
getLinearRegressionParameters(RandomVariable dependents)
Return the solution x of XTX x = XT y for a given y.
-
Constructor Details
-
MonteCarloConditionalExpectationRegression
public MonteCarloConditionalExpectationRegression() -
MonteCarloConditionalExpectationRegression
Creates a class for conditional expectation estimation.- Parameters:
basisFunctions
- A vector of random variables to be used as basis functions.
-
MonteCarloConditionalExpectationRegression
public MonteCarloConditionalExpectationRegression(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
-
getConditionalExpectation
Description copied from interface:ConditionalExpectationEstimator
Return the conditional expectation of a given random variable. The definition of the filtration time is part of the object implementing this interface.- Specified by:
getConditionalExpectation
in interfaceConditionalExpectationEstimator
- Parameters:
randomVariable
- Given random variable.- Returns:
- The conditional expectation of
randomVariable
.
-
getLinearRegressionParameters
Return the solution x of XTX x = XT y for a given y.- Parameters:
dependents
- The sample vector of the random variable y.- Returns:
- The solution x of XTX x = XT y.
-
getBasisFunctionsEstimator
public MonteCarloConditionalExpectationRegression.RegressionBasisFunctions getBasisFunctionsEstimator() -
getBasisFunctionsPredictor
public MonteCarloConditionalExpectationRegression.RegressionBasisFunctions getBasisFunctionsPredictor()
-