[R-SIG-Finance] xts to timeSeries conversion

R. Michael Weylandt michael.weylandt at gmail.com
Sat Mar 24 14:13:05 CET 2012


I'm not sure I understand. PerformanceAnalytics is part of the
"xts-family" (as opposed to the Rmetrics family) of finance packages.
Your problem may be that it requires returns, but consider this
(somewhat opaque) one liner.

charts.PerformanceSummary(ROC(Cl(to.weekly(Ad(getSymbols("IBM",auto.assign
= F))))))

which works just fine (using 3 packages explicitly and two major dependencies!)

Michael

On Sat, Mar 24, 2012 at 9:01 AM, Golam Sakline <golam.sakline at gmail.com> wrote:
> How is it possible to get getSymbol object like IBM stock converted to timeSeries object so that it can be plotted in charts.PerformanceSummary() of PerformanceAnalytics in few lines of code. The problem I am having is with the Date column. Please help.
>
> Thanks
>
> Riskmaverick
>
> Sent from my iPhone
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



More information about the R-SIG-Finance mailing list