futures_ticker: Constructs Bloomberg futures term structure tickers.

Description Usage Arguments Value See Also Examples

View source: R/functions.r

Description

Provided with a futures active contract Bloomberg ticker, a term structure position and a set of roll parameters, constructs the corresponding futures term structure Bloomberg ticker according to Bloomberg construction method.

Usage

1
2
3
4
5
6
7
8
futures_ticker(
  active_contract_ticker = "C A Comdty",
  TS_position = 1L,
  roll_type = "A",
  roll_days = 0L,
  roll_months = 0L,
  roll_adjustment = "N"
)

Arguments

active_contract_ticker

a scalar chatacter vector. Specifies the futures active contract Bloomberg ticker to use for term structure ticker construction.

TS_position

a scalar integer vector. Specifies the term structure position desired.

roll_type

a scalar chatacter vector. Specifies roll type to use for term structure ticker construction. Must be one of 'A', 'B', 'D', 'F', 'N', 'O' or 'R'.

roll_days

a scalar integer vector. Specifies the day the roll should be done. Refers to the day of the month (roll_type = 'F') or the number of days before a reference date (roll_type = 'D', roll_type = 'N', roll_type = 'O', roll_type = 'R'). Works in tandem with 'roll_months' below.

roll_months

a scalar integer vector. Specifies the month the roll should be done. Refers to the number of months before a reference date (roll_type = 'D', roll_type = 'N', roll_type = 'O', roll_type = 'R'). Works in tandem with 'roll_days' above.

roll_adjustment

a scalar chatacter vector. Specifies roll adjustment method to use for term structure ticker construction. Must be one of 'D', 'N', 'R', or 'W'.

Value

A scalar character vector containing the corresponding term structure ticker.

See Also

Examples

1
2
futures_ticker(active_contract_ticker = "C A Comdty", TS_position = 5L,
  roll_type = "A", roll_days = 0L, roll_months = 0L, roll_adjustment = "N")

bautheac/pullit documentation built on June 7, 2021, 12:11 p.m.