getQuote_ts: getQuote_ts

Description Usage Arguments Value Author(s) Examples

Description

get Quote series of some stocks in certain period

Usage

1
2
3
getQuote_ts(stocks, begT, endT, variables, Cycle = "cy_day()", Rate = 0,
  RateDay = 0, melt = FALSE, split = if (length(stocks) > splitNbin) TRUE
  else FALSE, splitNbin = 50)

Arguments

stocks

a vector of charactor

begT

an object of class "Date"

endT

an object of class "Date"

variables

a vector of charactor,elements of which could be stockID,stockName,date,price,open,high,low,vol,amount,yclose,sectional_yclose,cjbs,...

Cycle

a charactor string,eg."cy_day()","cy_30m()","cy_month()",...

Rate

a integer,giving the type of rights adjustment, could be one of 0(no adjustment),1(geometric adjustment),2(simple adjustment),3

RateDay

a integer,giving the base date of right adjustment,could be one of 0(the last trading day),-1(the IPO date),or a tinysoft date integer(eg.rdate2ts(as.Date("2010-01-02")))

melt

a logical. If FALSE(default), the style of result is "stockID+date~variable";If TRUE, the quote data will be melted(see the examples for details).

Value

the quote data, a data frame object with cols:stockID,stockName,date(of class POSIXct) and the elements the param variable containing

Author(s)

Ruifei.Yin

Examples

1
2
3
4
5
6
stocks <- c("SZ002001","SZ002002")
begT <- as.Date("2011-01-01")
endT <- as.Date("2011-02-01")
variables <- c("price","open")
qt.asis <- getQuote_ts(stocks,begT,endT,variables)
qt.melt <- getQuote_ts(stocks,begT,endT,variables,melt=TRUE)

QuantAndrew/QDataGet documentation built on May 14, 2019, 7:35 a.m.