Modeling Dependence of Daily Stock Prices and Making Predictions of Future Movements

Similar documents
Support Vector Machines. Introduction to Data Mining, 2 nd Edition by Tan, Steinbach, Karpatne, Kumar

Support Vector Machine

Support Vector Machine (continued)

Support Vector Machine (SVM) and Kernel Methods

Jeff Howbert Introduction to Machine Learning Winter

Support Vector Machine. Industrial AI Lab. Prof. Seungchul Lee

Support Vector Machine (SVM) and Kernel Methods

Support Vector Machine. Industrial AI Lab.

Lecture 10: A brief introduction to Support Vector Machine

Support Vector Machines

Introduction to Support Vector Machines

Outline. Basic concepts: SVM and kernels SVM primal/dual problems. Chih-Jen Lin (National Taiwan Univ.) 1 / 22

Support Vector Machine (SVM) and Kernel Methods

Machine Learning Support Vector Machines. Prof. Matteo Matteucci

CS798: Selected topics in Machine Learning

L5 Support Vector Classification

Linear vs Non-linear classifier. CS789: Machine Learning and Neural Network. Introduction

Introduction to SVM and RVM

Support Vector Machines (SVM) in bioinformatics. Day 1: Introduction to SVM

Support Vector Machine (SVM) & Kernel CE-717: Machine Learning Sharif University of Technology. M. Soleymani Fall 2012

Introduction to Support Vector Machines

Stat542 (F11) Statistical Learning. First consider the scenario where the two classes of points are separable.

Review: Support vector machines. Machine learning techniques and image analysis

Support Vector Machines

Support Vector Machines

Perceptron Revisited: Linear Separators. Support Vector Machines

Statistical Pattern Recognition

Non-Bayesian Classifiers Part II: Linear Discriminants and Support Vector Machines

Support Vector Machines. Maximizing the Margin

ML (cont.): SUPPORT VECTOR MACHINES

Chapter 9. Support Vector Machine. Yongdai Kim Seoul National University

Statistical Methods for SVM

Support Vector Machines and Kernel Methods

Statistical Methods for NLP

Support Vector Machines and Speaker Verification

Linear Support Vector Machine. Classification. Linear SVM. Huiping Cao. Huiping Cao, Slide 1/26

Cheng Soon Ong & Christian Walder. Canberra February June 2018

Statistical Machine Learning from Data

Lecture Notes on Support Vector Machine

Machine Learning. Support Vector Machines. Manfred Huber

Support Vector Machines

(Kernels +) Support Vector Machines

CIS 520: Machine Learning Oct 09, Kernel Methods

Machine Learning. Lecture 6: Support Vector Machine. Feng Li.

Statistical learning theory, Support vector machines, and Bioinformatics

Kernel Methods and Support Vector Machines

Support Vector and Kernel Methods

Incorporating detractors into SVM classification

Linear classifiers selecting hyperplane maximizing separation margin between classes (large margin classifiers)

Learning with kernels and SVM

Lecture 10: Support Vector Machine and Large Margin Classifier

Support Vector Machines

Pattern Recognition 2018 Support Vector Machines

Support Vector Machines. CSE 6363 Machine Learning Vassilis Athitsos Computer Science and Engineering Department University of Texas at Arlington

Support Vector Machine & Its Applications

Support Vector Machines

Support Vector Machines

Linear Classification and SVM. Dr. Xin Zhang

CS6375: Machine Learning Gautam Kunapuli. Support Vector Machines

Support Vector Machines II. CAP 5610: Machine Learning Instructor: Guo-Jun QI

10/05/2016. Computational Methods for Data Analysis. Massimo Poesio SUPPORT VECTOR MACHINES. Support Vector Machines Linear classifiers

Support Vector Machines Explained

SUPPORT VECTOR MACHINE

Linear & nonlinear classifiers

Support Vector Machines.

Max Margin-Classifier

Neural Networks. Prof. Dr. Rudolf Kruse. Computational Intelligence Group Faculty for Computer Science

Kernel Machines. Pradeep Ravikumar Co-instructor: Manuela Veloso. Machine Learning

CS , Fall 2011 Assignment 2 Solutions

Foundation of Intelligent Systems, Part I. SVM s & Kernel Methods

Linear & nonlinear classifiers

Convex Optimization in Classification Problems

Soft-Margin Support Vector Machine

Support Vector Machines, Kernel SVM

STATE GENERALIZATION WITH SUPPORT VECTOR MACHINES IN REINFORCEMENT LEARNING. Ryo Goto, Toshihiro Matsui and Hiroshi Matsuo

SVMC An introduction to Support Vector Machines Classification

Data Mining. Linear & nonlinear classifiers. Hamid Beigy. Sharif University of Technology. Fall 1396

Support Vector Machines

Machine Learning, Fall 2011: Homework 5

Indirect Rule Learning: Support Vector Machines. Donglin Zeng, Department of Biostatistics, University of North Carolina

CS4495/6495 Introduction to Computer Vision. 8C-L3 Support Vector Machines

Support Vector Machines

Modelli Lineari (Generalizzati) e SVM

SVM optimization and Kernel methods

Support Vector Machine

Introduction to Machine Learning

Neural networks and support vector machines

Support Vector Machines for Classification: A Statistical Portrait

Pattern Recognition and Machine Learning. Perceptrons and Support Vector machines

Polyhedral Computation. Linear Classifiers & the SVM

Machine Learning. Kernels. Fall (Kernels, Kernelized Perceptron and SVM) Professor Liang Huang. (Chap. 12 of CIML)

This is an author-deposited version published in : Eprints ID : 17710

Kernels and the Kernel Trick. Machine Learning Fall 2017

