futureseries-methods: Function for Futures Data Extraction

Description Usage Arguments Value Methods Examples

Description

Extracts futures data from the CSI UA database subject to a valid specification of the type of contract desired.

Usage

1
futureseries(symbol, spec, start.date = -1, end.date = -1, freq = c("d", "w", "m", "q", "y"), fut.control = NULL)

Arguments

symbol

(character) A valid asset symbol.

spec

A valid specification created by calling one of the 5 available specification methods.

start.date

(integer) Either -1 for all available (depends on you subscription) else an integer in the form of YYYYMMDD (a function will check various permutations of this and try to understand other formats but there is no guarantee).

end.date

(integer) Either -1 for last available date else an integer in the form of YYYYMMDD (a function will check various permutations of this and try to understand other formats but there is no guarantee).

freq

(character) Data aggregation frequency, method for which may be supplied in the fut.control options.

fut.control

(list) Either NULL (default control parameters) or a list created by calling the function futcontrol which controls various options for how futures data is handled.

Value

Returns an object of class uaFutureSeries.

Methods

symbol = "ANY", spec = "ANY"

There is no default spec, you must create one from the options below.

symbol = "ANY", spec = "uaBackAdjSpec"

A BackAdjusted Contract Specification.

symbol = "ANY", spec = "uaContractSpec"

A Single Contract Specification.

symbol = "ANY", spec = "uaGannSpec"

A Gann Contract Specification.

symbol = "ANY", spec = "uaNthNearestSpec"

An Nth Nearest Contract Specification.

symbol = "ANY", spec = "uaPerpetualSpec"

A CSI Perpetual Contract Specification.

Examples

1
2
3
4
5
6
# startUA()
# spec = perpetualspec()
# dat = futureseries("C", spec, freq = "d")
# has show and data.frame methods
# show(dat)
# tail(as.data.frame(dat), 10)

RCSI documentation built on May 2, 2019, 4:50 p.m.