Serving the Quantitative Finance Community

 
User avatar
yuvalaviel
Topic Author
Posts: 1
Joined: June 10th, 2009, 10:08 am

deseasonalizing by filtering out frequencies

August 24th, 2009, 4:53 pm

Hi all,I'm looking on other trading clocks. There are several methods in the literature for 'de seasonalizing' a price time series. Martenes et al. reviews three methods: Simple averaging, Flexible Fourier Form (Andersen and Bollerslev (97,98)) and P-GARCH (Bollerslev and Ghysels (96)). Bruckner and Nolte (08) review Dacoronga's 'Intrinsic time'. All these methods assume that the observed volatility is composed of unexpected volatility that 'rides' on top of an expected periodic volatility. The task is to identify the periodic volatility, be it weekly or daily. Once the expected part of the volatility is known, one can extract the 'real' unexpected volatility.In a toy model, one could model the expected part as sin(w t) and the unexpected part as z(t), where z(t) is an normally distributed iid variable with zero mean and unit variance. That isThe question is, why not use simple frequency filtering technique, such us FIR, to filter out the periodicity (AKA seasonality)? This is a basic treatment in digital signal processing.I must be missing something.
 
User avatar
Alan
Posts: 2958
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

deseasonalizing by filtering out frequencies

August 24th, 2009, 6:14 pm

The problem may be that the volatility time series is not directly observed. So, first youhave to estimate it before you can filter it. Or, you have to estimate it and filter it simultaneously.
 
User avatar
crmorcom
Posts: 0
Joined: April 9th, 2008, 4:09 pm

deseasonalizing by filtering out frequencies

August 24th, 2009, 6:32 pm

The fact that the seasonalities (in the general sense) are often not quite perfectly periodic would probably kill any chance of using straight-forward frequency filtering: for example, Monday is not every fifth business day because vacations screw things up. Times of year will face similar problems.You'd run into the same issues with times of day: in some cases, the length of the trading day has changed as exchanges change their opening times; time-zone changes (Europe and the US do DST at different times) will affect things; companies' earnings announcement and dividend dates and times are known, but they are not regular.
 
User avatar
aiQUANT
Posts: 0
Joined: June 4th, 2008, 6:20 pm

deseasonalizing by filtering out frequencies

August 25th, 2009, 12:10 pm

Have you heard of something called group delay?
 
User avatar
yuvalaviel
Topic Author
Posts: 1
Joined: June 10th, 2009, 10:08 am

deseasonalizing by filtering out frequencies

August 25th, 2009, 8:02 pm

Alan: The idea is to design the filter according to historical data, and to act upon the estimated volatility (what other option do I have here?).crmorcom: Your answer make sense, though I'm working on Forex. In Forex there are no vacations, maybe twice a year .. aiQuant: Group Delay is a measure of the signal's delay (whatever that mean in FX) as a function of frequency. I don't see how it is related to any of the posts in this thread. Please enlighten us.
 
User avatar
crmorcom
Posts: 0
Joined: April 9th, 2008, 4:09 pm

deseasonalizing by filtering out frequencies

August 25th, 2009, 8:20 pm

Exactly the same issues apply. The FX markets may always be open, but the kind of volatility you expect will be very different depending on what day it is: not much USD/EUR on Christmas Day, for example.Lunchtime in Tokyo will matter more when it is a business day in Japan than when it's not.Lunchtime in London measured in New York time will shift depending on daylight savings.Etc.
 
User avatar
yuvalaviel
Topic Author
Posts: 1
Joined: June 10th, 2009, 10:08 am

deseasonalizing by filtering out frequencies

August 30th, 2009, 11:10 am

crmorcom: I can see two ways to go about this issue.1. Simply ignore the non-business days. They will appear as an additional volatility (low volatility, to be precise), as will millions of other events that affect market volatility.2. Consider the non-business days/vacations/changes in daylight times and put a special marker in the price time series. Now, when computing frequencies, consider these markers as containers for 'no information' (NaNs in Matlab). I think it is doable.
 
