if_can_buy: Test if the stock can buy

Description Usage Arguments Details Value Examples

View source: R/if_can_buy.R

Description

Test if the stock can buy or not at business day

Usage

1
if_can_buy(con, wind_code, buz_day, ...)

Arguments

con

a tiny connection

wind_code

vecter of future code list in wind_code format

buz_day

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

full

logi, return only wind_code can buy or total with tibble

delist_adj

logi, True if delist stock canbuy

Details

if the amount equal to 0 or high price equal to low price, the stock regards can't buy that day.

Value

a tibble with stock code and flag that 1 means purchasable and 0 not

Examples

1
2
3
4
## Not run: 
if_can_buy(con, c('600000.SH','000001.SH'), 20110104)

## End(Not run)

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