java.lang.Object


 Constructor Summary DeterministicVolBasket(int T, double dt, double[] S_0, double r, double[] mu, double[] q)

 Method Summary  double covarianceOfReturns(double a, double b, int i, int j)           The covariances Cov(R_i,R_j) of the asset returns R_i=log(S_i(b)/S_i(a)) over the time interval [a,b].  ColtMatrix covarianceOfReturnsMatrix(int t, int s)           The covariance matrix Cov(R_i,R_j) of the returns R_i=log(S_i(s)/S_i(t)) over the time step t -> s.  double get_r()           Constant short rate.  ColtVector get_Z()           The vector of standard normal increments driving the current time step abstract  double instantaneousReturnsVolatility(int i, int t)           The volatility $\sigma_i(t)$ of asset i. abstract  double integralSgiSgj(double a, double b, int i, int j)           The integral $\int_a^b\sigma_i(s)\sigma_j(s)ds$ (TeX notation, sigma_i(t) the volatility of asset S_i).  void new_Z_vector()           A new standard normal vector driving a time step. abstract  double rho(int i, int j)           Constant correlation of the asset returns R_i=log(S_i(t)): d< R_i,R_j >_t=rho(i,j)dt.  double sigma(int i, int t)           Volatility of the asset S_i at time t.  void stepToHorizonSimulationInit(int whichProbability, int t)           Must be called before each simulation of path branches which step from current time t to the horizon T in one time step.  void timeStep(int whichProbability, int t)           Time step t -> t+1 of the discounted asset prices.  void timeStepToHorizon(int t)           Single time step t -> s of discounted asset price paths.  ColtMatrix volatilityMatrix(int t)           The Cholesky root of the covariance matrix of the returns log(S_i(t+dt)/S_i(t)) over the time step t -> t+1.

 Methods inherited from class Market.Basket covarianceOfReturnsMatrix, dividendReductionFactor, forwardPrice, get_B, get_dim, get_dt, get_q, get_S_0, get_S, get_T, get_volatilityIsDeterministic, newPath, newPathBranch, newPathSegment, S, simulationInit

 Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 Constructor Detail

public DeterministicVolBasket(int T,
double dt,
double[] S_0,
double r,
double[] mu,
double[] q)
Parameters:
T - Number of time steps to horizon.
dt - Size of time step.
S_0 - Vector of asset prices S(0).
r - Constant short rate.
mu - vector of constant drifts of returns.
q - vector of constant continuous dividend yields.
 Method Detail

### get_r

public double get_r()
Constant short rate.

### get_Z

public ColtVector get_Z()
The vector of standard normal increments driving the current time step

Overrides:
get_Z in class Basket

### sigma

public double sigma(int i,
int t)
Volatility of the asset S_i at time t. Fasy way of retrieving this volatlity from array.

Parameters:
i - asset index
t - current time.

### instantaneousReturnsVolatility

public abstract double instantaneousReturnsVolatility(int i,
int t)

The volatility $\sigma_i(t)$ of asset i. Will be stored (constructor) rather than recomputed in each path. The advantage of the deterministic volatility case is exactly that the volatilities are path independent.

Parameters:
t - current time.
i - asset index.

### rho

public abstract double rho(int i,
int j)

Constant correlation of the asset returns R_i=log(S_i(t)): d< R_i,R_j >_t=rho(i,j)dt. Will be stored (constructor) rather than recomputed in each path.

Parameters:
i - asset index.
j - asset index.

### integralSgiSgj

public abstract double integralSgiSgj(double a,
double b,
int i,
int j)

The integral $\int_a^b\sigma_i(s)\sigma_j(s)ds$ (TeX notation, sigma_i(t) the volatility of asset S_i). Needed for covarianceOfReturns(double, double, int, int)

Parameters:
i - asset index.
j - asset index.

### covarianceOfReturns

public double covarianceOfReturns(double a,
double b,
int i,
int j)

The covariances Cov(R_i,R_j) of the asset returns R_i=log(S_i(b)/S_i(a)) over the time interval [a,b].

Overrides:
covarianceOfReturns in class Basket
Parameters:
a - time begin.
b - time end.
i - asset index.
j - asset index.

### covarianceOfReturnsMatrix

public ColtMatrix covarianceOfReturnsMatrix(int t,
int s)

The covariance matrix Cov(R_i,R_j) of the returns R_i=log(S_i(s)/S_i(t)) over the time step t -> s. Symmetry not exploited, full matrix allocated.

Parameters:
t - time step start.
s - time step stop.

### volatilityMatrix

public ColtMatrix volatilityMatrix(int t)

The Cholesky root of the covariance matrix of the returns log(S_i(t+dt)/S_i(t)) over the time step t -> t+1. This matrix drives the time step t->t+1.

Overrides:
volatilityMatrix in class Basket
Parameters:
t - current time.

### new_Z_vector

public void new_Z_vector()
A new standard normal vector driving a time step. We'll seprate this out so we can easily switch to Quasi Monte Carlo dynamics by merely changing this routine.

### stepToHorizonSimulationInit

public void stepToHorizonSimulationInit(int whichProbability,
int t)

Must be called before each simulation of path branches which step from current time t to the horizon T in one time step. Sets up the needed drift vector and volatility matrix.

Overrides:
stepToHorizonSimulationInit in class Basket
Parameters:
t - time of branching.
whichProbability - simulation probability (market/risk neutral)

### timeStep

public void timeStep(int whichProbability,
int t)
Time step t -> t+1 of the discounted asset prices.

Specified by:
timeStep in class Basket
Parameters:
t - current time.
whichProbability - simulation probability (market/risk neutral)

### timeStepToHorizon

public void timeStepToHorizon(int t)

Single time step t -> s of discounted asset price paths. Assumes stepToHorizonSimulationInit(int, int) has been called to set the drift vector and the returnsVolatilityMatrix with the values for the returns t -> T. This also takes account of the probability under which the simulation proceeds.

Overrides:
timeStepToHorizon in class Basket
Parameters:
t - Current time.