

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object Market.Asset Market.DeterministicVolAsset
Implementation of Asset
. The asset path t>S(t) follows a
geometric Brownian motion with constant drift mu and deterministic
volatility sigma(t). The short rate r is also constant and so
the path t>B(t)=exp(r*t) of the riskfree bond can be computed at
initialization (by the constructor).
These paths are stored in the arrays B[] and S[] respectively. Discrete time t is measured in multiples t*dt of the time step dt and so for example B[t]=B(t*dt)=exp(r*t*dt).
The array S[] contains the discounted price path t>S(t)/B(t), that is, S[t]=S(t*dt)/B(t*dt). Remember this when computing option payoffs.
For details on the price dynamics see ConstantVolatilityAsset
.
Simply replace sigma*sqrt(dt)
with
sqrt(integral_t^{t+dt}sigma^2(u)du)
.
Driver: The increment W(s)W(t) is normal with mean zero and variance (st)*dt, that is,
where Z is standard normal. In particular for the time step s=t+1 we have
where Z(t) is the standard normal increment driving this time step. The entire price path is driven by the sequence of independent standard normal Zincrements. These increments are stored in the array Z[ ] and Z[t] is the increment driving the time step t>t+1. These increments are stored for wo reasons:
To compute correct standard deviations of Monte Carlo estimators these
variables need to be set to zero at the beginning of each simulation
simulationInit(int)
.
If only means but no standard deviations are required then this is not
necessary
This scheme is correct for expectations and conditional expectations but not for conditional expectations of conditional expecations (branchBranchCounter needed). However computational cost makes iterated conditional expectations forbidding and we will not compute them.
Constructor Summary  
DeterministicVolAsset(int T,
double dt,
int nSignChange,
double S_0,
double r,
double q,
double mu)

Method Summary  
double 
get_mu()
Constant asset price drift. 
double 
get_r()
Constant short rate. 
double 
get_sigmaSqrtdt(int t)
sigma(t)*sqrt(dt) , where sigma(t) is the volatility of
the asset. 
abstract double 
integralSigmaSquare(double a,
double b)
The quadratic variation < log(S)>_a^bintegral_a^b sigma^2(u)du variation of the return process log(S) over the time interval [a,b]. 
void 
newPath(int whichProbability)
Computes a new discounted price path driven by new (as opposed to sign changed) Zincrements. 
void 
newPathBranch(int whichProbability,
int t)
Continues a discounted asset price path existing up to time t from this time t to the horizon (branching at time t). 
void 
newWienerIncrements(int t)
Computes a new sequence of standard normal increments Z[j], j=t,t+1,...T1, needed to compute a path forward from time t to the horizon. 
int 
pathSegment(int whichProbability,
int t,
Trigger trg)
Continues a discounted price path which exists up to time t from time t to the next time s>t at which the Trigger trg is triggered or s=T, whichever comes first, and returns this time s. 
abstract double 
sigma(int t)
Volatility at discrete time t (continuous time t*dt). 
double 
Sigma(int t)
sqrt(\int_t^T sigma^2(u)du), standard deviaition of the return from the current time t to the horizon. 
void 
simulationInit(int t)
Sets pathCounter (if t=0) or branchCounter (if t>0) to zero. 
double 
standardDeviationOfReturn(double a,
double b)
Standard deviation of the return process over the time interval [a,b]. 
void 
timeStep(int whichProbability,
int t)
Time step t > t+1 of discounted asset price path driven by a new (as opposed to sign changed) Zincrement. 
void 
timeStep(int whichProbability,
int t,
int s)
Single time step t > s of discounted price path driven by new Zincrement. 
Methods inherited from class Market.Asset 
dividendReductionFactor, forwardPrice, get_B, get_dt, get_nSignChange, get_q, get_S_0, get_S, get_T, get_volatilityIsDeterministic, get_Z 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 
public DeterministicVolAsset(int T, double dt, int nSignChange, double S_0, double r, double q, double mu)
T
 Number of time steps to horizon.dt
 Size of time step.nSignChange
 Number of times the
