Simulating volatility

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
babelproofreader
Roundtable Knight
Roundtable Knight
Posts: 138
Joined: Wed Nov 10, 2004 4:36 pm

Simulating volatility

Post by babelproofreader »

For the purpose of creating synthetic price series, can anyone suggest algorithms that replicate the volatility clustering that real price series display?
sluggo
Roundtable Knight
Roundtable Knight
Posts: 2987
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo »

Why not simply duplicate it? Extract the behavior from real market prices and store it in a big data repository. Then when generating phony-baloney synthetic prices, choose a random start-date and a random end-date, pull that segment of "extracted volatility clustering behavior" out of the repository, and apply it to synthetic prices. Voila, your synthetic prices now have literally the same volatility clustering behavior as real prices, guaranteed by construction.

It's probably worthwhile to study real prices first, and discover a value of "segment length" which captures the behavior you're interested in. Maybe the volatility clustering that interests you, is found to occur over a span of fifteen days. Then you'll probably want to make sure that your random start-date and random end-date are at least twenty or thirty days apart, to have a fair chance of encompassing a full begin-middle-end of one of these behaviors.

Synthetic prices were discussed on this site before; some links are below. One of the postings said
Don't forget correlation.

Many people trade a portfolio of instruments and hold several positions simultaneously. These traders are interested in the movements of the individual markets AND in the correlation of movements between markets; as for example when all the world's stock indices spiked down together, in perfect correlation, on 27 Feb 2007. The Nikkei, the CAC, the Canadian S&P 60, the DAX, the Nasdaq, the EuroSTOXX, the SPI-200, and dozens more: all into the toilet, all at once.

Perhaps you wish to create synthetic price series for the markets you trade based on the historical JOINT distribution of daily returns?


viewtopic.php?t=2220

viewtopic.php?t=1670

viewtopic.php?p=22270&highlight=synthetic+data#22270

Discovering a "segment length" that captures the behavior of interest, was discussed before, in the context of finding the "segment length" that spans autocorrelation clusters in a trading system's equity curve. This eventually got built into Trading Blox's Monte Carlo capabilities.

viewtopic.php?p=22068&highlight=aaft#22068
babelproofreader
Roundtable Knight
Roundtable Knight
Posts: 138
Joined: Wed Nov 10, 2004 4:36 pm

Post by babelproofreader »

Sluggo, an interesting suggestion and links, but I actually do want an algorithm that randomly generates volatility clustering rather than recreating the clustering that has historically occured, although I would like the random clustering to have similar statistical properties to real prices. My intent is to use the algorithm in a Monte Carlo simulation to generate a distribution to represent the null hypothesis distribution in hypothesis testing.
Paul King
Roundtable Knight
Roundtable Knight
Posts: 207
Joined: Mon Feb 23, 2004 9:13 am
Location: Vermont, USA
Contact:

Post by Paul King »

I while ago (back in 2006) I started to write a short eBook called "The Stochastic Price Change Model" which is a model of price behavior that uses volatility, volatility of volatility, gap probability, and market emotion (normal, apathy, main, panic) as inputs.

If you PM me an email address I can send you some details - although I never finished the eBook and only wrote TS code, not TBB code for it.

My research showed that it is pretty easy to create a model that generates very "realistic" looking data streams.

Alternatively you could simply randomly sample % changes from real data with a variable "chunk" size. This is also relatively simple to do in Excel and generate an unlimited number of synthetic TBB data files that exhibit identical frequency distribution of % changes to actual data. I have done this to test the robustness of my basic trading program framework and observed that I get similar results regardless what market or set of data or time frame I use.

Hope this helps

Paul
jasonz
Full Member
Full Member
Posts: 10
Joined: Sat Apr 14, 2007 10:37 am

Re: Simulating volatility

Post by jasonz »

babelproofreader wrote:For the purpose of creating synthetic price series, can anyone suggest algorithms that replicate the volatility clustering that real price series display?
I picked up and flicked through Mandelbrot's book on the markets today at lunchtime.

GARCH is a generalised model for generating clustered and time-varying volatility that would be my first point of call. I would point you in that direction.

Mandelbrot also mentioned that Morgan Stanley price their options book at the end of the day against their "variance gamma" model. A quick google of the keywords //morgan stanley variance gamma// brought up some daunting quant papers describing their partial integro-differential equation approach!

What is of interest is the variance gamma model of asset price movement (has a page on wikipedia out of interest), but having a quick look at it I'm not sure how you'd model it in TradingBlox, but it might be something else to look at and consider.

Mandelbrot's book on the markets looks like it might be an interesting read, but more layman level and polemic (about how "random" is not gaussian) rather than anything serious at all.
Post Reply