assets-modeling {fAssets} | R Documentation |
Modeling Multivariate Asset Sets
Description
Fitting and Simulatingassets from multivariate asset sets based on modeling skew normal and related distributions.
Usage
assetsFit(x, method = c("st", "sn", "sc"),
title=NULL, description=NULL, fixed.df=NA, ...)
assetsSim(n, method=c("st", "sn", "sc"),
model=list(beta=rep(0, 2), Omega=diag(2), alpha=rep(0, 2), nu=4),
assetNames=NULL)
Arguments
x |
any rectangular time series object which can be converted by the
function |
n |
a numeric value which represents the number of random vectors to be drawn. |
method |
a character string with the names of the supported distributions:
|
model |
a list with the model parameters.
|
fixed.df |
a logical value, should the degreess of freedom fitted or held fixed? |
title |
an optional project title. |
description |
an option project desctiption. |
assetNames |
a character vector with optional asset names. |
... |
optional arguments passed to the underlying functions. |
Value
assetsFit
returns the fitted parameters, assetsSim
returns a simulated (return) series.
Author(s)
Diethelm Wuertz for the Rmetrics port.
References
Wuertz, D., Chalabi, Y., Chen W., Ellis A. (2009); Portfolio Optimization with R/Rmetrics, Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.
Examples
## LPP2005REC -
# Load Swiss Pension Fund Data as Percentual Returns:
LPP <- 100 * LPP2005REC[, 1:3]
head(LPP)
## assetsFit -
# Fit a Skew-Student-t Distribution:
fit <- assetsFit(LPP)
# Extract the Model:
model <- fit@fit$dp
# Show Model Slot:
print(model)
## assetsSim -
# Simulate set with same statistical properties:
set.seed(1953)
LPP.SIM <- assetsSim(n=nrow(LPP), model=model)
colnames(LPP.SIM) <- colnames(LPP)
head(LPP.SIM)