[R-SIG-Finance] PerformanceAnalytics package

Brian G. Peterson brian at braverock.com
Mon Oct 24 20:16:27 CEST 2011


table.MonthlyReturns was replaced with table.CalendarReturns, which is
somewhat more flexible than the old function.

In general, PerformanceAnalytics is most tested on regular returns data.
Most of the functions will work with any xts/zoo time series of returns
(hourly, daily, weekly, monthly, annual, etc) .  Some will work on cash
P&L, prices, or a NAV/wealth index, as noted in the documentation for
those functions.  Where specific periodicities are required by a
function, this will be noted in the documentation for that function.

It is also true that all the VaR and ES functions were collapsed into a
single function for each with various univariate and portfolio methods.

Regards,

   - Brian


On Mon, 2011-10-24 at 13:19 -0400, R. Michael Weylandt wrote:
> I don't know if Josh/Brian/Jeff got you an answer on this, but on my
> version of PerformanceAnalytics (1.0.3.2), these different VaR methods
> seem to have been collapsed into VaR with different methods available.
> Perhaps your reference is for an older version of the package in which
> these have been deprecated.
> 
> I also don't see table.MonthlyReturns() only table.AnnualizedReturns()
> available. I believe I read somewhere that the package is designed
> with monthly data in mind (though most of the analytical techniques
> are scale invariant) so it's perhaps not surprising that there's no
> aggregation tool to monthly.
> 
> Michael
> 
> On Sun, Oct 23, 2011 at 3:56 PM, financial engineer
> <fin_engr at hotmail.com> wrote:
> >
> > hi,
> >
> > As I continue working through the functions with my time series of daily returns(R.MCO), most of the functions have been working fine, except the following(so far):
> >
> > VaR.mean.MCO=VaR.mean(R.MCO,p=0.95)
> > Error: could not find function "VaR.mean"
> >> VaR.traditional.MCO=VaR.traditional(R.MCO,p=0.95)
> > Error: could not find function "VaR.traditional"
> >> modifiedVaR.MCO=modifiedVaR(R.MCO,p=0.99)
> > Error: could not find function "modifiedVaR"
> >> table.MonthlyReturns(R.MCO,ci=0.95,digits=4)
> > Error: could not find function "table.MonthlyReturns"
> >
> > Can you please let me know how I can fix these errors, as I am keen to use these functions for computing the daily VaR and also generate tables of monthly returns.
> >
> > Thanks!
> >
> >> Date: Sat, 22 Oct 2011 17:20:04 -0500
> >> From: brian at braverock.com
> >> To: fin_engr at hotmail.com
> >> CC: r-sig-finance at r-project.org
> >> Subject: Re: [R-SIG-Finance] PerformanceAnalytics package
> >>
> >> This is most likely a conflict between xts/zoo and the various f* Rmetrics
> >> packages
> >> (or possibly the timeSeries package from Rmetrics).  You'll like see a
> >> warning that function 'time' is being masked.
> >>
> >> the zoo/xts and Rmetrics teams are aware of the issue, and are trying to
> >> sort out a modle that will avoid trhe conflict.
> >>
> >> For now, the most likely way for you to avoid this issue is to not load
> >> the Rmetrics packages, or to load zoo/xts *after* you've loaded any
> >> Rmetrics packages you need.
> >>
> >> On Sat, 22 Oct 2011 18:10:15 -0400, financial engineer
> >> <fin_engr at hotmail.com> wrote:
> >> > hi,
> >> >
> >> >
> >> >
> >> > I've been trying to familiarize myself with the PerformanceAnalytics
> >> > package.
> >> >
> >> >
> >> >
> >> > As I go through the examples (in the attached file), I faced a hiccup.
> >> >
> >> > When I run the following code, it only prints the first chart
> >> >
> >> >
> >> >
> >> > charts.PerformanceSummary(managers[, c(manager.col,
> >> >
> >> > indexes.cols)],colorset = rich6equal, lwd = 2, ylog = TRUE)
> >> >
> >> >
> >> >
> >> > and gives me the following error:
> >> >
> >> >
> >> > Error in UseMethod("time<-") :
> >> >
> >> >   no applicable method for 'time<-' applied to an object of class
> >> >
> >> > "c('xts', 'zoo')"
> >> >
> >> >
> >> >
> >> > Can you please let me know how I can fix it.
> >> >
> >> >
> >> >
> >> > Thanks!
> >>



More information about the R-SIG-Finance mailing list