[Blotter-commits] r206 - pkg/blotter/demo
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jan 27 15:57:11 CET 2010
Author: braverock
Date: 2010-01-27 15:57:10 +0100 (Wed, 27 Jan 2010)
New Revision: 206
Modified:
pkg/blotter/demo/longtrend.R
Log:
- addinstrument definitions to get rid of warnings in demo
Modified: pkg/blotter/demo/longtrend.R
===================================================================
--- pkg/blotter/demo/longtrend.R 2010-01-27 14:24:52 UTC (rev 205)
+++ pkg/blotter/demo/longtrend.R 2010-01-27 14:57:10 UTC (rev 206)
@@ -53,6 +53,8 @@
# Load data with quantmod
print("Loading data")
+currency("USD")
+stock("GSPC",currency="USD",multiplier=1)
getSymbols('^GSPC', src='yahoo', index.class=c("POSIXt","POSIXct"),from='1998-01-01')
GSPC=to.monthly(GSPC, indexAt='endof')
@@ -110,6 +112,7 @@
cat('cleaning up \n')
rm("account","ClosePrice","CurrentDate","equity","GSPC","i","initDate","initEq","portfolio","Posn","UnitSize","verbose")
rm("account.longtrend","portfolio.longtrend",pos=.blotter)
+rm("GSPC",pos=.instrument)
###############################################################################
# Blotter: Tools for transaction-oriented trading systems development
More information about the Blotter-commits
mailing list