I've been wondering what is the standard method for determining and open and close price for a time interval?
Here's two methods I've been investigating:
1. Interpolate around both start and stop points to get estimated price at exact time intervals.
2. Take first and last trades inside the time interval as open and close
The first method can be slower because you need to bracket the intervals and sometimes trading can be slow so it takes a while to determine the close price. However this seems like a more realistic way to estimate the end point of the price during that time interval.
The second just shifts trade values in time (which is faster) to estimate the open and close. The problem here (and I've seen this on some internet charting tools) is that the intervals might not match up between close and open of the next interval.