# Using Fourier analysis to determine market cycles



## ottg (31 January 2015)

Hi everyone

Has anyone make use of Fourier analysis when evaluating med/long term share cycles?
If so, how successful were they?
How did you use them?

Thanks
ottg


----------



## Faramir (1 February 2015)

Hi ottg

What is Fourier Analysis?

http://en.m.wikipedia.org/wiki/Fourier_analysis

http://whatis.techtarget.com/definition/Fourier-analysis

These links talks about a tri math function. Heat transfer is one example for its application.

Help DeepState, please. This term is well beyond my beginners' mind.

Sorry ottg for not providing a decent answer.


----------



## sydbod (2 February 2015)

ottg said:


> Hi everyone
> 
> Has anyone make use of Fourier analysis when evaluating med/long term share cycles?
> If so, how successful were they?
> ...




Hi ottg,
Fourier analysis is just a mathematical way of breaking down a repetitive waveform into its harmonic components ...... ie: breaking down a repetitive but well defined shaped waveform into a multitude of  sinusoidal waves that are odd and even multiples of the repetition of that original repetitive waveform with various fixed amplitudes. This sort of mathematics is primarily used in the electronics (mainly digital and wireless) areas.
The key wording happens to be  "breaking down a *repetitive waveform* into its harmonic components"
The problem you have is that the stock market does not move in a well defined and repetitive manner. This is why you can not use "Fourier analysis" on it.  And ... in passing thought, if the market did move in repetitive well defined manner, then one could just trade based on the primary waveform ..... there would be no benefit to using Fourier analysis on it.

Hope that helps.


----------



## ottg (2 February 2015)

Thanks for all the feedback. My reasoning for FFT interest are as follows:

The stock market consists of noise that are based on different perceptions, moods and believes from different groups/types of investors. The noise across different stock markets and stocks may also be different however in the finer analysis there may be similarities of investment patterns for one stock in one market segment within one industry within one stock exchange. This results in well documented share price periodicity and calender effects. Share price periodicity refers to the rise and fall of share prices at regular intervals. These intervals or periods can be days, weeks, months or years or fractions thereof.

Due to budgeting cycles, unemployment cycles, economic cycles, GDP growth rates etc the share price also contracts and expands. However there is no evidence that its asymmetrical. In fact economists and fund managers use a set of leading indicators to forecast what is likely to happen to the economy in 12 to 15 months. However >50% of fund managers fail to beat the market consistently. Now what are the other <50% using?
What do they know that we dont know...because there are success stories?

Fast Fourier Transforms (FFT) are used to filter noise from signals using spectral and other frequency analysis techniques. (I used this in my earlier career) Now if the above anomalies in the stock market persist then we should be able to use similar techniques.

What I have read so far, it sounds like a complex combination between spectral (frequency) analysis and using leading indicators. But what? I also noted that Amibroker do have the FFT or DFT functions build in.

So perhaps there is someone who knows someone that have done work around this or investigated successful services that use similar propriety techniques.

Would love to hear from you!


----------



## DeepState (14 February 2015)

Faramir said:


> Help DeepState, please.




FFT did the rounds in equities and strategy in the late 1990s.  I have, in the past, hired a bunch of ultra-smart electronic engineers and aerospace engineers too, all at PhD and post-doc levels.  If there is a signal, they can process it. They all know it, have used it in their prior worlds, and don't even talk about it at lunch or bring it up in a financial markets context.

It is a data-mining method that will find stuff as there are always patterns, even in noise.  This stuff fits nicely with ex-post narrative fallacies. That's why it caught on for a bit from the sell-side. It's just not very useful for prediction in this context.  Our markets are not the kind of engineering problem that suits this type of analysis.  I'm sure it is the ant's pants in other electronic or fields involving vibration and the like.  This is the first time I have seen the concept mentioned in a financial markets context for over 10 years.  The last was in a lift with some guy talking about it with wonder (he was clearly not a practitioner who used it)...I didn't know him.  Prior to that, it was in a sell-side piece of analysis fitting wave forms to market aggregates.  I repeated the analysis and realised that whilst it looked interesting, it was not useful for money making. 

Maybe you'll find a way to profit from it in a way we never thought of.  As a direct use, it didn't work and doesn't have the kind of economic rationale to make it interesting enough to pour effort into it.  It actually has the kind of economic rationale that, if a statistically significant outcome were observed, would still lead it to be discarded.


----------



## ottg (14 February 2015)

Thank you for your reply DeepState. I must agree that an earlier Google search brought me to similar conclusions that you have mentioned. One thing is fore shore that if it can make money then many big guns will research FFTs.

But then I read about the new momentum FFT approach used in this thesis here: http://repository.up.ac.za/handle/2263/39956

