equity forecast using machine learning - mutis

21
Forecasting equity using Machine Learning Nikola Milošević

Upload: nikola-milosevic

Post on 16-Apr-2017

144 views

Category:

Economy & Finance


4 download

TRANSCRIPT

Page 1: Equity forecast using Machine Learning - MUTIS

Forecasting equity using Machine Learning

Nikola Milošević

Page 2: Equity forecast using Machine Learning - MUTIS

Goal

© Copyright 2016 MUTIS. All rights reserved 2016.

• Predict long term equity price movement

• One year period

• Classify which equities will grow by 10%

• Past data are known

• Focus on technical analysis

Page 3: Equity forecast using Machine Learning - MUTIS

Traditional approach

© Copyright 2016 MUTIS. All rights reserved 2016.

• Graham criteriaStock Selection for the Defensive Investor:1. Not less than $100 million of annual sales.[Note: This works out to $500 million today based on the difference in CPI/Inflation from 1971]2-A. Current assets should be at least twice current liabilities.2-B. Long-term debt should not exceed the net current assets.3. Some earnings for the common stock in each of the past 10 years.4. Uninterrupted [dividend] payments for at least the past 20 years.5. A minimum increase of at least one-third in per-share earnings in the past 10 years.6. Current price should not be more than 15 times average earnings.7. Current price should not be more than 1-1⁄2 times the book value.

• Graham number = sqrt(22.5*EPS*BV)

Page 4: Equity forecast using Machine Learning - MUTIS

Other approaches

© Copyright 2016 MUTIS. All rights reserved 2016.

• Models inspired by Graham’s

• Following news and trends

Page 5: Equity forecast using Machine Learning - MUTIS

Problems with Graham model

© Copyright 2016 MUTIS. All rights reserved 2016.

• It was developed in 1940s

• It is hard to find a stock that satisfies criteria

• Too strict

• Too defensive

Page 6: Equity forecast using Machine Learning - MUTIS

Help from technology

© Copyright 2016 MUTIS. All rights reserved 2016.

• In past decade were developed approaches

based on technology

• Algorithms based on statistics, heuristics,

probability and machine learning

• They mainly focused in the past on short

term trading

Page 7: Equity forecast using Machine Learning - MUTIS

Machine learning intro

© Copyright 2016 MUTIS. All rights reserved 2016.

• Field of study that gives computers the ability

to learn without being explicitly programmed

Page 8: Equity forecast using Machine Learning - MUTIS

Experiment (1)

© Copyright 2016 MUTIS. All rights reserved 2016.

• Use machine learning on past 2-3 year data

• Data obtained using Bloomberg terminal

• Data include 28 indicators • Book value, Market capitalization, Change of stock Net price over the one

month period, Percentage change of Net price over the one month period,

Dividend yield, Earnings per share, Earnings per share growth, Sales revenue

turnover, Net revenue, Net revenue growth, Sales growth, Price to earnings

ratio, Price to earnings ratio -five years average, Price to book ratio, Price to

sales ratio, Dividend per share, Current ratio, Quick ratio, Total debt to equity,

margins, asset turnover…

Page 9: Equity forecast using Machine Learning - MUTIS

Experiment (2)

© Copyright 2016 MUTIS. All rights reserved 2016.

• Selected 1739 stocks from different indexes (S&P

1000, FTSE 100 and S&P Europe 350…)

• Calculated which ones price grew more than 10%

• Used different Machine learning algorithms and

10 fold cross validation for evaluation

• Used Python for scripting and Weka toolkit for

machine learning

Page 10: Equity forecast using Machine Learning - MUTIS

Results (1)

© Copyright 2016 MUTIS. All rights reserved 2016.

• Trial with all financial indicators as a features

Page 11: Equity forecast using Machine Learning - MUTIS

Results (2)

© Copyright 2016 MUTIS. All rights reserved 2016.

• We performed feature selection among the

indicators

• Experiment with only 11 indicators

Page 12: Equity forecast using Machine Learning - MUTIS

11 indicators that were good

© Copyright 2016 MUTIS. All rights reserved 2016.

• The performance turned out not to be significantly

different, but it showed that only 11 indicators are

enough

Page 13: Equity forecast using Machine Learning - MUTIS

Best performer

© Copyright 2016 MUTIS. All rights reserved 2016.

Page 14: Equity forecast using Machine Learning - MUTIS

Decision trees (1)

© Copyright 2016 MUTIS. All rights reserved 2016.

• Tries to understand the data and build a decision

tree based on data

Page 15: Equity forecast using Machine Learning - MUTIS

Decision trees (2)

© Copyright 2016 MUTIS. All rights reserved 2016.

Outlook

Sunny Overcast Rain

Page 16: Equity forecast using Machine Learning - MUTIS

Decision trees (3)

Outlook

Sunny Overcast Rain

Humidity

High Normal

Don’t play Play

Wind

Weak Strong

Play Don’t play

Play

Page 17: Equity forecast using Machine Learning - MUTIS

Random forests

© Copyright 2016 MUTIS. All rights reserved 2016.

• Algorithm that creates a forest of decision trees

• Designed to improve the stability and accuracy of

machine learning algorithms

• Reduces variance and helps to avoid overfitting

• Uses technique called bagging

Page 18: Equity forecast using Machine Learning - MUTIS

Bagging

© Copyright 2016 MUTIS. All rights reserved 2016.

• From a set of elements, creates n sets of

elements (in our case randomly)

• Builds n models using subsets for each model

• In order to get final class uses voting strategy

• Class with majority of votes wins

Page 19: Equity forecast using Machine Learning - MUTIS

Example

© Copyright 2016 MUTIS. All rights reserved 2016.

Page 20: Equity forecast using Machine Learning - MUTIS

Reference

© Copyright 2016 MUTIS. All rights reserved 2016.

• Milosevic, Nikola. "Equity forecast: Predicting long

term stock price movement using machine

learning." arXiv preprint arXiv:1603.00751 (2016).• https://arxiv.org/ftp/arxiv/papers/1603/1603.00751.pdf

Page 21: Equity forecast using Machine Learning - MUTIS

Thank you and questions

© Copyright 2016 MUTIS. All rights reserved 2016.

[email protected]