Description Usage Arguments Value See Also Examples
Provided with a set of futures active contract Bloomberg tickers and a time period, queries Bloomberg for the corresponding futures CFTC reports historical data or retrieves it from an existing storethat SQLite database.
1 2 3 4 5 6 7 8 9 |
source |
a scalar character vector. Specifies the data source for the query: "Bloomberg" or "storethat". Defaults to "Bloomberg". |
active_contract_tickers |
a chatacter vector. Specifies the futures active contract Bloomberg tickers to query data for. |
start |
a scalar character vector. Specifies the starting date for the query in the following format: 'yyyy-mm-dd'. |
end |
a scalar character vector. Specifies the end date for the query in the following format: 'yyyy-mm-dd'. |
verbose |
a logical scalar vector. Should progression messages be printed? Defaults to TRUE. |
file |
a scalar chatacter vector. Optional parameter that specifies the target storethat SQLite database file to retrieve data from. |
... |
optional parameters to pass to the bdh function from the
Rblpapi package used
for the query ( |
An S4 object of class FuturesCFTC.
"GFUT <GO>" on a Bloomberg terminal.
The tickers_cftc dataset in the BBGsymbols package (finRes suite) for details on the Bloomnerg position tickers used here.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
BBG_CFTC <- pull_futures_CFTC(source = "Bloomberg",
active_contract_tickers = c("W A Comdty", "KWA Comdty"),
start = "2010-01-01", end = as.character(Sys.Date()))
storethat_CFTC <- pull_futures_CFTC(source = "storethat",
active_contract_tickers = c("W A Comdty", "KWA Comdty"),
start = "2010-01-01", end = as.character(Sys.Date()))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.