[R-SIG-Finance] Generating a front month only Time Series for Futures Prices

G See gsee000 at gmail.com
Thu May 3 21:28:55 CEST 2012


Gussinsky,

Since you are looking to test for cointegration, and you say you're
looking at energy products (which have liquidity in more than just the
front contract), I'd suggest creating a constant maturity future (CMF)
that is the interpolated price between the 2 lead contracts (see Carol
Alexander's stuff for more info).  CMFs don't require any back
adjusting, they just require that you partially roll your position
every day.

HTH,
Garrett

On Thu, May 3, 2012 at 2:02 PM, BBands <bbands at gmail.com> wrote:
> Beware, this is a mine field! For example, one problem you will need
> to deal with is that different commodities roll on different dates.
> Then there is the nightmare quagmire of back adjusting, which is best
> skipped altogether in my opinion. In short, there are many ways to get
> hurt here. There is a large literature on the topic, starting with W.
> D. Gann 80+ years ago. The writings of Bob Pelletier of CSI are a good
> trail-head.
>
>    John
>
> On Thu, May 3, 2012 at 11:44 AM, gussinsky <sduve at hotmail.com> wrote:
>> Hello All,
>>
>> I am struggeling to find a method which would enable me to generate a
>> historical time series which only contains a commodities front month price,
>> and after expiry automatically rolls over to the next month.
>>
>> I suspect one has to code the roll over rule from the respective exchange
>> into a function, and supply the function with the respective expired
>> historical data.
>>
>> My aim is to backtest those data for delta 1 strategies, but also for
>> cointegration. One example would be heating oil futures vs. gasoil futures.
>
> _______________________________________________
> R-SIG-Finance at 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.



More information about the R-SIG-Finance mailing list