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.

link|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 at 15:22
feedback

2 Answers

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

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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