Learn R Programming

RelValAnalysis (version 1.0)

marketmodel: Market Model Objects

Description

The function marketmodel is used to create market model objects.

Usage

marketmodel(name, n, gamma, diffmatrix, diag = FALSE)

Arguments

Value

namethe name of the model.gammathe growth rate function.diffmatrixthe diffusion matrix which can be a constant or a function (see above for the details).nthe number of stocks in the model.diagTRUE or FALSE as supplied by the user.

Details

A market model is defined by a system of stochastic differential equations (SDE) of the form dlog X_i(t) = gamma_i(t)dt + Sigma(t) dW(t), i = 1, ..., n, where gamma_i(t) are the growth rates (represented by gamma), Sigma is the n times n diffusion matrix (represented by diffmatrix), and W(t) is an n-dimensional standard Brownian motion. The unit of time is annual. We assume that the coefficients are functions of the X_i's, i.e., the system is Markovian. Note that the SDE are stated in terms of the logarithms of the X_i's. The Atlas model (see AtlasModel) and the volatility-stablized market model (see VolStabModel) are predefined in the package. More general rank-based models can be constructed as marketmodel objects using this function. The function SimMarketModel is used to simulate a market model. At present no effort is put to check the consistency among the inputs (e.g. inconsistent dimensions).

References

Fernholz, E. R. (2002) Stochastic portfolio theory. Springer.

See Also

AtlasModel, SimMarketModel, VolStabModel

Examples

Run this code
# Create a model of two independent geometric Brownian motions
model1 <- marketmodel(name = "GBM", n = 2,
                      gamma = c(0.1, 0.05),
                      diffmatrix = c(0.1, 0.2),
                      diag = TRUE)

# Create an Atlas model of 100 stocks
model2 <- AtlasModel(n = 100, g = 0.0001, sigma = 0.1)

# Create a Volatility stabilized market of 10 stocks
model3 <- VolStabModel(n = 10, alpha = 0.001, sigma = 0.01)

Run the code above in your browser using DataLab