get the last tradingday. If datelist is tradingday, return trday.nearby(by=-1), else, return trday.nearest(dir=-1)
1 | trday.last(datelist, stockID = NULL, TS, drop = FALSE)
|
1 2 3 4 5 6 7 8 9 | (datelist <- seq(from=as.Date("2013-01-21"),to=as.Date("2013-01-30"),by="day"))
trday.is(datelist)
# -- compare the following three output:
trday.last(datelist)
trday.nearest(datelist,dir=-1)
trday.nearby(datelist,by=-1)
# -- return TS
stockID=c("EQ000527","EQ000001")
trday.last(datelist = datelist,stockID=stockID)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.