An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20121215/2ce0d39a/attachment.pl>
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:
Eurodollar, treasury, S&P500 e-mini, crude oil, natural gas, agricultural
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20121216/7c866ae6/attachment.pl>
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:
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:
Eurodollar, treasury, S&P500 e-mini, crude oil, natural gas, agricultural
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20121216/626d59fd/attachment.pl>
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:
Hi Garret, Although a good solution, I would insist user to be careful with downloading data from TradingBlox. Any futures strategy backtesting especially on higher timeframes like daily and above will be very sensitive to method of construction of continous contract and if user is not aware of how such a continuos contract is created, they may lead themselves to reaching overly optimistic conclusions from that backtesting. TradingBlox data while good (they source the data CSIdata as well) is a continuous contract based on their rolling methodology and may not suite every user. Best Regards, Chinmay Patil On Sun, Dec 16, 2012 at 12:03 PM, G See <gsee000 at gmail.com> wrote:
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:
Eurodollar, treasury, S&P500 e-mini, crude oil, natural gas, agricultural
_______________________________________________ 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.
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:
Hi,
I am wondering if there is any source that one can download futures data
such as Eurodollar, treasury, S&P500 e-mini, crude oil, natural gas,
agricultural, etc? Especially downloading from R. Of course, not bloomberg.
Thank you.
Robert
[[alternative HTML version deleted]]
_______________________________________________ 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.