get_price: Get stock price for one day

Description Usage Arguments Value Examples

View source: R/get_price.R

Description

Get stock price for one day

Usage

1
get_price(con, wind_code, beg_dt, end_dt, type, balance, ...)

Arguments

con

a data connection

wind_code

vecter of future code list in wind_code format

beg_dt

int or or char, format like %Y%m%d, test for this day

end_dt

int or or char, format like %Y%m%d, test for this day, default null

type

char, choose price type as close, vwap

balance

logi, if a balance panel or not

Value

if end_date is null a df with stock code and price else a df with stock code and price, trade_dt

Examples

1
2
3
4
## Not run: 
get_price(con, c('600000.SH','000001.SH'), 20110104, type = 'close')

## End(Not run)

cloud-brain/backtest documentation built on Feb. 6, 2020, 11:17 p.m.