# How to create a Stochastic Process through pre specified points?

I want to create a random (quasi random) process which goes through pre determined points and constraints. E.g. I have a daily price series but want to generate intra-day prices with the same OHLC properties.

Also I am exploring the possibility to control of the moments (mean, variance, skew, kurtosis, ...) of the process also.

Main problem here is I have low frequency data (daily) from which I want to construct high frequency data, going though all the lower frequency sampling points.

-
 You should give more details to the purpose of the operation. – SRKX♦ Dec 11 '11 at 17:00 To generate a higher frequency set of test data. – Suminda Sirinath Salpitikorala Dec 11 '11 at 17:02 Then, you shouldn't do it. Think about it. – SRKX♦ Dec 11 '11 at 17:12 This will be better for additional simulated back-tests. Historic data per ticker is any way one series only. – Suminda Sirinath Salpitikorala Dec 11 '11 at 17:24 Agreed with SRKX. This is just as bad as your random but correlated request. Backtesting against fake data will only produce useless conclusions. If you truly are a quant trader, then spend the money for proper historical data. Because what you're asking for makes it sound like you don't do this for a living. And if you aren't a professional quant (or in a related academic field), then this isn't the forum for you. Please read the revised FAQ. – chrisaycock♦ Dec 11 '11 at 17:30

I have low frequency data (daily) from which I want to construct high frequency data, going though all the lower frequency sampling points.

Bad idea in my opinion. I don't really know why you really want to do this (what's are you going to do with the generated data). If it's for backtesting purposes, it's a really bad idea as there are so many mechanisms that occur at HF, it wouldn't be realistic.

Back to your question on "constrained" Stochastic Process. Mathematically, the question is as follows:

Let the $\text{OLHC} = \{o,l,h,c\}$ be the open-low-high-close over a period $\Delta t$.

You would have to create a process $X$ which represents the increment of a process $Y$ such that $Y_{t+\Delta t}=X_{\Delta t}+Y_t$ with

$X_0=0$

$X_{\Delta t}=c-Y_t=Y_{t+1}-Y_t$

$\max_{s \in \left[0;\Delta t\right]}(X_s)=h-Y_t$

$\min_{s \in \left[0;\Delta t\right]}(X_s)=l-Y_t$

And this is quite complicated to do. I believe you wouldn't be able to use a "straightforward" process.

The biggest task would be to make sure that $X$ hits the high and low. To do so, you could try and "split" $X$ in 3 phases represented by 3 processes.

The first has to go and hit the high, the second has to go and hit the low, and the final one has to reach the close.

You could try and play around with these processes (inverting the two first ones to randomize a bit more).

An idea has been provided in answer (that was then deleted) for a model for each of these three processes: a Brownian Bridge.You can look at the general case at the bottom of the article, it suits your needs.

But again, I don't think it's a really good idea to do so.

-
If you think this is not a good way, I would like to know how you would go about it. For this purpose posted another question to get answers on this. I would appreciate if you can leave and answer. Thanks again for taking the time to answer this question. – Suminda Sirinath Salpitikorala Dec 12 '11 at 10:51
@SumindaSirinathSalpitikorala :If you're satisfied with the answer (of this and your other questions) please mark them as accepted. – SRKX Dec 12 '11 at 11:02

I think a simple solution is to try to construct a Brownian motion $W_t$ through known points (e.g., $W_0 = W_1 = 0$); it is also known as a Brownian Bridge [ http://en.wikipedia.org/wiki/Brownian_bridge ].

Since the OP wanted to "generate intra-day prices with the same OHLC properties", maybe one way to account for the high-of-the-day (HOD) is to note the time of the actual HOD, and add an additional fixed point to the Brownian bridge. Specifically, if the process is $X_t$, and let $X_{t_O} = x_O$, $X_{t_H} = x_H$, $X_{t_C} = x_C$, and $t_O \leq t_H \leq t_C$. Build a Brownian bridge that goes through the three points. We can handle the low-of-the-day similarly. – William S. Wong Nov 6 '12 at 20:33