Finance[ValueAtRisk] - calculate value-at-risk
|
Calling Sequence
|
|
ValueAtRisk(pathfunction, pathgenerator, opts)
ValueAtRisk(pathfunction, process, timegrid, opts)
ValueAtRisk(pathfunction, process, timeinterval, opts)
ValueAtRisk(expression, opts)
|
|
Parameters
|
|
pathfunction
|
-
|
procedure; path function (see description)
|
pathgenerator
|
-
|
path generator data structure; path generator
|
process
|
-
|
one- or multi-dimensional stochastic process, or list or vector of one-dimensional stochastic processes
|
timegrid
|
-
|
range or time grid data structure; time grid
|
timeinterval
|
-
|
range; time interval
|
expression
|
-
|
algebraic expression; expression whose value is to be estimated
|
opts
|
-
|
(optional) equation(s) of the form option = value where option is one of confidencelevel, replications, or timesteps; specify options for the ValueAtRisk command
|
|
|
|
|
Description
|
|
•
|
The ValueAtRisk(pathfunction, pathgenerator, opts) calling sequence computes a Monte Carlo estimate of the value-at-risk of a portfolio whose total value is governed by the specified stochastic process. It follows the same procedure as the SamplePath and ExpectedValue commands:
|
–
|
Compute the value .
|
–
|
Repeat these two steps the specified number of times (see the replications option) and compute the mean average.
|
•
|
The ValueAtRisk(pathfunction, process, timegrid, opts) and ValueAtRisk(pathfunction, process, timeinterval, opts) calling sequences first construct the corresponding path generator and then perform the same computations as above.
|
•
|
The parameter pathfunction must be a Maple procedure that accepts a one-dimensional array of floating-point numbers (sample path for the underlying process) and returns the corresponding value as a floating point number. A path function can be used for example to compute expected values for some path-dependent payoffs.
|
•
|
The timegrid parameter can be used to pass non-homogeneous time grids to the simulation routines. It must be given as a data structure generated by the TimeGrid command.
|
•
|
The ValueAtRisk(expression, opts) calling sequence attempts to extract all the stochastic variables involved in expression and generate the corresponding path generator and path function using the specified number of time steps. In particular, ValueAtRisk will extract all time instances involved in expression and adjust them so that they belong to the grid.
|
|
|
Options
|
|
•
|
confidencelevel = realcons -- This option specifies the confidence level for which the value-at-risk is computed. The value of this option be a real constant between 0 and 1. By default, a .99 confidence level is used.
|
•
|
replications = posint -- This option specifies the number of replications of the sample path. By default, only one replication of the sample path is generated.
|
•
|
timesteps = posint -- This option specifies the number of time steps. This option is ignored if an explicit time grid is specified. By default, only one time step is used.
|
|
|
Compatibility
|
|
•
|
The Finance[ValueAtRisk] command was introduced in Maple 15.
|
|
|
Examples
|
|
>
|
|
Consider a simple one-dimensional stochastic process.
>
|
|
| (1) |
>
|
|
| (2) |
Use a Maple procedure to compute the same expression.
>
|
|
>
|
|
>
|
|
| (3) |
Here is an example involving multivariate stochastic process.
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
This is the same computation but using Maple procedures.
>
|
|
>
|
|
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
Use a two-dimensional Ito process with two one-dimensional projections and a given covariance matrix.
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
>
|
|
| (13) |
>
|
|
| (14) |
>
|
|
| (15) |
>
|
|
| (16) |
>
|
|
| (17) |
|
|
See Also
|
|
Finance[BrownianMotion], Finance[CEVProcess], Finance[DeterministicProcess], Finance[Diffusion], Finance[Drift], Finance[ExpectedShortfall], Finance[GaussianShortRateProcess], Finance[GeometricBrownianMotion], Finance[HestonProcess], Finance[OrnsteinUhlenbeckProcess], Finance[PathPlot], Finance[SamplePath], Finance[SampleValues], Finance[SquareRootDiffusion], Finance[StochasticProcesses], Finance[WienerProcess]
|
|
References
|
|
|
Glasserman, P., Monte Carlo Methods in Financial Engineering. New York: Springer-Verlag, 2004.
|
|
Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.
|
|
Kloeden, P., and Platen, E., Numerical Solution of Stochastic Differential Equations, New York: Springer-Verlag, 1999.
|
|
|