wavelet multiresolution analysis of high frequency fx rates 1203290417290522 5
DESCRIPTION
researchTRANSCRIPT
Wavelet Multi-resolution Wavelet Multi-resolution Analysis of High Analysis of High
Frequency FX RatesFrequency FX RatesDepartment of Computing
University of Surrey, Guildford, UK
August 27, 2004
Intelligent Data Engineering and Automated Learning - IDEAL 2004
5th International Conference, Exeter, UK
Talk OutlineTalk Outline Describing Time Series Data Financial Time Series Data Characteristics Wavelet Multiscale Analysis Our Time Series Analysis Approach - Algorithms - Prototype System - Case Study - Conclusions Questions
What Is a Time Series?What Is a Time Series?
A chronologically arranged sequence of data on a particular variable
Obtained at regular time interval Assumes that factors influencing past and
present will continue
U.S. Retail SalesU.S. Retail SalesQuarterly DataQuarterly Data
200
250
300
350
400
450
83 84 85 86 87
Year
Sal
es (B
illio
ns)
Time Series ComponentsTime Series Components
Trend
Seasonal Cyclical
Irregular
TS Data
Trend ComponentTrend Component
Indicates the very long-term behavior of the time series
Typically as a straight line or an exponential curve
This is useful in seeing the overall picture
Cyclical ComponentCyclical Component
A non-seasonal component which varies in a recognizable period
Peak Contraction Trough Expansion
Due to interactions of economic factors The cyclic variation is especially difficult to
forecast beyond the immediate future more of a local phenomenon
Time
Seasonal ComponentSeasonal Component
Regular pattern of up and down fluctuations within a fixed time
Due to weather, customs etc. Periods of fluctuations more regular, hence more
profitable for forecasting
Time
Irregular ComponentIrregular Component
Random, unsystematic, “residual” fluctuations
Due to random variation or unforeseen events
Short duration and non-repeating A forecast, even in the best situation, can be
no closer (on average) than the typical size of the irregular variation
Time Series Data Broken-Down*Time Series Data Broken-Down*
Trend
Seasonal Index
Cyclic Behavior
Irregular
TS Data
*For illustration purposes only.
Financial Time Series Financial Time Series Data CharacteristicsData Characteristics
Evolve in a nonlinearnonlinear fashion over time
Exhibit quite complicated patterns, like trends, abrupt changes, and volatility clustering, which appear, disappear, and re-appear over time nonstationary nonstationary
There may be purely local changes in time domain, global changes in frequency domain, and there may be changes in the variance parameters
Financial Time Series Financial Time Series Data CharacteristicsData Characteristics
305
345
385
425
465
505
545
585
1 26 51 76 101 126 151 176 201 226 251 276 301 326 351
0
0.02
0.04
0.06
0.08
0.1
1 26 51 76 101 126 151 176 201 226 251 276 301 326 351
IBM
Pri
ce
sIB
M V
ola
tili
ty
Nonstationary
Time Varying Volatility
The nonlinearities and nostationarities do contain certain regularities or patterns
Therefore, an analysis of nonlinear time series data would involve quantitatively capturing such regularities or patterns effectively
Financial Time Series Financial Time Series Data CharacteristicsData Characteristics
Having said that…
How and Why?How and Why?
Wavelet Multiscale AnalysisWavelet Multiscale AnalysisOverview Wavelets are mathematical functions that cut up
data into different frequency components and then study each component with a resolution matched to its scale
Wavelets are treated as a ‘lens’ that enables the researcher to explore relationships that were previously unobservable
Provides a unique decomposition (deconstruction) of a time series in ways that are potentially revealing
Signal
Wavelet
C = C1
Step I:Step I: Take a wavelet and compare it to a section at the start of the original signal. Calculate C to measure closeness (correlation) of wavelet with signal
Wavelet Multiscale AnalysisWavelet Multiscale Analysis
Signal
Wavelet
C = C2
Step II:Step II: Keep shifting the wavelet to the right and repeating Step I until whole signal is covered
Wavelet Multiscale AnalysisWavelet Multiscale Analysis
Signal
Wavelet Multiscale AnalysisWavelet Multiscale Analysis
Wavelet
C = C3
Step III:Step III: Scale (stretch) the wavelet and repeat Steps I & II
Step IV:Step IV: Repeat Steps I to III for all scales
Wavelet Multiscale AnalysisWavelet Multiscale Analysis
Discrete Convolution:Discrete Convolution: The original signal is convolved with a set of high or low pass filters corresponding to the prototype wavelet
iitxiwtx*w
Xt Original Signal
W High or low pass filters
Filter Bank Approach
Wavelet Multiscale AnalysisWavelet Multiscale Analysis
Filter Bank Approach
H (f)
G (f) G* (f)
2 2 H* (f)
2 2
Xt
D1
A1
H: Bank of High Pass filters
G: Bank of Low Pass filters
H (f) – high-pass decomposition filter
H* (f) – high-pass reconstruction filter
G (f) – low-pass decomposition filter
G* (f) – low-pass reconstruction filter
Up arrow with 2 – upsampling by 2
Down arrow with 2 – downsampling by 2
Xt
A1 D1A1
A2 D2A2
A3 D3
L
Level 1
Xt = A1 + D1
Level 2
Level 3
L
L
H
H
L Xt = A2 + D1+ D2
Xt = A3 + D1+ D2 + D3
Level N
Fr e
qu
enc
yF
req
uen
cy
Xt = AN + D1+ D2 + … DN
Iteration gives scaling effect
at each level
Mallat’s Pyramidal Filtering ApproachMallat’s Pyramidal Filtering Approach
Wavelet Multiscale AnalysisWavelet Multiscale AnalysisW
avel
et D
eco
mp
osi
tio
ns
Wav
elet
Dec
om
po
siti
on
s
Fo
uri
er P
ow
er S
pec
tru
m
Fo
uri
er P
ow
er S
pec
tru
m
-1.1E+02
-6.1E+01
-1.1E+01
3.9E+01
8.9E+01
Le
ve
l -
1
-1.5E+02
-5.0E+01
5.0E+01
1.5E+02
2.5E+02
Le
ve
l -
2
-1.5E+02
-1.0E+02
-5.0E+01
0.0E+00
5.0E+01
Le
ve
l -
3
3.8E+03
4.0E+034.2E+03
4.4E+034.6E+03
4.8E+03
5.0E+035.2E+03
FT
SE
10
0
0.0E+00
5.0E+04
1.0E+05
1.5E+05
2.0E+05
2.5E+05
3.0E+05
3.5E+05
FF
T (
1)
0.0E+00
5.0E+05
1.0E+06
1.5E+06
2.0E+06
2.5E+06
3.0E+06
FF
T (
2)
0.0E+00
5.0E+05
1.0E+06
1.5E+06
2.0E+06
2.5E+06
3.0E+06
FF
T (
3)
0.0E+00
5.0E+04
1.0E+05
1.5E+05
2.0E+05
2.5E+05
3.0E+05
3.5E+05
FF
T (
FT
SE
)
Analyzing High-frequency Analyzing High-frequency Financial Data: Our ApproachFinancial Data: Our Approach
Tick Data
Preprocessing TransformationKnowledge Discovery Forecast
Data Compression
Multiscale Analysis
PredictionSummarization
AggregateAggregate the movement in the
dataset over a certain
period of time
Use the DWT to deconstructdeconstruct
the series
Describe market dynamics at
different scales (time horizons)
with chief featureschief features
Use the extracted
‘chief features’ to predictpredict
CycleCycle
TrendTrend
Turning PointsTurning Points
Variance ChangeVariance Change
Analyzing High-frequency Analyzing High-frequency Financial Data: Our ApproachFinancial Data: Our Approach
I. CompressCompress the tick data to get Open (O), High (H), Low (L) and Close (C) value for a given compression period (for example, one minute or five minutes).
II. Calculate the level L of the DWT needed based on number of samples N in C of Step I,
L = floor [log (N)/log (2)].
III. Perform a level-L DWTlevel-L DWT on C based on results of Step I and Step II to get,
Di, i = 1, . . ., L, and AL.
III-1. Compute trendtrend by performing linear regression on AL.
III-2. Extract cyclecycle (seasonality) by performing a Fourier power spectrum analysis on each Di and choosing the Di with maximum power as DS.
III-3. Extract turning pointsturning points by choosing extremas of each Di.
IV. Locate a single variance changevariance change in the series by using the NCSS index on C.
V. Generate a graphical and verbal summarysummary for results of Steps III-1 to III-3 and IV.
Generalized Algorithm: Generalized Algorithm: SummarizationSummarization
Analyzing High-frequency Analyzing High-frequency Financial Data: Our ApproachFinancial Data: Our Approach
I. SummarizeSummarize the tick data using the time series summarization algorithm.
II. For a N-step ahead forecast, extend the seasonalextend the seasonal component DS
symmetrically N points to the right to get DS, forecast.
III. For a N-step ahead forecast, extend the trend componentextend the trend component AN linearly N
points to the right to get AN, forecast.
IV. Add the results of Steps II and III to get an aggregateaggregate N-step ahead forecastforecast,
Forecast = DS, forecast + AN, forecast.
Generalized Algorithm: Generalized Algorithm: PredictionPrediction
Analyzing High-frequency Analyzing High-frequency Financial Data: Our ApproachFinancial Data: Our Approach
Raw Signal
VolatilityVolatility
DWTDWT
Statistic
NCSS
Statistic
NCSS
DWTDWT
FFTFFT
Detect Turning
Points and Trends
Detect Turning
Points and Trends
Detect Inherent Cycles
Detect Inherent Cycles
Detect Variance Change
Detect Variance Change
Su
mm
arization
Pred
iction
A prototype systemprototype system has been implemented that automatically extracts “chief features” from a time series and give a prediction based on the extracted features, namely trend and seasonality
Analyzing High-frequency Analyzing High-frequency Financial Data: Our ApproachFinancial Data: Our ApproachA Case StudyA Case Study
Consider the five minutes compressed tick data for the £/$ exchange rate on March 18, 2004
1.82
1.82
1.83
1.83
1.84
0 25 50 75 100 125 150 175 200 225 250 275
0.0
0.2
0.4
0.6
0.8
1.0
0 25 50 75 100 125 150 175 200 225 250 275
Feature Phrases Details
Trend
1st Phase
2nd Phase
Turning Points
Downturns 108, 132, 164, and 178
Upturns 5, 12, 20 36, 68, and 201
Variance Change
Location 164
CyclePeriod 42
Peaks at 21, 54, 117, 181, 215, and 278
260 < t 1.81, + t 5-6.36eTrend1x
288 < t < 261 1.83, + t 6-3.65eTrend2x
Input DataInput Data
Sys
tem O
utp
ut
Sys
tem O
utp
ut
Analyzing High-frequency Analyzing High-frequency Financial Data: Our ApproachFinancial Data: Our ApproachA Case StudyA Case Study
For predictionprediction, we use the ‘chief features’ of the previous day (March 18, 2004), information about the dominant cycle and trend (summarization), to reproduce the elements of the series for the following day (March 19, 2004):
1.82
1.82
1.83
1.83
1.83
0 25 50 75 100 125 150 175 200 225 250
System OutputSystem Output
ActualMarch 19, 2004
Predicted (seasonal + trend)March 19, 2004
Root Means Square Error = 0.0000381
Correlation = + 62.4 %
Analyzing High-frequency Analyzing High-frequency Financial Data: Our ApproachFinancial Data: Our ApproachConclusionsConclusions
I. We have presentedpresented a time series summarization, annotation, and prediction framework based on the multiscale wavelet analysis to deal with nonstationary, volatile and high frequency financial data
II.II. Multiscale analysisMultiscale analysis can effectively deconstructdeconstruct the total series into its constituent time scales: specific forecasting techniques can be applied to each timescale series to gain efficiency in forecastefficiency in forecast
III.III. ResultsResults of experiments performed on Intraday exchange data show promiseshow promise for summarizing and predicting highly volatile time series
IV.IV. Continuously evolvingContinuously evolving and randomly shocked economic systemseconomic systems demand for a more rigorousmore rigorous and extended analysisanalysis, which is being planned
V. Successful analysis of agentsagents operatingoperating on several scalesseveral scales simultaneously and of modeling these componentsmodeling these components could result in more exact forecastsexact forecasts
Questions / CommentsQuestions / Comments