R/functions.r
BBG_futures_aggregate.Rd
Provided with a set of futures active contract Bloomberg tickers and a time period, queries Bloomberg for the corresponding futures historical aggregate data. For each individual field, futures aggregate data represents the aggregation of the corresponding field values over all the corresponding term structure contracts.
BBG_futures_aggregate(active_contract_tickers, start, end, verbose, ...)
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. |
... | optional parameters to pass to the bdh function from the
Rblpapi package used
for the query ( |
An S4 object of class FuturesAggregate.
"GFUT <GO>" on a Bloomberg terminal.
The rolls dataset in the
BBGsymbols package
(finRes suite) for details
regarding the roll_type
& roll_adjustment
parameters.
The fields dataset in the BBGsymbols package for details on the Bloomnerg fields used here.
if (FALSE) { BBG_futures_market(type = "aggregate", active_contract_tickers = c("W A Comdty", "KWA Comdty"), start = "2000-01-01", end = as.character(Sys.Date())) }