Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Generalized Model for Financial Time Series Representation and Prediction Author: Depei Bao Presenter: Liao Shu Acknowledgement: Some figures in this.

Similar presentations


Presentation on theme: "A Generalized Model for Financial Time Series Representation and Prediction Author: Depei Bao Presenter: Liao Shu Acknowledgement: Some figures in this."— Presentation transcript:

1 A Generalized Model for Financial Time Series Representation and Prediction Author: Depei Bao Presenter: Liao Shu Acknowledgement: Some figures in this presentation are obtained from the paper

2 Outline of the Presentation Introduction Introduction Critical Point Model (CPM) for Financial Time Series Representation Critical Point Model (CPM) for Financial Time Series Representation Motivation and importance of using critical points Motivation and importance of using critical points The generalized CPM to represent financial time series The generalized CPM to represent financial time series Probabilistic model based on CPM for prediction Probabilistic model based on CPM for prediction Experimental Results Experimental Results Conclusion Conclusion

3 Introduction Flow Chart of the General Financial Time Series Prediction Method: Flow Chart of the General Financial Time Series Prediction Method: Input Data Feature Extraction Probabilistic Model Optimization Forecast Value

4 Introduction Main Idea of the Proposed Method: Stock movements are affected by two types of factors Main Idea of the Proposed Method: Stock movements are affected by two types of factors Gradual strength changes between the buying side and the selling side (Useful Information) Gradual strength changes between the buying side and the selling side (Useful Information) Random factors such as emergent affairs or daily operation variations (Noise) Random factors such as emergent affairs or daily operation variations (Noise) Motivation and Goal of the Proposed Method: Motivation and Goal of the Proposed Method: Using the original raw price data to do prediction can be problematic Using the original raw price data to do prediction can be problematic Remove the noise information and preserve the useful information to do the prediction Remove the noise information and preserve the useful information to do the prediction

5 Critical Point Model (CPM) for Financial Time Series Representation Motivation (Why critical point model?) Motivation (Why critical point model?) A fluctuant financial time series consists of a sequence of local maximal/minimal points. Some of them mirrors the information of trend reversals A fluctuant financial time series consists of a sequence of local maximal/minimal points. Some of them mirrors the information of trend reversals

6 Motivation and Importance of using Critical Points: Pattern Information Based on the critical points, the input financial time series can be represented in a pattern-wised manner to reflect their trends over different periods Based on the critical points, the input financial time series can be represented in a pattern-wised manner to reflect their trends over different periods

7 CPM Based Representation A financial time series is comprised of a sequence of critical points (local minimal/maximal) A financial time series is comprised of a sequence of critical points (local minimal/maximal) We only consider the critical points We only consider the critical points Only some of the critical points are preserved (remove those critical points which are considered as noise factors) Only some of the critical points are preserved (remove those critical points which are considered as noise factors)

8 Definition of Noise Defined based on two measure criterions Defined based on two measure criterions Amount of oscillation between two critical points Amount of oscillation between two critical points Duration between two critical points Duration between two critical points A small oscillation and a short duration will be regarded as noise. A small oscillation and a short duration will be regarded as noise.

9 Simple CPM Example Example Define a minimal time interval T (duration) and a minimal vibration percentage P (oscillation). Remove the critical points (X(i),Y(i)) and (X(i+1),Y(i+1)) if: Define a minimal time interval T (duration) and a minimal vibration percentage P (oscillation). Remove the critical points (X(i),Y(i)) and (X(i+1),Y(i+1)) if:

10 Drawbacks of the Simple CPM The Simple CPM is too rough, the critical points are accessed in a local range (without looking ahead) The Simple CPM is too rough, the critical points are accessed in a local range (without looking ahead) Example of an exception: Example of an exception: In this example, it is assume that AB, AD and BE don’t satisfy the removing criteria of the simple CPM, but BC, CD, DE satisfy In this example, it is assume that AB, AD and BE don’t satisfy the removing criteria of the simple CPM, but BC, CD, DE satisfy

11 Drawbacks of the Simple CPM Another exception case: Another exception case: In this example, BC is assumed to be satisfy the removing criteria of simple CPM In this example, BC is assumed to be satisfy the removing criteria of simple CPM

12 Drawbacks of the Simple CPM Root of the drawback of simple CPM: Root of the drawback of simple CPM: Only testing the distance between two successive critical points to evaluate a vibration Only testing the distance between two successive critical points to evaluate a vibration The generalized CPM (GCPM) is proposed in this paper to overcome these shortcomings The generalized CPM (GCPM) is proposed in this paper to overcome these shortcomings

13 The Generalized CPM The time series is processed sequentially in the unit of three points (two minimal points and one maximal point) The time series is processed sequentially in the unit of three points (two minimal points and one maximal point) Important Reminder: in GCPM, the three points in a unit are not necessary to be successive critical points Important Reminder: in GCPM, the three points in a unit are not necessary to be successive critical points

14 The Generalized CPM Main issues of GCPM: Main issues of GCPM: How to choose the next three-point unit to be processed How to choose the next three-point unit to be processed How to choose preserved critical points How to choose preserved critical points

15 Outline of the GCPM

16 Initialization of GCPM All the local maximal/minimal points in a raw time series are extracted to form the initial critical point series: All the local maximal/minimal points in a raw time series are extracted to form the initial critical point series:

17 Data Representation of GCPM After constructing the initial critical point series C, a critical point selection criteria is applied to filter out the critical points corresponding to noise. Then the original time series is approximated by linear interpolating points between a maximal point and a minimal point After constructing the initial critical point series C, a critical point selection criteria is applied to filter out the critical points corresponding to noise. Then the original time series is approximated by linear interpolating points between a maximal point and a minimal point

18 The Critical Point Selection Criteria of GCPM The first and the last data point in the original time series are preserved as the first and last point in C The first and the last data point in the original time series are preserved as the first and last point in C Local maximal and local minimal points in the approximated series must appear alternately Local maximal and local minimal points in the approximated series must appear alternately

19 The Critical Point Selection Criteria of GCPM Selection is also based on the oscillation threshold P and the duration threshold T Selection is also based on the oscillation threshold P and the duration threshold T Consider P first, there are four cases Consider P first, there are four cases Both the rise and the decline oscillations exceed P Both the rise and the decline oscillations exceed P The rise over P, but the decline below P The rise over P, but the decline below P The decline over P, but the rise below P The decline over P, but the rise below P Neither the rise nor the decline over P. Neither the rise nor the decline over P.

20 Four Cases Regard to Oscillation

21 Second Layer Checking with Duration T For the oscillation below P but the duration above T, it still holds valuable trend information For the oscillation below P but the duration above T, it still holds valuable trend information Case 2 and Case 3 pass the duration T checking will be considered as Case 1 Case 2 and Case 3 pass the duration T checking will be considered as Case 1 For Case 4, if any side pass the duration T checking, the midpoint will be removed and choose the next test unit beginning with the current third point For Case 4, if any side pass the duration T checking, the midpoint will be removed and choose the next test unit beginning with the current third point

22 Process for Case 1 The first two points, i, i+1 will be preserved, and then the next unit will be i+2,i+3,i+4 The first two points, i, i+1 will be preserved, and then the next unit will be i+2,i+3,i+4

23 Process for Case 2 Two sub-cases Two sub-cases If Y(i+3) >= Y(i+1), the next unit will be i, i+3, i+4 If Y(i+3) >= Y(i+1), the next unit will be i, i+3, i+4 Otherwise, the next unit will be i, i+1, i+4 Otherwise, the next unit will be i, i+1, i+4

24 Process for Case 3 Two sub-cases Two sub-cases Y(i+3)>=Y(i+1) Y(i+3)>=Y(i+1) Y(i+3)<Y(i+1) Y(i+3)<Y(i+1) The next unit will always be i+2,i+3,i+4 because Y(i+2)<=Y(i) The next unit will always be i+2,i+3,i+4 because Y(i+2)<=Y(i)

25 Process for Case 4 Two sub-cases Two sub-cases Y(i)<=Y(i+2): next unit will be i, i+3, i+4 Y(i)<=Y(i+2): next unit will be i, i+3, i+4 Y(i)>Y(i+2): next unit will be i+2, i+3, i+4 Y(i)>Y(i+2): next unit will be i+2, i+3, i+4

26 Price Pattern Matching in GCPM Two types of patterns: Two types of patterns: The point-wise patterns The point-wise patterns The trend pattern The trend pattern

27 Price Pattern Matching in GCPM An example of finding a constraint H & S pattern An example of finding a constraint H & S pattern

28 Price Pattern Matching in GCPM Numerical formulation of the constraint H & S pattern Numerical formulation of the constraint H & S pattern

29 Probabilistic model based on GCPM for prediction After the data smoothing and GCPM process, five common technical analysis systems including 30 technical indicators are used to represent the each turning point. After the data smoothing and GCPM process, five common technical analysis systems including 30 technical indicators are used to represent the each turning point. Price pattern system Price pattern system Trendline system Trendline system Moving average system Moving average system RSI oscillator system RSI oscillator system Stochastic SlowK-SlowD oscillator system Stochastic SlowK-SlowD oscillator system The turning points and their technical indicators are used as training examples to learn the parameters of a probabilistic model based on the Markov Network The turning points and their technical indicators are used as training examples to learn the parameters of a probabilistic model based on the Markov Network

30 Probabilistic model based on GCPM for prediction The Markov Network The Markov Network Y = {true,false} represent whether a critical point is the real turning point Y = {true,false} represent whether a critical point is the real turning point X = {X1,X2,…,Xn}, Xi = {true,false} is a vector with Xi represents the i-th technical indicator and TRUE for the occurrence of the signal for the current critical point X = {X1,X2,…,Xn}, Xi = {true,false} is a vector with Xi represents the i-th technical indicator and TRUE for the occurrence of the signal for the current critical point

31 Probabilistic model based on GCPM for prediction The Markov Network Can be Converted to: The Markov Network Can be Converted to: For each indicator, if the corresponding rule Xi -> Y (~Xi V Y) is true, then fi(xi,y) = 1, otherwise fi(xi,y) = 0. The to-be-estimated parameter wi corresponds to each rule. For each indicator, if the corresponding rule Xi -> Y (~Xi V Y) is true, then fi(xi,y) = 1, otherwise fi(xi,y) = 0. The to-be-estimated parameter wi corresponds to each rule.

32 Optimization of Parameters The parameter wi of the probabilistic model is learned by optimizing the conditional log-likelihood (CLL): The parameter wi of the probabilistic model is learned by optimizing the conditional log-likelihood (CLL): n is the number of training samples. n is the number of training samples. After obtaining the optimal parameters, the inference step is calculated by using the Gibbs sampling method (a special Markov Chain Monte Carlo algorithm) After obtaining the optimal parameters, the inference step is calculated by using the Gibbs sampling method (a special Markov Chain Monte Carlo algorithm)

33 Experimental Results The approximation accuracy of GCPM, the normalized error (NE) is adopted as the metric The approximation accuracy of GCPM, the normalized error (NE) is adopted as the metric NE for approximating the prices of IBM NE for approximating the prices of IBM

34 Experimental Results Graphical comparison between the simple CPM and the proposed GCPM to model the IBM price series Graphical comparison between the simple CPM and the proposed GCPM to model the IBM price series

35 Experimental Results Test on Stock Trading: Test on Stock Trading: A simple trading rule: if the current reversal is from an uptrend to a downtrend over a certain probability estimated by the proposed model, then sell, and vice versa. With initial fund $1000 A simple trading rule: if the current reversal is from an uptrend to a downtrend over a certain probability estimated by the proposed model, then sell, and vice versa. With initial fund $1000 Trading log of ALCOA INC for 4 years Trading log of ALCOA INC for 4 years

36 Experimental Results Test the system on the CBOT Soybeans future prices from 1/5/1970 to 12/21/2006 Test the system on the CBOT Soybeans future prices from 1/5/1970 to 12/21/2006

37 Experimental Results The system is also evaluated for the simulated trades on 454 stocks of the S&P 500c. Then stocks are randomly picked and examine their profits on three periods The system is also evaluated for the simulated trades on 454 stocks of the S&P 500c. Then stocks are randomly picked and examine their profits on three periods

38 Conclusion This paper proposed a new financial time series representation method for prediction based on the generalized critical point model (GCPM) This paper proposed a new financial time series representation method for prediction based on the generalized critical point model (GCPM) The GCPM based representation is general and robust The GCPM based representation is general and robust Experimental results demonstrated that even in a period where a stock has a significant downtrend, the proposed method can still make profits. Experimental results demonstrated that even in a period where a stock has a significant downtrend, the proposed method can still make profits.

39 End of My Presentation Thank you! Thank you!


Download ppt "A Generalized Model for Financial Time Series Representation and Prediction Author: Depei Bao Presenter: Liao Shu Acknowledgement: Some figures in this."

Similar presentations


Ads by Google