Tell me more ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

Whats the most efficient way to re-resolve stock data? I have 10m data in a database that I am using for 3-5day trading purposes (e.g a 5 day chart). Now for a 1 month chart, I am multiplying 10 by 4 so I need 40minute resolution.

2 Questions I have about this:

  1. Is a 10m for 5 day chart trading (technical analysis) good? Is 40m for 1 month charts good? These were the values I generally found looking at online charts, etc
  2. Is there a easy way to re-resolve 10m data into 40m data? and What is the proper way to do it? How do you re-resolve volume?

Currently my plans are to write an algorithm to iterate through every 4 datapoints and calculate the running totals. The 40m open would be the open d1 (datapoint one), close would be close of d4, high would be the highest high of d1-d4, and low would be the lowest low of d1-d4. I have no idea how to re-resolve volume.

Would I be better off getting the data in 40m intervals as well. I think all the iteration of the stocks (monitoring 100 different stocks) might turn out to be to memory/process intensive.

share|improve this question
2  
Hi NoviceCoding, I'm not sure you get what this site is really about. Your last two questions were closed and heavily down-voted, and this question is marginal at best. Vague and subjective questions (i.e. is X good?), like your 1st q, are not acceptable here. Your 2nd q is confusing, I have never heard the term "re-resolve data", and it smells of something not really done by quants, but more by chartists, or more precisely, chart software writers. – Tal Fishman Feb 7 '12 at 15:22
I'm closing this since it's been around forever with no attempt to improve. – chrisaycock Jan 29 at 18:22

closed as off topic by chrisaycock Jan 29 at 18:22

Questions on Quantitative Finance Stack Exchange are expected to relate to quantitative finance within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

2 Answers

Quantmod has some nice functionality regarding aggregation of OHLC data, but I believe aggregation to 40 minute bars is not available out of the box. See here for details: http://www.quantmod.com/examples/data/#aggregate

Of course you can aggregate manually, just as you describe. Aggregating volume is easy: just take the sum of your 4 datapoints.

share|improve this answer

I'm not sure, but the R xts package might provide the functionality you are looking for.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.