eggman2001
New Member
- Joined
- Jun 18, 2011
- Messages
- 6
I'm just beginning to learn VBA (have experience with Ruby and PHP) and I'm wondering how you would go about doing the following:
I have paired data in 2 columns - daily historical stock data with the date in column A and the closing value in column B, and assume I have 10 years worth of data. I'd like to figure out
a) what is the average close price for the earliest day of each month over a given date range. The earliest day of each month obviously isn't necessarily the 1st or the 2nd or 3rd of the month since there would be no data for days that are weekends or national holidays.
b) what is the average close price for the the earliest day of each month and the earliest day after the 15th of each month (collectively and not separately) given a date range.
I assume that this is something that is the kind of thing that Excel and VBA can do fairly easily, as that's why I'm learning it, but haven't quite gotten that far yet in the book I'm reading.
I appreciate any help with this. Also, if there is some good documentation for doing these kinds of operations, I'd be much obliged.
I have paired data in 2 columns - daily historical stock data with the date in column A and the closing value in column B, and assume I have 10 years worth of data. I'd like to figure out
a) what is the average close price for the earliest day of each month over a given date range. The earliest day of each month obviously isn't necessarily the 1st or the 2nd or 3rd of the month since there would be no data for days that are weekends or national holidays.
b) what is the average close price for the the earliest day of each month and the earliest day after the 15th of each month (collectively and not separately) given a date range.
I assume that this is something that is the kind of thing that Excel and VBA can do fairly easily, as that's why I'm learning it, but haven't quite gotten that far yet in the book I'm reading.
I appreciate any help with this. Also, if there is some good documentation for doing these kinds of operations, I'd be much obliged.