[R] number of trading days

From: threshold <r.kozarski_at_gmail.com>
Date: Wed, 21 May 2008 04:44:32 -0700 (PDT)

Hi, I work on the date format: yyyymmdd. I would like to calculate the number of (working or trading) days between two of such specified dates in specific year at US stock exchange OR at least with respect to 252-days year.

What I did so far was the conversion (example): x<-20060213; y<-20060402 # refering to January 13 and April 2, 2006 x1 <- as.Date(as.character(x), "%Y%m%d") y1 <- as.Date(as.character(y), "%Y%m%d") # nuber of calendar days

best regards, robert

View this message in context: http://www.nabble.com/number-of-trading-days-tp17364148p17364148.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 21 May 2008 - 11:54:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 21 May 2008 - 12:30:38 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive