R Help with SP/EP futures timeseries

  • Thread starter Thread starter rnick
  • Start date Start date
Joined
10/4/11
Messages
77
Points
18
hi all,

I am trying to write some code to download from bloomberg and automatically create a time series of future prices which automatically are rolled over. i am using the following packages:

rbloomberg, to download the different series from bloomberg
TimeWarp, to find the 8th day before the expiration

with this 2, it is very easy to treat the data in excel (through a pivot table with all the different contracts in columns and the timeseries is created by offsetting the column by one at every roll over day). I was wondering is anyone has written some code in R on how to perform the above calculation, using any other packages or any other guidance.

thanks in advance,
 
you can try to use "SPA Index". I don't know how bloomberg does the rollover but it will bring you the whole time series into R. No need to do rollover manually.

What's EP for you? the E-mini? then try "ESA Index"
 
Hi alain. Thanks a lot for the reply. you are right i was talking about the E-mini contracts, did not notice i mistyped it.

tried the SPA and ESA index however i get limited data availability up to 2 years. as it seems i would need to write the function. if you have any idea what kind of functions would be the optimal to use, i would appreciate if you could let me know.
 
Back
Top Bottom