17
$\begingroup$

Spectrum analysis is often used to analyse waveforms. A common configuration, for example, is to create a graph where X is time, Y is frequency, and the brightness of each position represents amplitude.

Has spectrum analysis ever been used successfully as an indicator to analyse historical price data, for example the price of shares over time?

$\endgroup$
  • 8
    $\begingroup$ Those who say don't know. Those who know don't say. --Lao-tzu, Tao Te Ching (via Pat Burns). $\endgroup$ – Joshua Ulrich Jan 24 '12 at 18:48
  • $\begingroup$ Hmm, sounds like a hammer looking for its nail. $\endgroup$ – chrisaycock Jan 24 '12 at 18:49
  • $\begingroup$ Thanks, it seems the concept has been used before and there are even books on the topic. Thanks as well for the assertion that moving averages are like a low frequency filter. I've marked the most voted answer as correct. $\endgroup$ – alan2here Jan 30 '12 at 2:18
  • 1
    $\begingroup$ I've more recently read a summery of a book by Mandelbrot (the person) that talks about fractals and stock/share prices that seems related. $\endgroup$ – alan2here Jul 20 at 20:40
8
$\begingroup$

In the academic literature it is extremely widely applied in the last 20 years. I would estimate maybe 200 empirical papers, or more. For example a common finding is that higher frequency (daily) wavelet correlations have been high since 2007, attributable either to increasing financial interation or the financial crisis. It is also popular to estimate the time-varying variance as a non-parametric alternative to GARCH models. There are costs and benefits to this, sometimes we want to impose a hypothesis of a functional form onto the data if we have pre-existing knowledge we want to incorporate to improve generalisation of our estimate, or to ensure we are not fitting noise. You can also combine the two approaches; wavelets for the pass band filter and a parametric model for the volatility estimates. This will bais your test though.

Specifically wavelet analysis and not Fourier analysis is popular due to the non-stationarity of the mean and variance in the time domain and other characeristics that vary in the frequency domain over time. Fitting a linear combination of trig basis functions is just not going to give you good results in finance. Autocorrelation also varies in the frequency domain. It is also prefered to STFT so that we do not have to assume stationarity within a time-band. Wavelets are intuitively nice with typical process assumptions in stochastic finance that assume a fractal like property of the price process (stemming from the assumption that our price is some function of a Wiener process). This is incorrect in practice due to phenomena such as the Epps effect and the discreteness of markets imposed by latency and microstructure, but for the time scales of interest to empirical researchers it is acceptable. Indeed these ultra high frequency crystals are generally not estimated for both computation and redundancy reasons (yet there are some papers; the unbiasedness of the white noise hypothesis test I am unsure of). Another reason is that Datastream and Bloomberg are the go-to databases and they are shocking for high frequency data.

Other findings surround frequency-dependent Granger causality testing, changepoint analysis and other analyses.

It is also commonly used to analyse lead-lag relationships through the phase difference in the Morlet wavelet; since the complex sinusoid is fit you can compare the real and imaginary parts of the cofficient through the inverse tangent function to get a phase difference. This isn't a causal wavelet though so you will not be able to construct a time-frequency localised pair trading strategy with this unless your strategy can tolerate the edge effects, which I find to be highly dubious. Also, this is just for the bivariate setting.

All in all, good if your goal is to get a qualitative understanding of interrelationships and correlations in the past, not necessarily good if you are trying to extrapolate into the future since it is not built to be able to generalise. However, you can use it as part of something else if you want to extrapolate, but I am not allowed to share this.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for that. :) $\endgroup$ – alan2here Jul 20 at 20:36
  • $\begingroup$ Can you get a proper username? $\endgroup$ – alan2here Jul 20 at 20:36
7
$\begingroup$

I would recommend Marc Wildi's work on signal extraction.

The link above points to the web archive, since the site no longer appears to exist. I've reproduced the relevant text below. I'm not sure the links on the archived page would work anyway.


Introduction

Signal extraction is about the definition and the estimation of interesting signals in time series. In practice, attention is often focussed on the current boundary of time series: does the seasonally adjusted unemployment rate increase or decrease, do we observe a turning-point in the business-cycle, should we keep, buy or sell an asset based on the current momentum? We here analyse the structure of prospective real-time signal extraction problems by emphasizing trend estimation and derive specific (efficient) solutions for level-approximations as well as or for the early detection of turning-points.

Our contribution and therefore the novelty of our approach, lies in the scrupulous matching of optimization criteria and tests to the underlying problem structures. The latest iteration of the book on real-time signal extraction conveys a comprehensive treatment of the subject. Additionally, selected articles, projects, presentations and pieces of software code give access to more detailed aspects of our work on the topic. These techniques are currently in use in leading economic indicators, in governmental analysis tools as well as in trading algorithms. Current developments include very promising non-linear and multivariate extensions of our original approach.

Books

  • M. Wildi (Version as of 30 Jun 2008) Real-Time Signal Extraction - Beyond Maximum Likelihood Principles
  • M. Wildi (Version as of 26 Nov 2007) Real-Time Signal Extraction - Beyond Maximum Likelihood Principles
  • M. Wildi (Version as of 20 Oct 2007) Real-Time Signal Extraction - Beyond Maximum Likelihood Principles
  • M. Wildi (2006) Signalextraction - Efficient Estimation, 'Unit-Root'-Tests and Early Detection of Turning-Points, Springer.