Support'Vector'Machines. Machine(Learning(Spring(2018 March(5(2018 Kasthuri Kannan

MATH 829: Introduction to Data Mining and Analysis Support vector machines and kernels

Data Mining - SVM. Dr. Jean-Michel RICHER Dr. Jean-Michel RICHER Data Mining - SVM 1 / 55

LINEAR CLASSIFICATION, PERCEPTRON, LOGISTIC REGRESSION, SVC, NAÏVE BAYES. Supervised Learning

Machine learning comes from Bayesian decision theory in statistics. There we want to minimize the expected value of the loss function.

Convex Optimization and Support Vector Machine

Support Vector Machines: Kernels

Transcription:

Modeling Dependence of Daily Stock Prices and Making Predictions of Future Movements Taavi Tamkivi, prof Tõnu Kollo Institute of Mathematical Statistics University of Tartu 29. June 2007 Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future Movemen 1 / 14

Methods of stock analysis Methods which predict the direction and amplitude of future movements of stock prices are divided into two groups they are fundamental and technical analysis. Fundamental analysis examines the reasons of price movements the possible value of company, growth potential, economical environment, etc. Technical analysis deals with the results of price movements. It searches known patterns from graphs and assumes that these patterns will recur. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future Movemen 2 / 14

Figure: Indicators of technical analysis (Google stock) Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future Movemen 3 / 14

Copulas Copulas are functions that join one-dimensional CDF-s of random variables with their multivariate distribution. On the other hand, copulas are the CDF-s with marginals that have standard uniform distributions. Definition With given random vector (X, Y ), its CDF H(x, y) and marginal CDF-s F(x) ja G(y), we call a function C(u, v), which is defined as C(u, v) = H(F 1 (u), G 1 (v)), a copula. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future Movemen 4 / 14

Definition of some copulas Definition Function C(u, v) which is given by C(u, v) = B(Q 1 (u), Q 1 (v), r), where B is a CDF of bivariate normal distribution, Q 1 is an inverse of CDF of normal distribution and r is a linear correlation coefficient, is called a Gaussian copula. Definition Let the φ be a convex function given in (0, ) which is increasing in (0, 1] and φ(1) = 0. Let the inverse of φ denoted as a φ 1. Then we call a function C φ (u, v) = φ 1 (φ(u) + φ(v)), where u, v (0, 1] as an Archimedean copula and a function φ is its generator. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future Movemen 5 / 14

The problem of classification Classification is a categorization of the given object into one of given classes. Description of the object and its possible classes are given to the classifier as an input and it has to decide the correct class of the object. Let the description of the object be given with the feature vector x R n and the set of possible classes be denoted as follows Y = {0, 1,...,k 1}. Now we can present the classifier as a function g: g : R n Y. (1) Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future Movemen 6 / 14

Marginal methods Definition Let us have a random multivariate sample (x 1,...,x l ), x i R n with a given classes y i { 1, 1} (we know, into which class each element belongs to). If there exists a vector φ and a constant c such that y i (φ x i + c) 0 for each pair of (x i, y i ) then we say that we have a linearly separable sample. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future Movemen 7 / 14

Marginal methods Let us have a hyperplane that is located between the two classes of sample elements and its distance from each class is maximal. Assume that this hyperplane could be the best classifier for the linearly separable sample. For each φ we define a c 1 (φ) = min yi =1 x i, φ, c 2 (φ) = max yj = 1 x j, φ and a vector φ 0, which maximizes the equation ρ(φ) = c 1(φ) c 2 (φ) 2, φ = 1 Variable ρ(φ) is a distance between the hyperplane and the nearest sample element, lets call it a marginal. Such φ 0 and a constant c 0 = c 1(φ 0 )+c 2 (φ 0 ) 2 define the optimal hyperplane which has a maximal marginal. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future Movemen 8 / 14

Marginal methods Figure: Optimal hyperplane divides the sample and has a maximal marginal. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future Movemen 9 / 14

Marginal methods we can find an optimal hyperplane by solving the dual equation of Lagrange functional. It comes out that only some elements from the sample define the optimal hyperplane they are the ones that are the nearest to this hyperplane. These elements are called as a support vectors and they are denoted by SV. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future10 Movemen / 14

Support Vector Machines The idea of Support Vector Machines (SVM) is simple: Using some nonlinear mapping Φ : R n Z we project the elements of the sample x i, i = 1,...,l, x i R n into higher-dimensional feature space Z. Then we find Then we find a optimal hyperplane in Z, which separates the sample Φ(x 1 ),...,Φ(x l ). This hyperplane is nonlinear in the original space of feature vector x. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future11 Movemen / 14

Support Vector Machines Using SVM-s we get that the decision rule (classifier) in original space is given by f (x, α) = sign ( i SV y iα 0 i K(x, x i) + b ), where α 0 i and b are parameters found by solving optimization problem and K(x, x i ) is a predefined function. Function K is called kernel and it defines an inner product for space Z. The shape of kernel K is given by statistician and it depends on the type of data (it has to be positively semi-defined). ) I used Gaussian kernel: K(x, y) = exp ( x y 2 and polynomial 2σ 2 kernel: K(x, y) = (x y + R) p. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future12 Movemen / 14

Modeling we look the history of IBM corp. stock data 6210 days which are devided into training sample (to solve the optimization problem and find the optimal hyperplane) and test sample (to test the accuracy of the model. for the model we take the volume and price of the stock data in days i, i 1,...,i 19 and use them as an input data. For each day we have: ln ratio of closing prices in sequential days; ln ratio of opening and closing price in one day; ln ratio of maximal price and closing price in one day; ln ratio of minimal price and closing price in one day; ln ratio of volumes in sequential days. Trading day i belongs to class y i = 1, if the stock price in next day increased and into class y i = 1, if the price decreased. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future13 Movemen / 14

Classification We used Gaussian and Archimedean copula and SVM-s with Gaussian and polynomial kernel for data classification. The dimension of the input vector was different: for SVM-s it was 100, for copulas 2 and 3. We trained the models using training sample and tested them on test sample, but non of models gave good results. For all of them the accuracy of classifying test data was below 54%. Taavi Tamkivi, prof Tõnu Kollo (Institute ofmodeling Mathematical Dependence Statistics of University Daily Stockof Prices Tartu) and Making Predictions 29. June 2007 of Future14 Movemen / 14