Forecasting the Direction and Strength of Stock Market Movement



Similar documents
What is Candidate Sampling

Causal, Explanatory Forecasting. Analysis. Regression Analysis. Simple Linear Regression. Which is Independent? Forecasting

Forecasting the Demand of Emergency Supplies: Based on the CBR Theory and BP Neural Network

The Development of Web Log Mining Based on Improve-K-Means Clustering Analysis

An Alternative Way to Measure Private Equity Performance

L10: Linear discriminants analysis

An Evaluation of the Extended Logistic, Simple Logistic, and Gompertz Models for Forecasting Short Lifecycle Products and Services

Lecture 14: Implementing CAPM

Prediction of Stock Market Index Movement by Ten Data Mining Techniques

Traffic-light a stress test for life insurance provisions

Statistical Methods to Develop Rating Models

Single and multiple stage classifiers implementing logistic discrimination

benefit is 2, paid if the policyholder dies within the year, and probability of death within the year is ).

Online Appendix Supplemental Material for Market Microstructure Invariance: Empirical Hypotheses

Financial market forecasting using a two-step kernel learning method for the support vector regression

A study on the ability of Support Vector Regression and Neural Networks to Forecast Basic Time Series Patterns

Prediction of Disability Frequencies in Life Insurance

How To Calculate The Accountng Perod Of Nequalty

How To Find The Dsablty Frequency Of A Clam

On-Line Fault Detection in Wind Turbine Transmission System using Adaptive Filter and Robust Statistical Features

ECONOMICS OF PLANT ENERGY SAVINGS PROJECTS IN A CHANGING MARKET Douglas C White Emerson Process Management

Logistic Regression. Steve Kroon

Can Auto Liability Insurance Purchases Signal Risk Attitude?

PRACTICE 1: MUTUAL FUNDS EVALUATION USING MATLAB.

Probabilistic Linear Classifier: Logistic Regression. CS534-Machine Learning

1. Measuring association using correlation and regression

1 Example 1: Axis-aligned rectangles

Macro Factors and Volatility of Treasury Bond Returns

Exhaustive Regression. An Exploration of Regression-Based Data Mining Techniques Using Super Computation

Logistic Regression. Lecture 4: More classifiers and classes. Logistic regression. Adaboost. Optimization. Multiple class classification

A hybrid global optimization algorithm based on parallel chaos optimization and outlook algorithm

A DATA MINING APPLICATION IN A STUDENT DATABASE

Course outline. Financial Time Series Analysis. Overview. Data analysis. Predictive signal. Trading strategy

Bayesian Network Based Causal Relationship Identification and Funding Success Prediction in P2P Lending

Credit Limit Optimization (CLO) for Credit Cards

Regression Models for a Binary Response Using EXCEL and JMP

How To Understand The Results Of The German Meris Cloud And Water Vapour Product

Gender Classification for Real-Time Audience Analysis System

A Multi-mode Image Tracking System Based on Distributed Fusion

An Enhanced Super-Resolution System with Improved Image Registration, Automatic Image Selection, and Image Enhancement

THE efficient market hypothesis (EMH) asserts that financial. Predicting Financial Markets: Comparing Survey, News, Twitter and Search Engine Data

SIMPLE LINEAR CORRELATION

Support Vector Machines

Face Verification Problem. Face Recognition Problem. Application: Access Control. Biometric Authentication. Face Verification (1:1 matching)

Characterization of Assembly. Variation Analysis Methods. A Thesis. Presented to the. Department of Mechanical Engineering. Brigham Young University

A COLLABORATIVE TRADING MODEL BY SUPPORT VECTOR REGRESSION AND TS FUZZY RULE FOR DAILY STOCK TURNING POINTS DETECTION

) of the Cell class is created containing information about events associated with the cell. Events are added to the Cell instance

Transition Matrix Models of Consumer Credit Ratings

Forecasting and Modelling Electricity Demand Using Anfis Predictor

1. Introduction. Graham Kendall School of Computer Science and IT ASAP Research Group University of Nottingham Nottingham, NG8 1BB

The Application of Fractional Brownian Motion in Option Pricing

Learning the Best K-th Channel for QoS Provisioning in Cognitive Networks

A practical approach to combine data mining and prognostics for improved predictive maintenance

ESTIMATING THE MARKET VALUE OF FRANKING CREDITS: EMPIRICAL EVIDENCE FROM AUSTRALIA

BERNSTEIN POLYNOMIALS

Quantification of qualitative data: the case of the Central Bank of Armenia

Modelling of Web Domain Visits by Radial Basis Function Neural Networks and Support Vector Machine Regression

HARVARD John M. Olin Center for Law, Economics, and Business

Analysis of Premium Liabilities for Australian Lines of Business

CHOLESTEROL REFERENCE METHOD LABORATORY NETWORK. Sample Stability Protocol

Generalized Linear Models for Traffic Annuity Claims, with Application to Claims Reserving

Portfolio Loss Distribution

Project Networks With Mixed-Time Constraints

Intra-day Trading of the FTSE-100 Futures Contract Using Neural Networks With Wavelet Encodings

Support Vector Machine Model for Currency Crisis Discrimination. Arindam Chaudhuri 1. Abstract

Forecasting and Stress Testing Credit Card Default using Dynamic Models

Marginal Returns to Education For Teachers

Searching for Interacting Features for Spam Filtering

Performance Analysis and Coding Strategy of ECOC SVMs

CS 2750 Machine Learning. Lecture 3. Density estimation. CS 2750 Machine Learning. Announcements

Evaluation of the information servicing in a distributed learning environment by using monitoring and stochastic modeling

CHAPTER 14 MORE ABOUT REGRESSION

Lecture 5,6 Linear Methods for Classification. Summary

A Genetic Programming Based Stock Price Predictor together with Mean-Variance Based Sell/Buy Actions

An Interest-Oriented Network Evolution Mechanism for Online Communities

Spatiotemporal Event Forecasting in Social Media

Application of an Improved BP Neural Network Model in Enterprise Network Security Forecasting

Chapter 6. Classification and Prediction

Traffic State Estimation in the Traffic Management Center of Berlin

Detecting Credit Card Fraud using Periodic Features

Method for assessment of companies' credit rating (AJPES S.BON model) Short description of the methodology

AN ECONOMISTS' VIEW OF SCHOOLING SYSTEMS

Semantic Content Enrichment of Sensor Network Data for Environmental Monitoring

State Upgrades and Natural Rate of Cities

RESEARCH ON DUAL-SHAKER SINE VIBRATION CONTROL. Yaoqi FENG 1, Hanping QIU 1. China Academy of Space Technology (CAST)

High Correlation between Net Promoter Score and the Development of Consumers' Willingness to Pay (Empirical Evidence from European Mobile Markets)

Application of Quasi Monte Carlo methods and Global Sensitivity Analysis in finance

Forecasting the Sales of Music Albums: A Functional Data Analysis of Demand and Supply Side P2P Data

Adaptive Fractal Image Coding in the Frequency Domain

PSYCHOLOGICAL RESEARCH (PYC 304-C) Lecture 12

Addendum to: Importing Skill-Biased Technology

A DYNAMIC CRASHING METHOD FOR PROJECT MANAGEMENT USING SIMULATION-BASED OPTIMIZATION. Michael E. Kuhl RadhamΓ©s A. Tolentino-PeΓ±a

IMPACT ANALYSIS OF A CELLULAR PHONE

THE METHOD OF LEAST SQUARES THE METHOD OF LEAST SQUARES

THE DISTRIBUTION OF LOAN PORTFOLIO VALUE * Oldrich Alfons Vasicek

Kiel Institute for World Economics Duesternbrooker Weg Kiel (Germany) Kiel Working Paper No. 1120

A PREDICTIVE MODEL FOR CUSTOMER PURCHASE BEHAVIOR IN E-COMMERCE CONTEXT

Learning from Large Distributed Data: A Scaling Down Sampling Scheme for Efficient Data Processing

Covariate-based pricing of automobile insurance

The Greedy Method. Introduction. 0/1 Knapsack Problem

Transcription:

Forecastng the Drecton and Strength of Stock Market Movement Jngwe Chen Mng Chen Nan Ye cjngwe@stanford.edu mchen5@stanford.edu nanye@stanford.edu Abstract - Stock market s one of the most complcated systems n the world, and t has connecton wth almost every part n our lfe. In ths paper, we appled dfferent Machne Learnng methods to predct the drecton and strength of the market ndex prce movement. Specfcally, we looked at Multnomal Logstc Regresson, K- nearest neghbors algorthm, Lnear Dscrmnant Analyss, Quadratc Dscrmnant Analyss, and Multclass Support Vector Machne, and compared ther performance results based on test accuracy, robustness, and run- tme effcency.. Introducton Stock market movement predcton s a challengng task because of the hgh data ntensty, nose, hdden structures, and the hgh correlaton wth the whole world. In addton to forecastng the movement predcton, we also tred to predct the movement strength of stock market at the same tme. We started wth a bref descrpton of the response and the predctors, whch we thnk are relevant, and dd feature selecton based on the correlaton coeffcents between them. Fnally, we appled dfferent Machne Learnng methods to tran the data and make predctons. The data s from Yahoo! Fnance and Federal Reserve Bank of St. Lous. 2. Dataset The response n our models s based on the hstorcal data of S&P 5 Index. We dvded the returns of S&P 5 Index nto four categores based on our segment threshold δ as followng: (, δ],( δ,],(,δ],(δ,+ ). We marked them wth Class, 2, 3 and 4, so that we can ntegrate the nformaton about stock market movement and ts strength together. Our predctors nclude the lagged change rates of followng ndces - S&P 5 Index, US Dollar Index, Volatlty Index (VIX), FTSE Index, Nkke 225 Index, Hang Seng Index, Shangha Stock Exchange Composte Index, S&P 5 Index Volume, S&P 5 Index hghest prce change rate durng the perod, S&P 5 Index lowest prce change rate, 3-Month T-Blls Rate, -Year T-Notes Rate and Intal Jobless Clams. The range of the data s from 2/28/99 to //23. Therefore, there are 5758 observatons n the daly data and 58 observatons n the weekly data. 3. Evaluaton Metrc We set asde the last 2 observatons n our data sets as the test data because we only care about the predctablty of our models n the recent perod and the best model mght change as tme fles. We traned our models on the data based on dfferent tranng dataset sze and dfferent segment thresholds and then appled the coeffcents we obtaned to make predctons on the test data. We use test precson defned as () () () () () {y pred = y actual }/ {y actual }, where y and pred y are the -th predcted response and the - actual th actual response. Also, we looked at the test precson based on the probablty of Class 4 occurrng when we predct the response s 4,.e., P(Y actual = 4 Y pred = 4) () {y pred () = y actual () {y pred The realzed dstrbutons of our test set on the 4 categores are shown below. Realzed Dstrbuton of Test Sample (Daly) = 4}. = 4} Realzed Dstrbuton of Test Sample (Weekly).8.8.6.6 Dstrbuton.4.2 Dstrbuton.4.2.5..5 4 3 2 Category..2.3 4 3 Category 2

4. Multnomal Logstc Regresson Multnomal Logstc Model wth four categores has three logt functons: πΏπ‘œπ‘”π‘–π‘‘ πΉπ‘’π‘›π‘π‘‘π‘–π‘œπ‘› π‘“π‘œπ‘Ÿ π‘Œ = 𝑖 π‘Ÿπ‘’π‘™π‘Žπ‘‘π‘–π‘£π‘’ π‘‘π‘œ π‘™π‘œπ‘”π‘–π‘‘ π‘“π‘’π‘›π‘π‘‘π‘–π‘œπ‘› π‘“π‘œπ‘Ÿ π‘Œ = 4, 𝑖 =,2,3 whle Class Y = 4 s the reference group. So we can wrte the logt functons as the followng: π‘™π‘œπ‘” 𝑔 π‘Œ = 𝑖 = 𝐴! + 𝐡!! 𝑋! + + 𝐡!" 𝑋!, π‘™π‘œπ‘” 𝑔 π‘Œ = 4 = π‘™π‘œπ‘” =, 𝑖 =,2,3 where 𝐴! and 𝐡!" are the regresson coeffcents. The Multnomal Logstc Functons are then defned as: 𝑔 π‘Œ=𝑖, 𝑔 π‘Œ = +𝑔 π‘Œ =2 +𝑔 π‘Œ =3 + 𝑓 π‘Œ=4 =. 𝑔 = +𝑔 π‘Œ =2 +𝑔 π‘Œ =3 + 𝑓 π‘Œ=𝑖 = 𝑖 =,2,3 We then only need to compare the four Logstc Functons and pck the greatest one as the predcted category. The out-of-sample category predcton results based on daly and weekly data are shown below. MLR: Overall (Weekly).7.7.6.6 MLR: Overall (Daly).5.4.5.4.3.3.2 3.2 8.5 2.3 6. 4.5. 2 MLR: 4th Class (Weekly) MLR: 4th Class (Daly).8.8.6.6.2.4.2 3.4.2.5 2. 8.3 6 4.5.2. 2 The frst row of graphs presents the overall category predcton results based on our MLR model. As the segment threshold ncreases (above.5% for daly and % for weekly), both daly and weekly data perform better; however, the performance of weekly data s less volatle than the daly data, and weekly data generally yelds a better performance wth respect to the same level of realzed dstrbuton of the test sample we use.

The stuaton n the second row s smlar to that of the frst row. In terms of the 4 th Class (.e. Y = 4 or Extreme Postve), weekly-data-based model sgnfcantly outperforms the one based on daly data wth respect to both accuracy rate and relablty. Therefore, weekly-data-based MLR model s more prosperous and relable for real-world real-tme predcton. 5. Lnear Dscrmnant Analyss We appled both lnear dscrmnant analyss (LDA) and quadratc dscrmnant analyss (QDA) to model the data. QDA assumes that each class has ts own covarance matrx. Consequently, LDA has lower varance, whch leads to mproved predcton performance. As we performed both models, we found out that LDA substantally outperforms QDA. Thus, we wll only present the LDA model here. Wth dfferent values of tranng sze and segment threshold, the overall and 4 th Class test precsons wth weekly and daly data are shown as below. LDA: overall (daly) LDA: overall (weekly).5.5.4.3.2.45.4.35.3.25. 3 2.5..5.2 5..2.3 LDA: 4th class (daly) LDA: 4th class (weekly).8.7.6.6.4.2.5.4.3 3 2.5..5.2 5..2.3 As can be seen from the fgures above, weekly data performs better than daly data and the test precson does not change sgnfcantly wth dfferent values of tranng szes. However, t severely depends on the segment threshold value. It s worthy to note that, when threshold becomes larger, the observaton n Class 3 wll ncrease and our model tends to predct Class 3, thus the overall precson ncreases whle the 4 th Class precson drops. 6. K-Nearest Neghbors Algorthm We performed senstvty analyss wth dfferent values of K and t turned out that K= would be a reasonable choce. Wth dfferent values of tranng sze and segment threshold, the overall and 4th Class test precsons wth weekly and daly data are shown below.

KNN: overall (daly) KNN: overall (weekly).7.6.6.5.5.4.3.4.3.2 3 2.5..5.2 5..2.3 KNN: 4th class (daly) KNN: 4th class (weekly).8.7.6.6.4.2.5.4.3 3 2.5..5.2 5..2.3 We can see that KNN model underperforms LDA model and shows bad results for medum segment threshold values, nor s ts predcton accuracy for 4 th class satsfyng. Besdes, the runnng speed s also much lower than LDA. Therefore, we recommend LDA to model data. 7. Multclass Support Vector Machne The last model we used s the Multclass SVM Model, whch conssts of the precedng observatons of the test pont. Because we have 2 test ponts, so we should tran our models for 2 tmes and make predctons separately. We appled the same segment thresholds to categorze the returns of S&P 5 Index, except that we changed the range and the sze of step. We traned our models on the scaled and non-scaled daly data and weekly data, and we also appled dfferent kernels to the model, ncludng lnear kernel, polynomal kernel, radal bass functon kernel, and sgmod kernel. After tryng out all the kernels above, however, we dscovered that the lnear kernel and the polynomal kernel do not apply to ths problem, and sgmod kernel behaves smlar to radal bass functon kernel. Moreover, the outcome of daly data s smlar to that of weekly data. Therefore, we only show the results of our SVM models usng radal bass functon kernel on daly data. The results of our Multclass SVM are shown below.

Multclass SVM: Overall (nonscaled) Multclass SVM: overall (scaled).7.7.6.5.4.3.6.5.4.2.5.5 5.5. 5.5. We can see that scaled predctors perform more robust than non-scaled predctors because the range of test precsons s narrower on scaled predctors. Also, we can conclude as before that the tranng sze has lttle effect on the test precson whle segment threshold affects the test precson sgnfcantly. In addton, we can acheve more than 6% test precson f we choose a proper segment threshold no matter whether we scale the predctors. 8. Concluson Based on the results from dfferent machne learnng methods, we can see that Multnomal Logstc Regresson performs the best n all the models n terms of the model robustness, predcton precson, and run-tme effcency. All the models perform better on the weekly data than on the daly data. For Multclass SVM, scaled predctors can mprove the robustness of the model n the predcton. Reference G.James, D.Wtten, T.Haste, R.Tbshran (29). An Introducton to Statstcal Learnng. Sprnger. R.Choudhry, K.Grag (28). A Hybrd Machne Learnng System for Stock Market Forecastng. World Academy of Scence, Engneerng and Technology, 5. W.Huang, Y.Nakamor, S.Wang (25). Forecastng stock market movement drecton wth support vector machne. Computers & Operatons Research, 32, pp. 253 2522.