[Blotter-commits] r1727 - pkg/quantstrat/demo

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 14 14:18:50 CET 2015


Author: bodanker
Date: 2015-12-14 14:18:50 +0100 (Mon, 14 Dec 2015)
New Revision: 1727

Modified:
   pkg/quantstrat/demo/luxor.sample.tradeGraphs.sma.R
   pkg/quantstrat/demo/luxor.sample.tradeGraphs.timespan.R
   pkg/quantstrat/demo/rsi.R
   pkg/quantstrat/demo/signal.RSI.R
   pkg/quantstrat/demo/signal.SMA.R
Log:
Check for required packages before running demos

Packages rgl, gamlss, and gamlss.util are only Suggests, so check that
they're installed before running the demo.


Modified: pkg/quantstrat/demo/luxor.sample.tradeGraphs.sma.R
===================================================================
--- pkg/quantstrat/demo/luxor.sample.tradeGraphs.sma.R	2015-12-14 13:09:43 UTC (rev 1726)
+++ pkg/quantstrat/demo/luxor.sample.tradeGraphs.sma.R	2015-12-14 13:18:50 UTC (rev 1727)
@@ -9,6 +9,7 @@
 # 3D SMA graph example
 
 require(quantstrat)
+require(rgl)
 
 ### load 'stats' back into .GlobalEnv
 

Modified: pkg/quantstrat/demo/luxor.sample.tradeGraphs.timespan.R
===================================================================
--- pkg/quantstrat/demo/luxor.sample.tradeGraphs.timespan.R	2015-12-14 13:09:43 UTC (rev 1726)
+++ pkg/quantstrat/demo/luxor.sample.tradeGraphs.timespan.R	2015-12-14 13:18:50 UTC (rev 1727)
@@ -9,6 +9,7 @@
 # 3D timespan graph example
 
 require(quantstrat)
+require(rgl)
 
 load(paste0(
         path.package('quantstrat'),

Modified: pkg/quantstrat/demo/rsi.R
===================================================================
--- pkg/quantstrat/demo/rsi.R	2015-12-14 13:09:43 UTC (rev 1726)
+++ pkg/quantstrat/demo/rsi.R	2015-12-14 13:18:50 UTC (rev 1727)
@@ -105,9 +105,3 @@
 # $Id$
 #
 ###############################################################################
-
-##### PLACE THIS BLOCK AT END OF DEMO SCRIPT ################### 
-# book  = getOrderBook(port)
-# stats = tradeStats(port)
-# rets  = PortfReturns(acct)
-################################################################

Modified: pkg/quantstrat/demo/signal.RSI.R
===================================================================
--- pkg/quantstrat/demo/signal.RSI.R	2015-12-14 13:09:43 UTC (rev 1726)
+++ pkg/quantstrat/demo/signal.RSI.R	2015-12-14 13:18:50 UTC (rev 1727)
@@ -7,6 +7,7 @@
 # Load Packages:
 require(iterators)
 require(quantstrat)
+require(gamlss.util)  # depends on gamlss
 
 suppressWarnings(rm("order_book.RSI",pos=.strategy))
 suppressWarnings(rm("account.RSI","portfolio.RSI",pos=.blotter))

Modified: pkg/quantstrat/demo/signal.SMA.R
===================================================================
--- pkg/quantstrat/demo/signal.SMA.R	2015-12-14 13:09:43 UTC (rev 1726)
+++ pkg/quantstrat/demo/signal.SMA.R	2015-12-14 13:18:50 UTC (rev 1727)
@@ -7,6 +7,7 @@
 # Load Packages:
 require(iterators)
 require(quantstrat)
+require(gamlss.util)  # depends on gamlss
 
 ###########################################################################
 # Configure Date Time Settings
@@ -153,9 +154,3 @@
 # for full details see the file COPYING
 #
 ###############################################################################
-
-##### PLACE THIS BLOCK AT END OF DEMO SCRIPT ################### 
-# book  = getOrderBook(port)
-# stats = tradeStats(port)
-# rets  = PortfReturns(acct)
-################################################################



More information about the Blotter-commits mailing list