[R-SIG-Finance] Multi-asset portfolio VaR
Brian G. Peterson
brian at braverock.com
Tue Jul 17 19:13:52 CEST 2007
Fabrice McShort wrote:
> I tried to calculate the VaR of a multi-assets portfolio.
> I have the historical data of the assets and their weights in the
portfolio.
> My impression is that the Performance Analytics Package calculate
only the
> VaR of each asset. Not the VaR of the portfolio. But, when I use
fPortfolio
> Package, I have the VaR (Historical simulation) of the portfolio.
Could you
> confirm my first impression or indicate me how to calculate the
> VaR of this portfolio with the Performance Analytics Package.
> Thanks for your help.
Fabrice,
You are correct. The parametric VaR methods in PerformanceAnalytics are
all univariate. fPortfolio calculates historical mean-VaR from the
quantiles of observed returns. The simplest method to do what you want
is to combine functions from the two packages.
Use pfolioReturn() from fPortfolio to construct the return series of
your historical portfolio. Use this as the input to the parametric VaR
calculations in PerformanceAnalytics. This may be sufficient to answer
your requirements (it's how I calculate VaR of a historical portfolio in
most cases.)
Now, a true multivariate parametric estimation is somewhat more
difficult. I'll take the case of traditional mean-VaR first, and then
extend that to the Cornish-Fisher expansion.
In the case of traditional mean-VaR, to make a parametric estimate of
VaR that is multivariate, you need to construct the return series,
possibly using some robust estimator so that you get a more robust mean
to use as the input. The difficulty lies with the variance. You may in
this case wish to scale your observed component returns by the
historical weights and use one of the multivariate methods to come up
with a better multivariate covariance measure. See the Multivariate
Statistics CRAN Task view here:
http://cran.r-project.org/src/contrib/Views/Multivariate.html
Now, extending this to multivariate skewness and kurtosis is yet more
complex. PerformanceAnalytics provides functions for coskewness and
cokurtosis, but those aren't the actual inputs into the Cornish Fisher
expansion. The "moments" package provides slightly more options for
calculating skewness and kurtosis than those used in
PerformanceAnalytics and fBasics, but still doesn't provide a true
multivariate estimate of skewness and kurtosis. There is quite a lot of
literature on multivariate skewness and kurtosis, and if you're
interested, we would certainly welcome collaboration on creating a set
of functions for providing these in R.
For most purposes, the univariate case seems to be sufficient, but I
wanted to make sure to cover the issues in the true multivariate case.
Regards,
- Brian
More information about the R-SIG-Finance
mailing list