Serving the Quantitative Finance Community

 
User avatar
kwtneo
Topic Author
Posts: 1
Joined: September 29th, 2006, 11:56 am

Generating random trades

October 3rd, 2006, 10:32 pm

Ok. Am trying to generate a series of random 'trades' on a time series of index open and closes.What's the best way to do this?i have my random generator picking random sequential periods and then randomly determining if it is a buy/sell or a sell/buy.but because of the constrain in the number of trades required, it's 'forced' to generate shorter time periods of pairs.Eg. A time series from period 1 - 10 and i want to generate 2 random trades.if the first pair that's generated is (B1, S8), the 2 trade will invariably be (B/S 9, S/B 10)Not sure if that's ultimately the best 'random' trade generator. i understand by assigning the number of trades i've already constrained the system. Any thoughts?
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

Generating random trades

October 4th, 2006, 12:32 pm

I wouldn't constrain the system unless you absolutely have to. I'm sure that the constraint will distort the dynamics. Think of it this way, if the trading period were to occur again in an alternative or parallel universe, would it have the identical number and volume of trades?But if you want N trades distributed across a time interval, then set the time of each trade (not the interval between trades) to be drawn from a uniform random variable on that time interval.
Last edited by Traden4Alpha on October 3rd, 2006, 10:00 pm, edited 1 time in total.