"A momentum-Fourier transform investment style is identified that outperforms most if not all documented univariate ranked investment styles on the JSE for the analysed timeframe. Returns of 27.6% per annum are achieved"

I don't know if you have the time to spend as its not a quick read, but it will be good to hear your take on this?


----------



## DeepState (14 February 2015)

ottg said:


> Thank you for your reply DeepState. I must agree that an earlier Google search brought me to similar conclusions that you have mentioned. One thing is fore shore that if it can make money then many big guns will research FFTs.
> 
> But then I read about the new momentum FFT approach used in this thesis here: http://repository.up.ac.za/handle/2263/39956
> 
> ...




Read to a little more than half-way to the parts about methodology.  You know/are/supervised this guy? 

He has (re) discovered that momentum has seasonality. In some markets, momentum is the strongest thing going.  If adding seasonality and optimising for these to change the weighting on predictions based on unseasonal univariate outcomes did not lead to a better outcome, for the strongest thing going on record without that flexibility, there is an error in the data. 

There really isn't something particularly innovative about this that had not been expressed in much simpler terms voluminously following Jagadeesh and Titman (1993).  He's basically chosen to re-express it in Fourier terms and it survives this transformation.

Using clearly visible seasonals on basic momentum strategies would have also produced stunning outcomes.  You can refine much further if it lifts your boat. Why not try CART, SVM, NN...any of them has specifications that produce incredible outcomes. These seasonals are clearly visible without the use of Fourier.  So it should not be surprising that Fourier finds them. If you can see the moon, pointing a telescope at it also finds it.

In brief, the Fourier analysis has discovered that there are window dressing periods, tax loss selling and re-set periods leading to increased risk taking in the market.  These had all been published a decade or more before this piece was written. However, these were probably not specific to the JSE. They were discovered without the use of Fourier (that's unless they were discovered that way, but were documented differently).

Certainly, you can use Fourier to make money if this is the definition of it.  Bottom line, it is a transformation of simple momentum methods with a seasonal overlay.  Adding Fourier to it is adding further structural assumptions that seem rather challenging to justify on economic grounds beyond simple seasonals....there is a reason why a stock with a high error relative to a Fourier estimate (as opposed to simple beating the market or something as inane and commonplace) of its return is supposed to be a better predictor?  I have yet to encounter someone who puts money in the market expressing elation or despondency, changing their tax holdings...with reference to Fourier estimates.  They do express it in a whole lot of different ways, none of them involving the terminology of sin/cos/tan.

I would have a better view of this if it were somehow demonstrated that Fourier is the underlying structure of the driving forces of momentum in markets.  I am not aware of anything like this.


----------



## ottg (14 February 2015)

Deepstate thank you for your response.



DeepState said:


> Read to a little more than half-way to the parts about methodology.  You know/are/supervised this guy?




No I'm not that person and I dont know him. My interest is because I used a share market tool with build-in FFT capabilities and it served me well. Unfortunately its not for the ASX. 



DeepState said:


> Bottom line, it is a transformation of simple momentum methods with a seasonal overlay.




You are correct and on its own offers no advantage but with other added momentum indicators (mass & velocity) it is more accurate to predict forthcoming changes in the market trend. As you said there may be other mathematical methods to achieve similar results.



DeepState said:


> I have yet to encounter someone who puts money in the market expressing elation or despondency, changing their tax holdings...with reference to Fourier estimates.




Quite a refreshing thought! Perhaps I need to add how I used the tool. I used fundamentals to select quality stocks and then used the above feature to determine when is a better time to enter, to exit the market or to reduce my exposure.

DeepState can you recommend a proven tool for the ASX market that perhaps may offer similar management capabilities?


----------



## DeepState (14 February 2015)

ottg said:


> Quite a refreshing thought! Perhaps I need to add how I used the tool. I used fundamentals to select quality stocks and then used the above feature to determine when is a better time to enter, to exit the market or to reduce my exposure.
> 
> DeepState can you recommend a proven tool for the ASX market that perhaps may offer similar management capabilities?




If Fourier works for you, that's great.

I do not have any recommendations on this front.  I do not personally subscribe to, or use, anything of this nature which is sold/given as a service or otherwise included in a trading platform.  I can tell you that simple measures work exceptionally well without requiring any type of non-linear transformation at all beyond, perhaps, some type of ranking. There are many on this Forum who would be aware of this and profit handsomely in their own way.

What was useful in the prior paper, though not original, was the idea of using momentum in the cross-section.  Not many people on ASF communicate their trade motivation in this way.  I do note that the professional ones on this site, who are in prop, seem to talk about it quite a bit in their own ways and very disproportionately to the wider population.  Maybe that'll serve as a start for you.


----------



## ottg (15 February 2015)

Thank you DeepState - points taken.


----------

