Skip to content
Prev 8078 / 15274 Next

Align 5 minute bars

On Thu, 2011-06-16 at 19:54 -0700, Noah Silverman wrote:
Sort of the 'long way', I guess.
Here's an approach you might consider a little better.

1. run to.period on the trade prices to create your bars, 
2. assign the bars to a new variable
3. on the original data, period.apply() to generate each column of
summary stats
4. cbind each of these to the bars

You could do this all in one line, but that seems a little silly...