[R-SIG-Finance] Do the blotter demos work?

Mark Knecht markknecht at gmail.com
Fri May 10 23:47:56 CEST 2013


Hi,
   I'm struggling to get any of the demos in the blotter package to
work. Using a command such as:

demo(longtrend, package="blotter")

it runs along for a second and then fails with this message:

+     # Calculate P&L and resulting equity with blotter
+     updatePortf(ltportfolio, Dates = CurrentDate)
+     updateAcct(ltaccount, Dates = CurrentDate)
+     updateEndEq(ltaccount, Dates = CurrentDate)
+ } # End dates loop
.
[1] "1998-10-30 00:00:00 GSPC 91 @ 1098.67"
Error in lag.xts(TmpPeriods$Pos.Value, 1) :
  abs(k) must be less than nrow(x)
In addition: Warning messages:
1: In rm("account.longtrend", "portfolio.longtrend", pos = .blotter) :
  object 'account.longtrend' not found
2: In rm("account.longtrend", "portfolio.longtrend", pos = .blotter) :
  object 'portfolio.longtrend' not found
3: In rm("ltaccount", "ltportfolio", "ClosePrice", "CurrentDate", "equity",  :
  object 'ltaccount' not found
4: In rm("ltaccount", "ltportfolio", "ClosePrice", "CurrentDate", "equity",  :
  object 'ltportfolio' not found
5: In rm("ltaccount", "ltportfolio", "ClosePrice", "CurrentDate", "equity",  :
  object 'GSPC' not found
6: In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  :
  downloaded length 236151 != reported length 200

   I suspect I'm just not running it correctly but don't know what I'm
doing wrong.

   I've generally had trouble with all demos having to do with
blotter. Are they still working or are they no longer maintained?

   The quantstrat demos, at least the couple I've tried, do seem to work.

   This is R-2.15.3 running in RStudio=0.97.336/

Thanks,
Mark



More information about the R-SIG-Finance mailing list