My issue with one continuous series is that the spliced series does not
reflect actual performance on the roll date.  There is an inherent drop in
price from one contract to the next that if the strategy holds over the
roll.  What's need is a rolled performance series, and but in that case,
rolled performance is what is being traded and not prices, resulting in an
orderBook this can't be directly piped to or compared to a real life order
management system.

I would like to actually simulate trading the roll within the blotter rather
than mask it away with a shortcut.  I suppose this can be done by setting up
different portfolios with the set of tradeable symbols for each time frame
and lopping calls to applyStrategy for each portfolio?

On Mon, Mar 14, 2011 at 11:35 AM, Brian G. Peterson <brian@braverock.com>wrote:

> On 03/14/2011 10:02 AM, Gei Lin wrote:
>
>> Has anyone dealt with rolling futures in the quantstrat and blotter
>> framework?
>>
>
> Yes,  we roll products manually.
>
> The 'best' approach is probably to construct some sort of continuous series
> that implements whatever rules you use (roll calendar, volume cross,
> whatever).
>
> Robert Sams wrote splicing functions, but they assume univariate data, and
> have not been ported to handle multi-column data (e.g. OHLC or TBBO data)
> for each instrument.
>
> Any assistance or contributions on the splicing front would be gladly
> accepted.
>
>
>  I am working on an event based strategy -- the eventIndicators function
>> just
>> returns a whole list of events in xts format (values = 1) that coincide
>> with
>> the index datetimes of the mktdata
>>
>> # add the event indicators
>> stratEvent<- add.indicator(strategy = stratEvent, name =
>> "eventIndicators",
>> arguments = list(price = quote(getPrice(mktdata))))
>>
>> I then add rules for entry and exit based on the event column being true:
>>
>> stratEvent<- add.rule(stratEvent, name='ruleSignal', arguments =
>> list(sigcol="MEm1"),sigval=TRUE, orderqty=100, ordertype= 'market',
>> orderside=NULL, threshold=NULL),type='enter')
>>
>> I would like to have this strategy applied to a futures contract based on
>> a
>> specified rolling convention (e.g. if<  2 days before first notice of
>> delivery, trade the 2nd contract, otherwise trade the 1st e.g. TY2 Comdty
>> versus TY1 Comdty).
>>
>> I would like to apply this strategy to 1 portfolio covering multiple
>> decades
>> of data of closing price data with the whole futures chain.  I'm not sure
>> how to call applyStrategy to get the result I want when the instrument the
>> strategy is trading changes over time.
>>
>
> I would construct a continuous series first, then add an instrument for
> that continuous series to your portfolio, and test your strategy using the
> continuous series information.
>
> Regards,
>
>  - Brian
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: <773-459-4973>773-459-4973
> IM: bgpbraverock
>
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>

	[[alternative HTML version deleted]]

