Analytics Vidhya
Published in

Analytics Vidhya

How to build a simple Stock Movement Classifier

This post shall explore the steps involved in building a Stock Movement Classifier.

Photo by Chris Liverani on Unsplash

Business Case

Process adopted

Data Understanding

Clean and Visualize

Volume data
Price data

Feature Engineering

Are the features correlated?

Correlation matrix — features

Whether historical price and volume data can serve as potential features?

Whether market volatility has any correlation with the prices of a given stock and whether can be used as a feature?

Scaling and splitting the features

Training the classifier

Confusion Matrix

Tuning the parameters

Accuracy scores at different tree sizes

Comparing Models

Confusion Matrix of Support Vector Classifier

Validation

Confusion Matrix of out-of-sample data

So, can we use ML Classifiers to predict the daily stock movement?

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Zain Farrukh

A finance professional with keen interest in solving business problems using data science.