Presentation of Time Series Properties of Financial Instrument and Possibilities in Frequency Decomposition and Information Extraction using FT, STFT and Wavelets with Outlook in Current Research on Wavelet Neural Networks
10. {1/X} 10
Fourier Analysis
{4/4}
What Frequency Components exist in a given Real-World Price & Return Signal using
Short-Time Fourier Transformation?
02.07.2019
12. {1/X} 12
Wavelets
{2/5}
Source: https://www.tradeways.org/wave_1.php
WaveletTheory Insights
02.07.2019
• Translation (shifting of a Mother
Wavelet) to obtain Time Information
• Scaling (dilating or compressing a
Mother Wavelet) to obtain Frequency
Information
• Boxes have non-zero Area (Heisenberg
Inequality)
• Width & Height change but Area
remains constant (lower bounded)
16. {1/X} 16
Outlook -WNN
{1/1}
Wavelet Neural Networks?
x
x
x
Ψ
Ψ
Ψ
Ψ
Σ
• Wavelet Transformation as Input
Data Train a Standard Neural
Network
• Raw Financial Data as Input Data
Train Wavelet Neural Network
• Missing Data Reconstructions
• Enhanced Predictions with Data Interpolations
• Predicting ChaoticTime Series
• Non-Linear Noise Reduction
02.07.2019
Linear Combination
Signal
Wavelons
17. Markus Vogl
{Business & Data Science}
17
Contact
Markus Vogl
Adelheidstraße 51
65185 Wiesbaden (DE)
02.07.2019
Notas do Editor
Good Evening everyone, I feel honored to be your guest tonight.
My name is Markus Vogl, founder of Markus Vogl{Business & Data Science} and today
I am going to talk with you about Financial Time Series
[UMSCHALTEN]
Analysis using Wavelets.
My talk will last 15 minutes.
If you have further questions or are interested in more details,
feel free to contact me anytime or find me later during the event.
To begin, I will present the content of this presentation.
First, we will introduce Financial Time Series.
Second, we will talk about signal analysis, especially the topics fourier analysis and wavelets.
Once we concluded, I will grant you an outlook into one of our current research topics, namely wavelet neural networks.
To start, I will present you the two datasets which will be used during the presentation.
On the righthand side you will see a financial time series, namely the apple stock price series denoted on a daily basis in USD during the time period of 2000 till today.
In straight contrast on the lefthand side you will see a stochastic process realization, which is based upon the descriptive characterisitcs of the Apple stock price series, namely a random walk realization.
Random walks are used in financial & risk modelling, banking supervision models, and in most attempts to model some kind of randomness into your data.
If we briefly compare these two graphs, they look quite similar. To gather deeper insights, we as financial analysts, are interested in the rates of change. Meaning, how our stock develops over time.
[UMSCHALTEN]
To show this, we have calculated the daily logarithmic returns of our two time series.
On the righthand side you will see the Apple Return Series which clearly shows clusters in the data.
If you look at the year 2001, you will see the dotcom bubble and at the year 2008/2009 you will see the great financial crisis, both indicated by huge negative returns.
Again in straight contrast if you will look at the lefthand side, you will see the returns of our random walk realization.
Compared against each other, one clearly sees that returns of the random walk do not show clusters in time and are almost equally distributed. This is simply due to the nature of a random walk.
Since we now know, how our time series look like, it is time to display some properties of financial time series.
To introduce you to the world of financial time series properties we first take a look at Classical assumptions:
Stationarity, Linearity, Martingale as well as Markov properties and Independency.
This means in short, that whatever happened yesterday has absolutely no impact on the development of today.
To go on, it is assumed that returns do not bear trends and are normally distributed.
Again, yesterday does not matter for today, returns do not follow trends and follow a normal distribution instead.
On top of that, it is believed that Markets are efficient.
Market efficiency in a nutshell means, that all available information today, is already reflected by market prices and one cannot beat the market. [PAUSE]
To continue we will now take a look at current research results. It was found out, that there is no stationarity, linearity and independency in financial time series. This means yesterday does matter for today, and it matters different every day and in a nonlinear fashion.
The next results have been shown by us and another cooperation partner, namely the Mandelbrot Asset Management GmbH in Erlangen. We have shown via experiment using wavelet transformations and Hurst Exponents, that financial markets data follows fractal patterns, bear trends and display momentum effects.
These trends can be measured using a special wavelet decomposition sheme developed by our cooperation partner.
Additionally, we have shown, that trends follow a logNormal distribution.
This leads to only one conclusion, namely that efficient markets do not exist.
To go on, we will delve straight into signal analysis, namely into fourier analysis.
Fourier Analysis answers the question what frequencies exist in a given signal.
At first, we will decompose a periodic signal at the lefthand side and see what happens.
We discover the frequency information on the righthand side.
One clearly sees all relevant frequencies existent in the signal.
So let´s try this approach with financial time series data and see what happens.
At first, we will take a look at the Apple Stock Price Series.
First insight, Price Series are not periodic
Second insight, Price Series do not contain frequency information at all.
So now we know two things, price series and frequency analysis do not match and the classical assumptions do no hold for prices.
Since we do not get what we want, why continue anyway?
Stop!
Before taking the loss and expose ourselfs to the critic of effiency believers, we will consider our stock return series first.
If we take a closer look at the frequency spectrum of the Apple Return Series, the frequencies are changing anytime.
This means twofold.
First, Return series contain frequency information!
Second, Return Series are not stationary.
Therefore, the cassical assumptions do not hold and the latest research is probably correct.
Also we need to face the fact, that the Fourier Transformation does not work for us!
[UMSCHALTEN]
Short Time Fourier Transformation is an expansion of the fourier analysis and
assumes that if a non periodic signal is choped into tiny pieces, these pieces are stationary and can be decomposed.
What happens if we apply the Short Time Fourier Transformation on the Price and Return Series of our Apple Stock?
Let us take a look at the lefthand side, referring to the price series, first.
What we see is some kind of action, but not really anything usefull.
Like stated before, Price Series do not bear frequency information.
End of story.
In contrast, if we consider the returns on the righthand side, we see, that there is frequency information.
Well, we see frequency information, but we do not get a representation, we can creave information from.
We see there are two yellow bars responding to frequency, but it seems like the Short Time Fourier Transformation is not as well suited for our purposes, as we have wished for.
We need to find another tool which is suitable for us!
We will now introduce a new concept as alternative to the Short Time Fourier Transformation.
This concept is called Wavelet Transformation and is part of the Multi-Resolution Analysis.
Take a look!
We see little wave like functions, which are locally bounded and have some funny names.
The name Wavelet origins from the french word ondolette and means „little wave“.
So, what are they used for anyway? How do they work?
In case of Continuous Wavelet Transformation, the Coeffiecients refer to the closeness of a given signal and a wavelet at a given scale.
We take our wavelet and shift it through our signal to see how close they are. Romantic right?
If you look at the lefthand picture, you will find a wavelet which is in the first step shifted through the signal. The Closeness of the Signal to our Wavelet is represented by the coefficients.
Afterwards we stretch it and shift it again to obtain different information.
The two core concepts of wavelets are Translation and Scaling.
Translation means shifting our wavelet through the signal to obtain time information
Scaling means dilating or compressing the wavelet to obtain frequency information
Therefore, high frequencies resemble low scales in terms of wavelets and lead to good time and bad frequency resolution
And low frequencies resemble high scales which means bad time and good frequency resolution.
For demonstration purposes, we will start with the Apple Price Series again using a Shannon Wavelet.
The Y Axis represents the Scales, the X axis represents time denoted in daily steps.
In short we look at a continous wavelet transformation coefficient matrix which consists of 256 rows, representing the scales and almost 5000 columns representing the days.
Since looking at so many numbers is unsighty and does not give us greater insight, we used the Python matplotlib package to produce a colour map presentation of our wavelet transformation.
What do we see?
Basically again not very much. Prices do not have Frequency information.
We just see, the stock price is rising. Nothing more.
Instead let us take a look at the returns again!
We have calculated the Power Spectrum of the Return Series of Apple using the Morlet Wavelet.
Take a look at the big white stripes at the beginning and in the middle of the picture.
You can see in time localization at the top that these are the DotCom and in accordance the Financial Crisis.
Our cooperation partner is able to decompose a time series using wavelets and represent the signal via trends which are measured for examples in days at a given slope for each single scale!
We have learned that financial markets data consists of trends and follows fractal patterns.
What our research endeavour would be is to validate whether one can use this framework to better forecast stocks.
Next, in comparison to real world data, we will take a look at our random walks again, which are used in almost all banking & risk models.
It is like putting the oven out! No light anymore.
What do we see in comparison with the bright real world data realization?
Basically nothing only one big insight.
Random Walk Processes do not bear Frequency information.
Take a look again at the real world data.
This is what we should model.
[FOLIE VORHER NOCHMALS ZEIGEN UND ZURÜCK SCHALTEN]
And this is what we model it with!
We can clearly see the discrepancies and the room for approvement!
This concludes the continous wavelet transformation and I will present an outlook into our research.
What are our current research endeavours?
Like stated before we would like to use the Wavelet Transformations to create forecasting models used on financial time series, since as we have learned they contain frequency information.
We also would like to utilize not only one time series but delve into Financial Big Data & Neural Networks in Terms of a Maschine Learning Solution.
We would like to combine both approaches.
There are two possible ways of action.
First possibility, we take our Wavelet Transformation and use it as input for a standard neural network of some kind.
For the second possibility, take a look at the lefthand sides upper picture.
You can find an example representation of a wavelet neural network with one hidden layer.
We use our signal as input, decompose it using so called wavelons. This means instead of a classical activation function like the sigmoid function we use a mother wavelet function to obtain a linear combination as output.
We will try via experiment to figure out which way is more suitable.
What else can we use this approach for? And what has been done in this area so far?
You can use this approach for Missing Data Reconstruction, Enhanced Predictions, Predictions of Chaotic time series, which is part of my PhD Thesis to evaluate whether financial markets are chaotic or not, and one can use it to reduce non-linear noise in given signals.
With this our presentation is concluded and at it s end.
[UMSCHALTEN]
Thank you very much and now I am open for any questions.
If any questions stay unanswered or you have some insights to share, please feel free to contact us anytime or find me later at the event.
Thank you very much.