Skip to content

Futures data

7 messages · Robert A'gata, G See, Chinmay Patil

#
If you just want daily data, there is a script in the parser directory
of FinancialInstrument
(http://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/FinancialInstrument/inst/parser/download.tblox.R?root=blotter)
that will download free data since 1995 from tradingblox.

Try this,

library(FinancialInstrument)
source(paste0("http://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/",
             "FinancialInstrument/inst/parser/download.tblox.R?root=blotter"))
define_futures.tblox() # define meta data for available futures -- not
required to get data

buildHierarchy(ls_futures(), "description") # show the descriptions of
available futures

find.instrument("Eurodollar")
getInstrument("ED")

# this getSymbols.tblox method will download all data from tblox, but will only
# assign the symbols you give it.
getSymbols("ED", src='tblox')
tail(ED)

# this will download all tblox futures data and assign in your globalenv()
get_tblox()

tail(TY)
head(CL)

HTH,
Garrett
On Sat, Dec 15, 2012 at 9:39 PM, Robert A'gata <rhelpacc at gmail.com> wrote:
#
Also, for daily VIX futures data, there's a getSymbols.cfe method in
my qmao package on R-Forge

# install.packages("qmao", repos="http://r-forge.r-project.org")
library(qmao)
getSymbols("VX", src='cfe', Months=1:12, Years=2011:2012)

Garrett
On Sat, Dec 15, 2012 at 10:03 PM, G See <gsee000 at gmail.com> wrote:
#
Chinmay,

The trading blox data has a column called Unadjusted close.  The user
is free to use that column.  Also, it is trivial to un-adjust the
Open, High, and Low as well.  And, there is a column showing which
contract is being used for each row which makes it trivial to
re-adjust prices however you see fit, or not at all.

Garrett
On Sat, Dec 15, 2012 at 10:13 PM, Chinmay Patil <chinmay.patil at gmail.com> wrote:
#
Robert,

If you have an Interactive Brokers account -- which isn't free, but
pretty close to it -- you can get a year's worth of intraday data for
most futures with the IBrokers package (on CRAN).  See
?reqHistoricalData.  I also have some wrappers for IBrokers functions
for getting lots of data from Interactive Brokers in my twsInstrument
package on R-Forge. https://r-forge.r-project.org/R/?group_id=1113
(see ?reqTBBOhistory)

IB offers 1 second bars, but if you want to get a meaningful amount of
history, you're best off getting 1 minute bars because of their
historical data request pacing rules.

HTH,
Garrett
On Sat, Dec 15, 2012 at 9:39 PM, Robert A'gata <rhelpacc at gmail.com> wrote: