s-news
[Top] [All Lists]

creat hourly time sequence without NYSE holidays, weekends

To: s-news@wubios.wustl.edu
Subject: creat hourly time sequence without NYSE holidays, weekends
From: "Michael Sun" <mam3xs@gmail.com>
Date: Wed, 27 Aug 2008 17:15:48 +0100
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=gUfrKeZHZobiWvNyUu4YhWrax74BQv7xE6dJEflJ5vs=; b=xMxHfZ4WCndsUBQNjgRDWZC2SxJY+/lhkfNVks2gkDph/p22knfREG1AT2lwLp8MKz 9nVD/qa1SpHPtP5JDtAwf5/9/F404peJr5idmpCEHD58quwciKrwLvJlsQJ27sN6fl3v qBf2fdflGWLO8QZnWnz4y4XFzJ/3P8yuAMul8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=hn6sFXYhmQ3dS57g3YK1p2ptTKYe902clhZPqwrFMioOPnoext9DZrOwvtE4031bi2 5GGzy3HaeHBU4pqQruAbYH3YflSKFMR2WEEMJERWKVqBhVzqDT2leDIMWCuZo2ubeGRR If6kclVDnw7kpvyvsnqiMM3xDORKP4crIG70k=
Hi,
I am wondering how to creat a hourly time sequence for the trading hours, let's say 9am - 4pm, in a year
command line
d1 <- timeSeq(from="1/3/2007", to="12/31/2007", by="bizdays", holidays=holiday.NYSE(2007))
gives all the trading days in 2007

I understand that timeCalendar could give hourly interval, but how could I exclude the holidays and weekends?
e.g.
d2 <- timeCalendar(h=rep(9:16, 1), d=rep(1:31, each=8),  y=2007, format="%a %b %d, %Y %02I:%02M:%p")
this gives everyday in Jan 2007

I was also wondering can I simply use d=d1????

I use S-PLUS 8.0 for Windows.

Appreciate for any comments

Best regards,
Mc

<Prev in Thread] Current Thread [Next in Thread>