Upload
nikola-milosevic
View
143
Download
4
Embed Size (px)
Citation preview
Forecasting equity using Machine Learning
Nikola Milošević
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
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)
Other approaches
© Copyright 2016 MUTIS. All rights reserved 2016.
• Models inspired by Graham’s
• Following news and trends
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
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
Machine learning intro
© Copyright 2016 MUTIS. All rights reserved 2016.
• Field of study that gives computers the ability
to learn without being explicitly programmed
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…
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
Results (1)
© Copyright 2016 MUTIS. All rights reserved 2016.
• Trial with all financial indicators as a features
Results (2)
© Copyright 2016 MUTIS. All rights reserved 2016.
• We performed feature selection among the
indicators
• Experiment with only 11 indicators
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
Best performer
© Copyright 2016 MUTIS. All rights reserved 2016.
Decision trees (1)
© Copyright 2016 MUTIS. All rights reserved 2016.
• Tries to understand the data and build a decision
tree based on data
Decision trees (2)
© Copyright 2016 MUTIS. All rights reserved 2016.
Outlook
Sunny Overcast Rain
Decision trees (3)
Outlook
Sunny Overcast Rain
Humidity
High Normal
Don’t play Play
Wind
Weak Strong
Play Don’t play
Play
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
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
Example
© Copyright 2016 MUTIS. All rights reserved 2016.
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
Thank you and questions
© Copyright 2016 MUTIS. All rights reserved 2016.