User avatar
crmorcom
Posts: 0
Joined: April 9th, 2008, 4:09 pm

deseasonalizing by filtering out frequencies

August 31st, 2009, 1:09 pm

yuvalaviel - yes, you could do either of those things and, to first order, frequency filtering would probably give you some information. I guess my question then would be why would you discard information and use a method that you know is less precise than another?
 
User avatar
yuvalaviel
Topic Author
Posts: 1
Joined: June 10th, 2009, 10:08 am

deseasonalizing by filtering out frequencies

August 31st, 2009, 2:40 pm

I don't see how freq filtering is less precise than any of the other methods.I do see that freq filtering is very well established method that proved itself over and over again in all sorts of applications and fields.In addition, I currently use Dacorogna's 'intrinsic time' method and it has drawbacks that can be fixed by using simple freq. filtering.
 
User avatar
crmorcom
Posts: 0
Joined: April 9th, 2008, 4:09 pm

deseasonalizing by filtering out frequencies

August 31st, 2009, 2:48 pm

Because frequency filtering is only going to work optimally for completely regular patterns. If the periodicity is irregular - as I have explained most financial time-series' periodicity is - frequency filtering will not capture seasonal effects as well as more precise accounting. It's not that frequency filtering won't work at all, it's just that there are better methods which use available data more completely. I'm not claiming that it's not an excellent method in, say, signal-processing. It's just that sound waves don't have lunch, close, or take vacations.Another reason, by the way, to prefer other methods is that, if you use frequency filtering, it's not going to be so clear how this should affect standard errors on any other model coefficients you try to estimate once you have filtered your data.
 
User avatar
yuvalaviel
Topic Author
Posts: 1
Joined: June 10th, 2009, 10:08 am

deseasonalizing by filtering out frequencies

August 31st, 2009, 3:22 pm

First I thought you are right, we cannot work with a-periodic signals, but I'm afraid I'll have to insist:I attached the histogram of the volatility of the hourly eur/usd close price over last half of 2008.It includes lunch brakes, holiday and what not. Its all in there, and you are right - it is not periodic.Still, to the best of my knowledge, it has a frequency content, IOW its power spectrum, that can be filtered out.The power spectrum of the histogram is also attached.Or am I still missing sth?
Attachments
weekly_histogram1.zip
(44.68 KiB) Downloaded 71 times
 
User avatar
crmorcom
Posts: 0
Joined: April 9th, 2008, 4:09 pm

deseasonalizing by filtering out frequencies

August 31st, 2009, 4:38 pm

You can, of course, construct a power spectrum of any signal you wish; and you can then, of course, filter it. If you have a quasi-periodic phenomenon, you may be able to deal with with it approximately. The issue is not whether you can, it is whether you should want to.If a quasi-periodic phenomenon is present and you want to control for its effects, then how will you use a filter? You will filter out frequencies which are "close" to the quasi-period of your effect (and its harmonics). But that causes two problems:1) It will not completely remove the effect you are trying to control because you will almost certainly never hit all the frequencies you need exactly.2) You will smooth out other nearby frequencies that might contain information that you would like to keep.The whole point of filtering is that you lose information. This is statistically inefficient, so undesirable. It could well be biased, too, if you are not extremely careful which is even worse.In theory, given a general process, and if you know the timings of your effect exactly, you could probably construct a filter in frequency-space that would come arbitrarily close to doing what you wanted (I imagine this is almost certainly provable if you impose some regularity conditions) but, if you did, it would be exactly (asymptotically) equivalent to doing it in real space and almost certainly a lot more complex.Simple is good. Math is only good if it simplifies and/or clarifies ideas, or lets you do things more elegantly than you otherwise could (or lets you do them at all). Why use more math than you have to where less math gives cleaner, more accurate and more meaningful results?