# How to simulate one-minute bars data from one-day bars?

I need to generate one-minute bars out of one-day bars to test the performance of an algorithm (speed, memory usage, etc).

I don't need them to resemble real data, but they should be consistent with the one-day bars (e.g. the higher price of any of the minute bars for a day is the same as the high price of the one-minute bars, etc.)

Any ideas?

• You're not able to get one-minute bars? Why not simulate one-minute and then construct simulated one-day bars using that information? At least that way it is consistent.
– John
Jan 18 '13 at 19:36
• This question got asked several times and I still do not get why anyone would ask thing. First, it is completely impossible to generate high frequency bars from low frequency bars. Then the randomness introduced in generating such higher frequency bars makes the boundaries imposed by the low frequency bars completely obsolete. Why does one need such boundary condition if one generates purely random data intra-day? Waste of time if you ask me.
– Matt
Jan 19 '13 at 2:19

Perhaps construct a Brownian Bridge between the day's open and close, then scale it according to the day's high and low.

• Thats exactly what I was looking for. Thank you Joshua. Jan 18 '13 at 23:55
• So you dont need open and close to be preserved? Jan 21 '13 at 12:20
• @Quartz: Brownian bridge does preserve start and end - thus open and close. Brownian bridge is a Brownian process conditional on fixed start and end. Check out en.wikipedia.org/wiki/Brownian_bridge and of course one has to ad adapt this setting slightly.
– Ric
Feb 4 '13 at 14:51
• @Richard: of course BB preserves open and close, but if later a scaling is added that will be lost. Feb 5 '13 at 11:32
• @Quartz Yes ... you are right ... I missed the scaling ... one would have to do something more advanced - sorry for my mistake.
– Ric
Feb 5 '13 at 12:52

Regarding Joshua's inspired answer, I'm still not sure how you guarantee that scaling gives you the exact high and low values. I suppose that you could simulate until you get a result that is close enough. But that could be hard when, e.g., Open is near High and far from Low.

An alternative solution is to construct a Brownian Bridge between Open and High, High and Low, and Low and Close with probability p; construct a Brownian Bridge between Open and Low, Low and High, and High and Close with probability (1 - p); and make p a function of where Open falls inside the range and where close falls inside the range.

• Sure. And the devil is in the details: you also need the conditional joint PDF of where Open & Close fall :-) Feb 6 '13 at 10:31