Papers

  • Wildi, M. (2008) Customized Forecasting Criteria or 'How to Win Forecasting Competitions?', IDP Working Paper, IDP-WP-08Sep-05
  • Wildi, M. and Elmer, S. (2008) Real-Time Filtering and Turning-Point Detection: Application of Customized Criteria (DFA) to the US Business Cycle, IDP Working Paper, IDP-WP-08Sep-04
  • Wildi, M. and Hoenecke, O. (2008) Real-Time Filtering: Non-Linear DFA and Asymmetry of the US Business Cycle, IDP-Working paper, IDP-WP-08Sep-03
  • Wildi, M. and Sturm, J.-E. (2008) Real-Time Filtering: Using the Multivariate DFA to Monitor the US Business Cycle, IDP-Working paper, IDP-WP-08Sep-02
  • Wildi, M. (2008) Efficient Multivariate Real-Time Filtering and Cointegration, IDP-Working paper, IDP-WP-08Sep-01
  • Perrin, D. and Wildi, M. (2008) Statistical Modeling of Writing Processes, IDP Working Paper, IDP-WP-07Aug-01
  • A collection of other papers on signal extraction by Marc Wildi

Software

Selected Projects

  • KOF new economic barometer

Presentations at conferences and workshops

  • IASCA 2008 (5-8 December 2008)
  • CIRET 2008 (8-11 October 2008)
  • 5th EUROSTAT Colloquium on modern tools in business cycle analysis (28 Sept - 1 Oct 2008)
  • IDP Colloquium (27 November 2007)
  • Beijing Academy of Sciences (12-19 November 2007)
  • CIRANO Workshop Montréal (5-6 October 2007)
  • KOF Conference on real-time series, Zurich (9 July 2007)
  • Rmetrics Seminar Meielisalp, Switzerland (July 2007)
  • International Symposium on Forecasting, New York, USA (24-27 June 2007)
  • ERCIM Workshop Geneva 2007 (20-22 April 2007)
  • German Ministry of Technology and Economy, Berlin (2007)
  • Conference EUROSTAT on leading indicators (2007)
  • Conference EUROSTAT on seasonal adjustment, Luxembourg (10-12 May 2006)
  • International Symposium on Forecasting, Santander, Spain (2006)
  • IFO Conference on Survey Data, Munich (14-15 October 2005)
  • International Symposium on Forecasting, San Antonio, Texas, USA (2005)
| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Sorry the link broke and (user number)'s answer is much longer. $\endgroup$ – alan2here Jul 20 at 20:35
  • $\begingroup$ @alan2here thanks for letting me know the link was dead. I've updated it to use the web archive. No worries about accepting a more complete answer. ;-) $\endgroup$ – Joshua Ulrich Jul 21 at 15:02
4
$\begingroup$

Yes. Check out Time-Series Analysis by Shumway and Stoffer. Spectral Analysis and Filtering is covered in Chapter 4.

| improve this answer | |
$\endgroup$
2
$\begingroup$

Fractal spectra are covered in Multifractal Volatility: Theory, Forecasting, and Pricing. Also note that your run-of-the-mill moving average of a price series is a low-pass filter (filters out the higher frequencies), and moving averages are very used in basic financial analysis.

| improve this answer | |
$\endgroup$
2
$\begingroup$

Something like a moving average smoother is akin to a low pass filter, the 'stochastics' of technical analysis crudely akin to a band pass filter. Going up the ladder of sophistication, you can see something like http://www.jstor.org/pss/3592665 or applications of wavelet decomposition.

This paper from 1963 by GRANGER, CLIVE W. J., and MORGENSTERN, 0. titled “Spectral Analysis of New York Stock Market Prices,” Kyklos, XVI (January, 1963), I-27 should convince you that people have been more than thinking of applying frequency-domain analysis to this.

| improve this answer | |
$\endgroup$
1
$\begingroup$

Here is a gentle introduction to wavelet methods.

| improve this answer | |
$\endgroup$
1
$\begingroup$

Checkout spectro.space - A CryptoCoin Analyzer with Spectrograms.

I just launched it, and it's is a free web-based graphing tool that allows you to view over 2000 different cryptocurrencies, and a lot more coin-pairs. The semi-novel thing about spectro.space is the spectrogram graphs.

I've been able to determine the onset of large price movements, both up and down, from the spectrogram. When prices are relatively stable, the spectrum contains mainly low frequency power. When there is volatility, the entire spectrum lights up, I call these events flames because that's what they look like. This is a very new application that I'm going to continue to develop. My next step after adding MarketCap graphs is to work on some prediction.

Let me know what you think! I'd love any and all feedback.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Nice :) Could maybe do with being a bit more detailed, the resolution/smoothness of the output is a bit blobby. $\endgroup$ – alan2here Mar 16 '18 at 23:01
  • $\begingroup$ Thanks @alan2here! It could definitely use better resolution. I’m limited by the current data source in how much data I can get for a time period which directly controls the depth of resolution. But I’ll try and improve. Would you mind sending me a screenshot and tell me what type browser/machine your using so that I can make sure it’s working correctly? Thanks again! $\endgroup$ – Mark Mar 17 '18 at 4:36
0
$\begingroup$

Singular Spectrum Analysis ( SSA ) is a relatively new technique ( although Lorenz suggested something similar 1956 ) that is starting to be more widely used. The jury is still out on just how much underlying structure, if any, there actually is in financial time series. Nonetheless a very powerful and easy to use data smoothing and filtering/de-noising technique. A very basic Excel and VBA demonstration available here

| improve this answer | |
$\endgroup$
0
$\begingroup$

Take a look at someone using spectral analysis on the market: stock market analysis http://www.stockforecasttoday.com

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.