[R] using zoo for daily stock prices
Alfonso Sammassimo
cincinattikid at bigpond.com
Sun Dec 10 13:06:53 CET 2006
Hi all,
Please forgive this newbie posting to the list for the first time if I
haven't followed proper procedure. I have read through many of the archives
and find them most useful in learning R.
I have ten years daily data (stock closing prices) which I read in zoo
format. I am having problems coding R to run a count of how many days in
each month have a price higher than the first day of that month. I then wish
to compare counts for all months. Along these lines, is there a simple way
to index to certain dates(eg first of month, last of month, any specific
date in one month) and keep looping over each month using such a reference
point, and then assessing the results for each month?
Any guidance would be sincerely appreciated,
Alfonso Sammassimo
Melbourne, Australia.
More information about the R-help
mailing list