Saturday, October 31, 2009
Blog is Moving
I have moved this blog to tr8dr.wordpress.com as blogger seems to have been left to rot by google (ie too many things are broken and do not work properly).
Friday, October 30, 2009
Intraday volatility prediction and estimation
GARCH has been shown to be a reasonable estimator of variance for daily or longer period returns. Some have adapted GARCH to use intraday returns to improve daily returns. GARCH does very poorly in estimating intra-day variance, however.
The GARCH model is based on the empirical observation that there is strong autocorrelation in the square of returns for lower frequencies (such as daily). This can be easily seen by observing clustering and "smooth-ish" decay of squared returns on main daily series.
Intra-day squared returns, however, have many jumps, with little in the way of autocorrelated decay pattern. Here is a sample of squared returns for EUR/USD. There are many spikes followed by immediate drops in return (as opposed to smoother decay). There does appear to be a longer-term pattern, though, allowing for a model.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwuj7svA5e_Ux-O-VgE7X-hsu-y6i95r5nlAoqBsDBc9EAhSsNr0LUjVC2B_gGGrAEOD3m2uumVQlQhOmzjI84HT-GpkWRF4UX1S5zej7r_HbXcj6TWeU2v7fu9Ds4M9LBYCrh9MXVzTfS/s400/Picture+1.png)
With expanded processing power and general access to tick data, research has begun to focus on intra-day variance estimation. In particular, expressing variance in terms of price duration has become an emergent theme. Andersen, Dobrev, and Schaumburg are among a growing community developing this in a new direction.
At this point have disqualified GARCH as a useful measure for my work, but am investigating a formulation of a duration based measure.
The GARCH model is based on the empirical observation that there is strong autocorrelation in the square of returns for lower frequencies (such as daily). This can be easily seen by observing clustering and "smooth-ish" decay of squared returns on main daily series.
Intra-day squared returns, however, have many jumps, with little in the way of autocorrelated decay pattern. Here is a sample of squared returns for EUR/USD. There are many spikes followed by immediate drops in return (as opposed to smoother decay). There does appear to be a longer-term pattern, though, allowing for a model.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwuj7svA5e_Ux-O-VgE7X-hsu-y6i95r5nlAoqBsDBc9EAhSsNr0LUjVC2B_gGGrAEOD3m2uumVQlQhOmzjI84HT-GpkWRF4UX1S5zej7r_HbXcj6TWeU2v7fu9Ds4M9LBYCrh9MXVzTfS/s400/Picture+1.png)
With expanded processing power and general access to tick data, research has begun to focus on intra-day variance estimation. In particular, expressing variance in terms of price duration has become an emergent theme. Andersen, Dobrev, and Schaumburg are among a growing community developing this in a new direction.
At this point have disqualified GARCH as a useful measure for my work, but am investigating a formulation of a duration based measure.
Thursday, October 29, 2009
Hawkes Process & Strategies
Call me unread, but I had not encountered the Hawkes process before today. The Hawkes process is a "point process" modeling event intensity incorporating empirical event occurrence.
The discrete form of the process is:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd315QndkeNgSNPH5aMfmmU4dX9FofddtCWZsf3MWeXBJXQlPbz69rwJWhpARrs6qV62L77-IpciWpZ-US80P8V4bOILWd_LBxWgYOrg3b7DUtT2ixXQ3qpWh2GNIpV0sfi8So3oRkVDAY/s400/Picture+1.png)
where ti is the ith occurrence at time ti < t for some t. The form of the function is typically an exponential, but can be any function that models decay as a counting process:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifYgbZ9EVks9KQ7S3SwbzM_UlEZfBeZkOHx_wlptYeFsIpV6DdE16pUa7DjkzA5rAoIucf04DOxaXeqh7u67OhaPAS1CcMsQZGQgBT9TA102iWcUfkUxTE9JopYpLwAB9BWVeLZH9wDzSm/s400/Picture+2.png)
Ok, that's great but what are the applications in strategies research?
Intra-day Stochastic Volatility Prediction
The recent theme in the literature has been to replace the quadratic-variance approach with a time-based approach. The degree of movement within an interval of time is equivalent in measure to the amount of time required for a given movement, and can be interchanged easily as Andersen, Dobrev, and Schaumburg have shown in "Duration-Based Volatility Estimation".
Cai, Kim, and Leduc in "A model for intraday volatility" approached the problem by combining an Autoregressive Conditional Duration process and a Hawkes process to model decay, showing that:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguKtc5BIwG25xJ5EXYsNS67ZnQBqxi7IqI72D5ZezlTG2Ak0bAlWqZurnufvTEbF7ZaCphc8BuQvtPG6O4w4TQJS3yEG8vGG5JRxVNbEXJGdV0zEsYxoIG0cJn4_73NYfv4nT9iGuJaiBS/s400/Picture+4.png)
and then equivalently expressed in terms of intensity (where N represents the number of events of size dY):
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdFbn6l9M_FFNy4iiSW6igv6ZuSzCwXtvx9GIK1tOJeEA6F1DfoIzAhmnKZPMQ713cC8mV92CoVA5ttFuFRLMr0726b4k6ApPVBdeKQk1Ds7ZgM5JLWpZ1kvHGhslWzPFg8H9OP_VUf2xo/s400/Picture+5.png)
relating back to volatility measure as:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeQJ90TQPmdozcZOe50zTu06eEAZQDyLaIkBHHzxsnY_nVy8gHQtQ_73YQm6uveN3DxHR56XPHKbMuAP5pqPc23kcy7MII_L5L1f0oJBUCLC4rP8-bsQpOl9o5h29NUyU2m795bVTGOw5b/s400/Picture+6.png)
The intensity process is comprised of an ACD part and a Hawkes part:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0Q3r6NcHzmIrbMjw-1xXLQTcZL1TmX9e_RP3_DEPvg-J3_kZocwrLKRechZ_6lv-KMFO7Iw228ls8m60WnUbz-eYQ6xjZh5J4xR_UUD7TxxEQRuDHfTJUd3r4LTVGk9CjI4KqaZi-oG8w/s400/Picture+1.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ-Wp8tVRFaA0WCOSJCQvM593sfWgZmY3sgBvjyPXDuZkE9Xu1OhHwybBn3LwUrguuErtvdYJGp43UP5a_jFqYUzaCnaHTGE6tutvfD82DUyYiS4HftSivCY6t7fRymNBYJYx5rXO5E-HX/s400/Picture+2.png)
They claim to model the intra-day volatility closely and propose a long/short straddle strategy to take advantage of the predictive ability.
High Frequency Order Prediction Strategy
The literature suggests the use of Hawkes processes to model the buying and selling processes of market participants.
John Carlsson in "Modeling Stock Orders Using Hawkes's Self-Exciting Process", suggests a strategy where if the Hawkes predicted ratio of buy/sell intensity exceeds a threshold (say 5) buy (sell) and exit position within N seconds (he used 10).
This plays on the significant autocorrelation (ie non-zero decay time) of the intensity back to the mean. A skewed ratio of buy vs sell orders will surely influence the market in the direction of order skew.
The strategy can be enhanced to include information about volume, trade size, etc. We can also look at the buy/sell intensity of highly correlated assets and use to enhance the signal.
The discrete form of the process is:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd315QndkeNgSNPH5aMfmmU4dX9FofddtCWZsf3MWeXBJXQlPbz69rwJWhpARrs6qV62L77-IpciWpZ-US80P8V4bOILWd_LBxWgYOrg3b7DUtT2ixXQ3qpWh2GNIpV0sfi8So3oRkVDAY/s400/Picture+1.png)
where ti is the ith occurrence at time ti < t for some t. The form of the function is typically an exponential, but can be any function that models decay as a counting process:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifYgbZ9EVks9KQ7S3SwbzM_UlEZfBeZkOHx_wlptYeFsIpV6DdE16pUa7DjkzA5rAoIucf04DOxaXeqh7u67OhaPAS1CcMsQZGQgBT9TA102iWcUfkUxTE9JopYpLwAB9BWVeLZH9wDzSm/s400/Picture+2.png)
Ok, that's great but what are the applications in strategies research?
Intra-day Stochastic Volatility Prediction
The recent theme in the literature has been to replace the quadratic-variance approach with a time-based approach. The degree of movement within an interval of time is equivalent in measure to the amount of time required for a given movement, and can be interchanged easily as Andersen, Dobrev, and Schaumburg have shown in "Duration-Based Volatility Estimation".
Cai, Kim, and Leduc in "A model for intraday volatility" approached the problem by combining an Autoregressive Conditional Duration process and a Hawkes process to model decay, showing that:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguKtc5BIwG25xJ5EXYsNS67ZnQBqxi7IqI72D5ZezlTG2Ak0bAlWqZurnufvTEbF7ZaCphc8BuQvtPG6O4w4TQJS3yEG8vGG5JRxVNbEXJGdV0zEsYxoIG0cJn4_73NYfv4nT9iGuJaiBS/s400/Picture+4.png)
and then equivalently expressed in terms of intensity (where N represents the number of events of size dY):
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdFbn6l9M_FFNy4iiSW6igv6ZuSzCwXtvx9GIK1tOJeEA6F1DfoIzAhmnKZPMQ713cC8mV92CoVA5ttFuFRLMr0726b4k6ApPVBdeKQk1Ds7ZgM5JLWpZ1kvHGhslWzPFg8H9OP_VUf2xo/s400/Picture+5.png)
relating back to volatility measure as:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeQJ90TQPmdozcZOe50zTu06eEAZQDyLaIkBHHzxsnY_nVy8gHQtQ_73YQm6uveN3DxHR56XPHKbMuAP5pqPc23kcy7MII_L5L1f0oJBUCLC4rP8-bsQpOl9o5h29NUyU2m795bVTGOw5b/s400/Picture+6.png)
The intensity process is comprised of an ACD part and a Hawkes part:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0Q3r6NcHzmIrbMjw-1xXLQTcZL1TmX9e_RP3_DEPvg-J3_kZocwrLKRechZ_6lv-KMFO7Iw228ls8m60WnUbz-eYQ6xjZh5J4xR_UUD7TxxEQRuDHfTJUd3r4LTVGk9CjI4KqaZi-oG8w/s400/Picture+1.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ-Wp8tVRFaA0WCOSJCQvM593sfWgZmY3sgBvjyPXDuZkE9Xu1OhHwybBn3LwUrguuErtvdYJGp43UP5a_jFqYUzaCnaHTGE6tutvfD82DUyYiS4HftSivCY6t7fRymNBYJYx5rXO5E-HX/s400/Picture+2.png)
They claim to model the intra-day volatility closely and propose a long/short straddle strategy to take advantage of the predictive ability.
High Frequency Order Prediction Strategy
The literature suggests the use of Hawkes processes to model the buying and selling processes of market participants.
John Carlsson in "Modeling Stock Orders Using Hawkes's Self-Exciting Process", suggests a strategy where if the Hawkes predicted ratio of buy/sell intensity exceeds a threshold (say 5) buy (sell) and exit position within N seconds (he used 10).
This plays on the significant autocorrelation (ie non-zero decay time) of the intensity back to the mean. A skewed ratio of buy vs sell orders will surely influence the market in the direction of order skew.
The strategy can be enhanced to include information about volume, trade size, etc. We can also look at the buy/sell intensity of highly correlated assets and use to enhance the signal.
Labels:
point processes,
statistics,
strategies,
volatility
Wednesday, October 7, 2009
What multivariate approaches can tell us
I've focused on "univariate" strategies in the high frequency space for the last few years. Recently I did some work on medium/long term strategies for the Canadian market. In the course of investigation realized that I've been ignoring information by just focusing on signals using a single asset and not looking at related assets to provide additional signal.
Of course it has always been in the back of my mind to diversify into strategies of more than one asset. But even if one intends to trade single securities, the information that other related assets or indicators can provide gives us an edge. In particular I need to be looking at:
Of course it has always been in the back of my mind to diversify into strategies of more than one asset. But even if one intends to trade single securities, the information that other related assets or indicators can provide gives us an edge. In particular I need to be looking at:
- Multivariate SDEs with jointly distributed series
In the simplest case this is expressed in covariance, but covariance is just one of the moments of relationships. - Economic signals (well for medium / long term)
- Cointegration relationships
Not only linear relationships but quadratic. These need to be tested carefully in and out of sample
Wednesday, September 30, 2009
Determining whether a movement is mean reverting
What characteristics would positive or negative momentum have to indicate that this is not movement to a new level, but ultimately a mean reverting cycle (in the short term)? Ultimately would like to come up with a view on the likely duration of the cycle (how strong and how long).
I have not fully studied this, but would look at the following:
I have not fully studied this, but would look at the following:
- volume in the buying or selling relative to historical for the time period as well as recent
- lack or presence of news event
- speed of ascent / descent (how do we distinguish period aggressive execution from sustained)
- changes in complexion of order book
Wednesday, September 23, 2009
Cointegration "Machine"
I've done some interesting cointegration work for canadian securities. We should have worked out a basket trading strategy shortly.
I was thinking about the equity and FX markets and the vast number of total securities one might investigate. We can test for stable cointegration and mean-reversion style trading in a systematic manner. Why not create a "machine" to test the many combinations for viable trading strategies.
Of course we will need market data for a large number of securities to pull this off ...
I was thinking about the equity and FX markets and the vast number of total securities one might investigate. We can test for stable cointegration and mean-reversion style trading in a systematic manner. Why not create a "machine" to test the many combinations for viable trading strategies.
Of course we will need market data for a large number of securities to pull this off ...
Thursday, September 17, 2009
Momentum strong indicator in daily returns
On the side have been working with someone who is looking for long term strategies in the fixed income space. My strategies focus on intra-day trading primarily, but have found the start of a number of very attractive longer term (low frequency) strategies.
In particular, we are building a multi-factor model to predict market movements for Canadian bonds. Alternatively, we are also looking at cointegration models that would be implemented as long/short baskets of securities.
Sometimes the simplest ideas work best. I decided to look at a function of momentum over a period as a predictor of return over the following period. Did not expect to have such strong results. Here is the average return predicted by momentums at various standard deviations from parity:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjShCDxT8E4jMv632goNxxY38yzoBKxyyCjbkgnExzTZ7xJ6PDTEkK1boBUuihaJ1IN1H1ZLSp6_3Ufl5I7gDGnQlcbuGA4PHEYPxErFTgNM0RVZK8hrN_7_vRxS9bhCrkaZSaGj7AEEbWL/s400/Picture+1.png)
An alternate graph of this showing standard deviation bands for returns against momentum levels:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTr4Y8BFGWfX5-Hh8hYHJawkeoDiA-bnFwgQ8WIxGhcAZuqY4IujAbq-UZyV0N54TLv2p7Lt_WBgISwVd0M9qw7vdFSjsmznfnGd5rPXbSyvlFMRtE1xn8DkUEdg8xgkaw1GE3KA-5_SmK/s400/return.gif)
There is certainly more work to be done to understand maximum drawdown and optimal money management.
Next Steps
Beyond momentum, we are also looking at building a continuous economic index (much like the Aruoba-Diebold-Scotto Business Conditions Index). This provides a continuous forecast of economic variables based on a stochastic state space model. Will discuss further in the next post.
In particular, we are building a multi-factor model to predict market movements for Canadian bonds. Alternatively, we are also looking at cointegration models that would be implemented as long/short baskets of securities.
Sometimes the simplest ideas work best. I decided to look at a function of momentum over a period as a predictor of return over the following period. Did not expect to have such strong results. Here is the average return predicted by momentums at various standard deviations from parity:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjShCDxT8E4jMv632goNxxY38yzoBKxyyCjbkgnExzTZ7xJ6PDTEkK1boBUuihaJ1IN1H1ZLSp6_3Ufl5I7gDGnQlcbuGA4PHEYPxErFTgNM0RVZK8hrN_7_vRxS9bhCrkaZSaGj7AEEbWL/s400/Picture+1.png)
An alternate graph of this showing standard deviation bands for returns against momentum levels:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTr4Y8BFGWfX5-Hh8hYHJawkeoDiA-bnFwgQ8WIxGhcAZuqY4IujAbq-UZyV0N54TLv2p7Lt_WBgISwVd0M9qw7vdFSjsmznfnGd5rPXbSyvlFMRtE1xn8DkUEdg8xgkaw1GE3KA-5_SmK/s400/return.gif)
There is certainly more work to be done to understand maximum drawdown and optimal money management.
Next Steps
Beyond momentum, we are also looking at building a continuous economic index (much like the Aruoba-Diebold-Scotto Business Conditions Index). This provides a continuous forecast of economic variables based on a stochastic state space model. Will discuss further in the next post.
Subscribe to:
Posts (Atom)