Skip to content
Prev 14504 / 15274 Next

Error using Performance Analytics package

Well, your code is completely mangled by posting in HTML, as Josh told
you would likely happen.

In any case, You haven't provided a reproducible example.

require(PerformanceAnalytics)
data(edhec) # also monthly data
VaR(edhec,
p=0.95, method='modified') 
# the last two parameters are defaults, and
didn't need to be specified

works fine, so I think you need to provide more information.

Your csv data file (as text) could easily be attached to your email, or
posted online somewhere, or added to a github issue on the
PerformanceAnalytics repository, or something.

I don't understand why you are doing as.matrix on your data when you
already have a time series.  You should prefer to use the time series
whenever possible. Just pass 'testdata' to the VaR function

One issue if you were doing component VaR is that you have a rank-
deficient moments matrix. You are windowing only 100-ish months of data
for 216 instruments.  For the univariate calculation in your example,
this shouldn't matter though.

Perhaps you should open a github issue that actually contains all the
information required to examine your problem.

Regards,

Brian

On Tue, 2018-03-13 at 14:30 +0000, Pankaj K Agarwal via R-SIG-Finance
wrote: