Upload
sameera-roshan
View
218
Download
0
Embed Size (px)
Citation preview
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
1/28
Wavelet Multi-resolutionWavelet Multi-resolution
Analysis of HighAnalysis of HighFrequency FX RatesFrequency FX Rates
Department of ComputingUniversity of Surrey, Guildford, UK
August 27, 2004
Intelligent Data Engineering and Automated
Learning - IDEAL 2004
5th International Conference, Exeter, UK
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
2/28
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
3/28
What Is a Time Series?What Is a Time Series?
q A chronologically arranged sequence of
data on a particular variable
q Obtained at regular time interval
q Assumes that factors influencing past and
present will continue
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
4/28
U.S. Retail SalesU.S. Retail Sales
Quarterly DataQuarterly Data
2 0 0
2 5 0
3 0 0
3 5 0
4 0 0
4 5 0
8 3 8 4 8 5 8 6 8 7
Yea
S
ales(Billions)
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
5/28
Time Series ComponentsTime Series Components
Trend
Seasonal Cyclical
Irregular
TS Data
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
6/28
Trend ComponentTrend Component
q Indicates the very long-term behavior of the
time series
q Typically as a straight line or an
exponential curve
q This is useful in seeing the overall picture
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
7/28
Cyclical ComponentCyclical Component
q A non-seasonal component which varies in arecognizable period
q Peak
q Contractionq Trough
q Expansion
q Due to interactions of economic factors
q The cyclic variation is especially difficult toforecast beyond the immediate future more of alocal phenomenon
Time
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
8/28
Seasonal ComponentSeasonal Component
q Regular pattern of up and down fluctuationswithin a fixed time
q Due to weather, customs etc.q Periods of fluctuations more regular, hence more
profitable for forecasting
Time
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
9/28
Irregular ComponentIrregular Component
q Random, unsystematic, residualfluctuations
q Due to random variation or unforeseenevents
q Short duration and non-repeating
q
A forecast, even in the best situation, can beno closer (on average) than the typical sizeof the irregular variation
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
10/28
Time Series Data Broken-Down*Time Series Data Broken-Down*
Trend
Seasonal Index
Cyclic Behavior
Irregular
TS Data
*For illustration purposes only.
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
11/28
Financial Time SeriesFinancial Time Series
Data CharacteristicsData Characteristicsq Evolve in a nonlinearnonlinear fashion over time
q Exhibit quite complicated patterns, like trends,abrupt changes, and volatility clustering, whichappear, disappear, and re-appear over timenonstationarynonstationary
q There may be purely local changes in time domain,global changes in frequency domain, and there may
be changes in the variance parameters
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
12/28
Financial Time SeriesFinancial 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
IBMPrices
IBMVolati
lity
Nonstationary
Time VaryingVolatility
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
13/28
q The nonlinearities and nostationarities do contain
certain regularities or patterns
q Therefore, an analysis of nonlinear time series
data would involve quantitatively capturing such
regularities or patterns effectively
Financial Time SeriesFinancial Time Series
Data CharacteristicsData CharacteristicsHaving said that
How and Why?How and Why?
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
14/28
Wavelet Multiscale AnalysisWavelet Multiscale Analysis
Overviewq Wavelets are mathematical functions that cut up
data into different frequency components and thenstudy each component with a resolution matchedto its scale
q Wavelets are treated as a lens that enables theresearcher to explore relationships that were
previously unobservable
q Provides a unique decomposition (deconstruction)of a time series in ways that are potentially
revealing
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
15/28
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
16/28
Signal
Wavelet
C = C2
Step II:Step II: Keep shifting the wavelet to the right and repeating Step I untilwhole signal is covered
Wavelet Multiscale AnalysisWavelet Multiscale Analysis
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
17/28
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
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
18/28
Wavelet Multiscale AnalysisWavelet Multiscale Analysis
Discrete Convolution:Discrete Convolution:The original signal is convolved with a set ofhigh or low pass filters corresponding to the prototype wavelet
==
i
itxiwtx*w
Xt Original Signal
W High or low pass filters
Filter Bank Approach
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
19/28
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
Fre
que
nc
y
Fre
que
nc
y
Xt = AN + D1+ D2 + DN
Iteration gives scaling effect
at each level
Mallats Pyramidal Filtering ApproachMallats Pyramidal Filtering Approach
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
20/28
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
21/28
Analyzing High-frequencyAnalyzing High-frequency
Financial Data: Our ApproachFinancial Data: Our Approach
Tick Data
Preprocessing TransformationKnowledge
Discovery Forecast
Data
Compression
Multiscale
AnalysisPredictionSummarization
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)
withchief featureschief features
Use the
extracted
chief features
to predictpredict
CycleCycle
TrendTrend
Turning PointsTurning Points
Variance ChangeVariance Change
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
22/28
Analyzing High-frequencyAnalyzing 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 fiveminutes).
II. Calculate the level L of the DWT needed based on number of samples N in Cof 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 A
L.
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
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
23/28
Analyzing High-frequencyAnalyzing 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 DSsymmetrically
N points to the right to get DS, forecast
.
III. For a N-step ahead forecast, extend the trend componentextend the trend componentANlinearlyN 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
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
24/28
Analyzing High-frequencyAnalyzing 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
DetectInherent
Cycles
DetectInherent
Cycles
Detect
Variance
Change
Detect
Variance
Change
Su
mma
riz
ation
Pre
dic
tion
A prototype systemprototype system has been implemented that automaticallyextracts chief features from a time series and give a predictionbased on the extracted features, namely trend and seasonality
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
25/28
Analyzing High-frequencyAnalyzing 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 . 8 2
1 . 8 2
1 . 8 3
1 . 8 3
1 . 8 4
0 2 5 5 0 7 5 1 0 0 1 2 5 1 5 0 1 7 5 2 0 0 2 2 5 2 5 0 2 7 5
0 . 0
0 . 2
0 . 4
0 . 6
0 . 8
1 . 0
0 2 5 5 0 7 5 1 0 0 1 2 5 1 5 0 1 7 5 2 0 0 2 2 5 2 5 0 2 7 5
Feature Phrases Details
Trend 1st Phase
2nd Phase
TurningPoints
Downturns 108, 132, 164, and 178
Upturns 5, 12, 20 36, 68, and 201
VarianceChange
Location 164
Cycle Period 42
Peaks at 21, 54, 117, 181, 215, and 278
260
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
26/28
Analyzing High-frequencyAnalyzing High-frequency
Financial Data: Our ApproachFinancial Data: Our ApproachA Case StudyA Case Study
Forpredictionprediction, we use the chief features of the previous day (March 18, 2004), information about thedominant cycle and trend (summarization), to reproduce the elements of the series for the followingday (March 19, 2004):
1 . 8 2
1 . 8 2
1 . 8 3
1 . 8 3
1 . 8 3
0 2 5 5 0 7 5 1 0 0 1 2 5 1 5 0 1 7 5 2 0 0 2 2 5 2 5 0
SystemOutputSystemOutput
Actual
March 19, 2004
Predicted
(seasonal + trend)
March 19, 2004
Root Means Square Error = 0.0000381
Correlation = + 62.4 %
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
27/28
8/6/2019 Wavelet Multi Resolution Analysis of High Frequency Fx Rates 1203290417290522 5
28/28