Skip to content
Prev 8077 / 15274 Next

Align 5 minute bars

Good suggestion.  Exactly what I want.

However, in another message you suggested using aggregate or apply to generate my summary statistics.  I would need to do that before using to.period.  But, I want the summary states per-period.  (For example - number of transactions, number of up-ticks, etc.) 

The only way I can see to do this is the "long way".

1) Determine the endpoints of each bar, but don't convert to.period yet
2) Loop through each bar and generate the statistics from the transactions in that bar
3) Create a new data structure to hold the bar summaries

There must be a cleaner way.  Ideas?

--
Noah Silverman
UCLA Department of Statistics
8117 Math Sciences Building
Los Angeles, CA 90095
On Jun 16, 2011, at 4:19 PM, Brian G. Peterson wrote: