[R-SIG-Finance] quantmod: overlay plots
rex
rex at nosyntax.net
Tue Sep 27 22:58:11 CEST 2011
G See <gsee000 at gmail.com> [2011-09-27 06:41]:
>If you follow the first alternative suggested by Gei and use
>PerformanceAnalytics, the RF function (which is an alias for
>makeReturnFrame) in my qmao
>package<https://r-forge.r-project.org/R/?group_id=1113> can
>assist you in merging the data.
>
>library(qmao)
>library(PerformanceAnalytics)
>charts.PerformanceSummary(RF(getSymbols(c("QQQ","EWG","EWI"))))
Very nice! Thank you for creating this package.
>The chart_Series function (note the underscore) can also handle multiple
>time series
>
>library(quantmod)
>getSymbols(c("SPY","DIA"))
>
># This will put 2 price series on a chart
>thm <- chart_theme()
>thm$col$line.col <- 'lightblue'
>chart_Series(Cl(SPY),theme=thm)
>add_Series(Cl(DIA),on=1)
Add thanks to Jeff for adding this capability -- I've wanted it for
years.
-rex
--
More information about the R-SIG-Finance
mailing list