[Blotter-commits] r88 - pkg/demo
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jun 9 22:07:45 CEST 2009
Author: jryan
Date: 2009-06-09 22:07:44 +0200 (Tue, 09 Jun 2009)
New Revision: 88
Modified:
pkg/demo/turtles.R
Log:
changed getSymbols call to set index.class to POSIXct to comply with new quantmod
package changes. 0.3-10. (currently commented out)
Modified: pkg/demo/turtles.R
===================================================================
--- pkg/demo/turtles.R 2009-05-11 00:42:10 UTC (rev 87)
+++ pkg/demo/turtles.R 2009-06-09 20:07:44 UTC (rev 88)
@@ -37,6 +37,9 @@
print("Initializing portfolio and account structure")
# Assemble a small portfolio of three stocks
symbols = c("XLY", "XLP", "XLE", "XLF", "XLV", "XLI", "XLB", "XLK", "XLU")
+# getSymbols now defaults (as originally) to "Date" indexing. We can change to use POSIXct here.
+# getSymbols(symbols, index.class=c("POSIXt","POSIXct"), from=initDate, source="yahoo")
+
# getSymbols(symbols, from=initDate, source="yahoo")
# Set up a portfolio object and an account object
@@ -169,4 +172,4 @@
# require(PerformanceAnalytics)
# return = Delt(account[["TOTAL"]]$End.Eq)
-# charts.PerformanceSummary(as.zoo(return))
\ No newline at end of file
+# charts.PerformanceSummary(as.zoo(return))
More information about the Blotter-commits
mailing list