pedquant (version 0.1.3)

md_future: query future market data

Description

md_future query future market prices data. Only Chinese future market has been considered currently.

Usage

md_future(symbol = NULL, source = "sina", freq = "daily",
  date_range = "3y", from = NULL, to = Sys.Date(), print_step = 1L)

Arguments

symbol

symbols of future market data. It is available via function md_future_symbol or its website. Default is NULL.

source

the data source is sina finance (https://finance.sina.com.cn/futuremarket/).

freq

the frequency of NBS indicators, including '5m','15m','30m','60m','daily'. Default is 'daily'.

date_range

date range. Available value includes '1m'-'11m', 'ytd', 'max' and '1y'-'ny'. Default is '3y'.

from

the start date. Default is NULL. If it is NULL, then calculate using date_range and end date.

to

the end date. Default is the current date.

print_step

a non-negative integer, which will print symbol name by each print_step iteration. Default is 1L.

Examples

Run this code
# NOT RUN {
dt1 = md_future(symbol = c('J0', 'RB0', 'M0', 'CF0', 'IH0', 'IF0', 'IC0'))

# interactivly choose symbols
dt2 = md_future()
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab