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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Dec 6 22:46:31 CET 2015


Author: bodanker
Date: 2015-12-06 22:46:31 +0100 (Sun, 06 Dec 2015)
New Revision: 1720

Modified:
   pkg/quantstrat/demo/luxor.2.add.paramsets.R
Log:
Get luxor.4 demo running

This demo never worked as committed. The timespan paramset contained
component.type = "rule", which was never supported. It's also unclear
how variable = list(n = .timespans) was supposed to work.

Add a paramset distribution for each combination of entry/exit and
long/short. Change variable from 'n' to 'timespan', since that's the
variable we're parameterizing.

The correctness of the demo is still uncertain, but at least it runs.


Modified: pkg/quantstrat/demo/luxor.2.add.paramsets.R
===================================================================
--- pkg/quantstrat/demo/luxor.2.add.paramsets.R	2015-11-16 16:56:24 UTC (rev 1719)
+++ pkg/quantstrat/demo/luxor.2.add.paramsets.R	2015-12-06 21:46:31 UTC (rev 1720)
@@ -59,12 +59,36 @@
 
 add.distribution(strategy.st,
 	paramset.label = 'Timespan',
-	component.type = 'rule',
-	component.label = 'timespan',
-	variable = list(n = .timespans),
+	component.type = 'enter',
+	component.label = 'EnterLONG',
+	variable = list(timespan = .timespans),
 	label = 'Timespan'
 )
 
+add.distribution(strategy.st,
+	paramset.label = 'Timespan',
+	component.type = 'enter',
+	component.label = 'EnterSHORT',
+	variable = list(timespan = .timespans),
+	label = 'Timespan'
+)
+
+add.distribution(strategy.st,
+	paramset.label = 'Timespan',
+	component.type = 'exit',
+	component.label = 'Exit2LONG',
+	variable = list(timespan = .timespans),
+	label = 'Timespan'
+)
+
+add.distribution(strategy.st,
+	paramset.label = 'Timespan',
+	component.type = 'exit',
+	component.label = 'Exit2SHORT',
+	variable = list(timespan = .timespans),
+	label = 'Timespan'
+)
+
 ###
 
 save.strategy(strategy.st)



More information about the Blotter-commits mailing list