Zincrements are reused through random sign
changes.S_0
 Asset price S(0).r
 Constant short rate.q
 Constant dividend yield.mu
 Constant asset price drift.Method Detail 
public abstract double sigma(int t)
Volatility at discrete time t (continuous time t*dt).
public abstract double integralSigmaSquare(double a, double b)
The quadratic variation < log(S)>_a^bintegral_a^b sigma^2(u)du variation of the return process log(S) over the time interval [a,b]. Because of its nonstochastic nature it is also the variance (expected quadratic variation) of the return over this interval.
public double standardDeviationOfReturn(double a, double b)
Standard deviation of the return process over the time interval [a,b].
public double get_sigmaSqrtdt(int t)
sigma(t)*sqrt(dt)
, where sigma(t) is the volatility of
the asset.
get_sigmaSqrtdt
in class Asset
t
 Current time.public double Sigma(int t)
sqrt(\int_t^T sigma^2(u)du), standard deviaition of the return from the current time t to the horizon.
Sigma
in class Asset
t
 Current time.public double get_r()
public double get_mu()
public void simulationInit(int t)
Sets pathCounter (if t=0) or branchCounter (if t>0) to zero.
Must be called before every new simulation run of full paths (t=0) or branches of an existing path (t>0) which are used to compute standard deviations to keep track of where we are cycling through the sign changes of the Zincrements. This is necessary to correctly identify groups of dependent paths.
Not necessary if only means are computed. For simplicity call it before every new simulation.
simulationInit
in class Asset
t
 Current time (time of branching).public void newWienerIncrements(int t)
Computes a new sequence of standard normal increments Z[j], j=t,t+1,...T1, needed to compute a path forward from time t to the horizon. These sequences are produced in independent groups of size nSignChange each. In each group only the signs are changed.
If t=0 a path simulation is under way while in case t>0 a simulation of branches of an existing path is taking place. Correspondingly the pathCounter or branchCounter variables are incremented.
t
 Current time.public void newPathBranch(int whichProbability, int t)
Continues a discounted asset price path existing up to time t from this time t to the horizon (branching at time t).
The Zincrements driving the path branch are the next set of Zincrements in a group of nSignChange dependent sets of increments which differ only by sign. Only after nSignChange sign changes is a new set of Zincrements computed.
newPathBranch
in class Asset
whichProbability
 Probability for simulation (market/risk neutral).t
 Current time (time at which the new path branch starts).public void timeStep(int whichProbability, int t)
Time step t > t+1 of discounted asset price path driven by a new (as opposed to sign changed) Zincrement.
Sets the value S[t+1] in the price path and registers the standard normal increment Z[t] generated to drive the time step. This increment is used in the computation of some hedge deltas.
timeStep
in class Asset
whichProbability
 probability for simulation (market/risk neutral)t
 branching time (time at which new branch starts)public void timeStep(int whichProbability, int t, int s)
Single time step t > s of discounted price path driven by new Zincrement. Sets only the value S[s] in the price path S[ ].
timeStep
in class Asset
whichProbability
 Probability for simulation (market/risk neutral).t
 Current time.s
 Future time to be reached.public int pathSegment(int whichProbability, int t, Trigger trg)
Continues a discounted price path which exists up to time t from time t to the next time s>t at which the Trigger trg is triggered or s=T, whichever comes first, and returns this time s.
The Trigger could be a signal triggering a hedge trade or option exercise for example. No sign changes are applied to the Zincrements and so a new independent path branch is computed.
pathSegment
in class Asset
whichProbability
 Probability for simulation (market/risk neutral).t
 Current time (time at which new path branch starts).trg
 triggers stopping the path.public void newPath(int whichProbability)
Computes a new discounted price path driven by new (as opposed to sign changed) Zincrements. Thus the new path is indpendent of preceeding paths.
newPath
in class Asset
whichProbability
 Probability for simulation (market/risk neutral).


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 