net.finmath.montecarlo.conditionalexpectation
Class MonteCarloConditionalExpectationRegression
- java.lang.Object
-
- net.finmath.montecarlo.conditionalexpectation.MonteCarloConditionalExpectationRegression
-
- All Implemented Interfaces:
- MonteCarloConditionalExpectation
public class MonteCarloConditionalExpectationRegression extends java.lang.Object implements MonteCarloConditionalExpectation
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 (usingbasisFunctionsEstimator) to predict conditional expectation within another simulation (usingbasisFunctionsPredictor). 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).
-
-
Constructor Summary
Constructors Constructor and Description MonteCarloConditionalExpectationRegression(RandomVariableInterface[] basisFunctions)Creates a class for conditional expectation estimation.MonteCarloConditionalExpectationRegression(RandomVariableInterface[] basisFunctionsEstimator, RandomVariableInterface[] basisFunctionsPredictor)Creates a class for conditional expectation estimation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description RandomVariableInterfacegetConditionalExpectation(RandomVariableInterface randomVariable)Return the conditional expectation of a given random variable.double[]getLinearRegressionParameters(RandomVariableInterface dependents)Return the solution x of XTX x = XT y for a given y.
-
-
-
Constructor Detail
-
MonteCarloConditionalExpectationRegression
public MonteCarloConditionalExpectationRegression(RandomVariableInterface[] basisFunctions)
Creates a class for conditional expectation estimation.- Parameters:
basisFunctions- A vector of random variables to be used as basis functions.
-
MonteCarloConditionalExpectationRegression
public MonteCarloConditionalExpectationRegression(RandomVariableInterface[] basisFunctionsEstimator, RandomVariableInterface[] 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 Detail
-
getConditionalExpectation
public RandomVariableInterface getConditionalExpectation(RandomVariableInterface randomVariable)
Description copied from interface:MonteCarloConditionalExpectationReturn the conditional expectation of a given random variable. The definition of the filtration time is part of the object implementing this interface.- Specified by:
getConditionalExpectationin interfaceMonteCarloConditionalExpectation- Parameters:
randomVariable- Given random variable.- Returns:
- The conditional expectation of
randomVariable.
-
getLinearRegressionParameters
public double[] getLinearRegressionParameters(RandomVariableInterface dependents)
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.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG