[R-SIG-Finance] quantstrat help - simple combine error using windows and walk.forward

Mark Knecht markknecht at gmail.com
Tue Sep 30 15:20:42 CEST 2014


On Tue, Sep 30, 2014 at 12:34 AM, Derek Wong <treydog999 at gmail.com> wrote:
> Hello,
>
> I have been able to reproduce this error in Ubuntu based system as well not
> just on windows. I was wondering if anyone had any insights or ways to to
> solve this or create a work around.  If there is any additional information
> you require let me know. Please I would really appreciate help on this. It
> is totally out of my depth and I am hoping that this fine community can
> help.
>

Derek,
   I have no time to do any debugging of this but the first error on my
Gentoo system running RStudio and R-3.1.1 is actually this line:

portfolio1.st <- 'pair1'account.st <- 'pairs'

which does look like bad code to me.

   One 'problem' with a number of demos that are out there is that the demo
author may be using the development version of a specific package which
then results in end user types (like me) having problems.

   I suggest you run this code line-by-line and then post back a few lines
preceding the breakdown. Maybe someone can give better input than
I can. Also, please edit/snip your responses to add focus to the exact
issue.

Good luck,
Mark

> On Wed, Sep 24, 2014 at 9:36 PM, Derek Wong <treydog999 at gmail.com> wrote:
>
>> Hello,
>>
>> I am having a lot of trouble with using walk.forward.in windows. i get
>> the following error. This may be related to bug #5814. If someone could
>> please help me i would really appreciate it. The reproducible code below is
>> based on the pair_trade example. Thanks.
>>
>> error calling combine function:
>> <simpleError in fun(result.1, result.2, result.3, result.4, result.5,
>> result.6,     result.7, result.8, result.9, result.10, result.11,
<SNIP>
>> result.172, result.173, result.174, result.175, result.176,     result.177,
>> result.178, result.179, result.180): attempt to select less than one
>> element>
>> Error in walk.forward(pairStrat, paramset.label = "BBOPT", portfolio.st =



More information about the R-SIG-Finance mailing list