Class GeometricBrownianMotionOracle
java.lang.Object
net.finmath.smartcontract.valuation.oracle.simulated.GeometricBrownianMotionOracle
- All Implemented Interfaces:
StochasticValuationOracle
A dummy oracle which generates values using a geometric Brownian motion.
- Author:
- Christian Fries
-
Constructor Summary
ConstructorDescriptionA dummy oracle which generates values using a geometric Brownian motion.GeometricBrownianMotionOracle
(LocalDateTime initialTime) A dummy oracle which generates values using a geometric Brownian motion.GeometricBrownianMotionOracle
(LocalDateTime initialTime, double initialValue, double timeHorizon, double riskFreeRate, double volatility, int numberOfPaths) A dummy oracle which generates values using a geometric Brownian motion.GeometricBrownianMotionOracle
(net.finmath.time.TimeDiscretization timeDiscretization, LocalDateTime initialTime, double initialValue, double riskFreeRate, double volatility, int numberOfPaths) -
Method Summary
Modifier and TypeMethodDescriptionnet.finmath.stochastic.RandomVariable
getValue
(LocalDateTime evaluationTime, LocalDateTime marketDataTime) Provides that value of the Oracle at a given evaluation time.
-
Constructor Details
-
GeometricBrownianMotionOracle
public GeometricBrownianMotionOracle()A dummy oracle which generates values using a geometric Brownian motion.Using default parameters.
Caution: The object is initialized with LocalDateTime.now(). This will result in different Oracles each time the object is instantiated.
-
GeometricBrownianMotionOracle
A dummy oracle which generates values using a geometric Brownian motion.Using a given initial time and default parameters.
- Parameters:
initialTime
- The date corresponding to the initial time of the oracle. Valuation prior this time is not provided.
-
GeometricBrownianMotionOracle
public GeometricBrownianMotionOracle(LocalDateTime initialTime, double initialValue, double timeHorizon, double riskFreeRate, double volatility, int numberOfPaths) A dummy oracle which generates values using a geometric Brownian motion.Using a given initial time and default parameters.
- Parameters:
initialTime
- The date corresponding to the initial time of the oracle. Valuation prior this time is not provided.initialValue
- The initial value.timeHorizon
- The time horizon in ACT/365 from initialTime.riskFreeRate
- The drift.volatility
- The volatility.numberOfPaths
- The number of simulation path to generate.
-
GeometricBrownianMotionOracle
public GeometricBrownianMotionOracle(net.finmath.time.TimeDiscretization timeDiscretization, LocalDateTime initialTime, double initialValue, double riskFreeRate, double volatility, int numberOfPaths)
-
-
Method Details
-
getValue
public net.finmath.stochastic.RandomVariable getValue(LocalDateTime evaluationTime, LocalDateTime marketDataTime) Description copied from interface:StochasticValuationOracle
Provides that value of the Oracle at a given evaluation time.- Specified by:
getValue
in interfaceStochasticValuationOracle
- Parameters:
evaluationTime
- The evaluation time.marketDataTime
- The market data time.- Returns:
- The value.
-