assetsFit(x, method = c("st", "snorm", "norm"), title = NULL,
description = NULL, fixed.df = NA, ...)
as.matrix
to an object of
class matrix
.method="st"
denotes a multivariate skew-Student-t distribution,
method="snorm"
a multivariate skew-Normal distribution, and
method="no
"fASSETS"
object."fASSETS"
object.NA
, the default, or a numeric value assigning the
number of degrees of freedom to the model. In the case that
fixed.df=NA
the value of df
will be included in the
optimization process, assetsFit()
returns a S4 object class of class "fASSETS"
, with the
following slots:"norm"
, "snorm"
, "st"
.model=list(mu, Omega, alpha, df
.@fit
slot is a list with the following compontents:
(Note, not all are documented here).dim(beta)=c(nrow(X), ncol(y))
, Omega
is a
covariance matrix of order dim
, alpha
is
a vector of shape parameters of length dim
.optim
; see the
documentation of this function for explanation of its
components.@fit$model
slot can be used as input to the
function assetsSim
for simulating a similar portfolio of
assets compared with the original portfolio data, usually market
assets.assetsFit
for the parameter estimation uses code
based on functions from the contributed packages "mtvnorm"
and
"sn"
for fitting data to a multivariate Normal, skew-Normal,
or skew-Student-t distribution.Azzalini A. (1986); Further Results on a Class of Distributions Which Includes the Normal Ones, Statistica 46, 199--208.
Azzalini A., Dalla Valle A. (1996); The Multivariate Skew-normal Distribution, Biometrika 83, 715--726.
Azzalini A., Capitanio A. (1999); Statistical Applications of the Multivariate Skew-normal Distribution, Journal Roy. Statist. Soc. B61, 579--602.
Azzalini A., Capitanio A. (2003); Distributions Generated by Perturbation of Symmetry with Emphasis on a Multivariate Skew-t Distribution, Journal Roy. Statist. Soc. B65, 367--389. Genz A., Bretz F. (1999); Numerical Computation of Multivariate t-Probabilities with Application to Power Calculation of Multiple Contrasts, Journal of Statistical Computation and Simulation 63, 361--378.
Genz A. (1992); Numerical Computation of Multivariate Normal Probabilities, Journal of Computational and Graphical Statistics 1, 141--149. Genz A. (1993); Comparison of Methods for the Computation of Multivariate Normal Probabilities, Computing Science and Statistics 25, 400--405. Hothorn T., Bretz F., Genz A. (2001); On Multivariate t and Gauss Probabilities in R, R News 1/2, 27--29. Wuertz, D., Chalabi, Y., Chen W., Ellis A. (2009); Portfolio Optimization with R/Rmetrics, Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.
## LPP -
# Percentual Returns:
LPP = 100 * as.timeSeries(data(LPP2005REC))[, 1:6]
colnames(LPP)
## assetsFit -
# Fit a Skew-Student-t Distribution:
fit = assetsFit(LPP)
print(fit)
# Show Model Slot:
print(fit@model)
## assetsSim -
# Simulate set with same statistical properties:
set.seed(1953)
lppSim = assetsSim(n = nrow(LPP), dim = ncol(LPP), model = fit@model)
colnames(lppSim) <- colnames(LPP)
rownames(lppSim) <- rownames(LPP)
head(lppSim)
Run the code above in your browser using DataLab