In this project, under the guidance of Dr. Kushal Kr. Shah, at the Indian Institute of Science Education and Research, Bhopal, we aim to classify financial instruments into one of sector based categories. We will use a dataset that contains various financial indicators such as price, volume, and volatility. We will develop a multi-class classification model using Support Vector Machines (SVM), Random Forest, K-Nearest Neighbor and Multilayer Neural Network to predict the company's category.
Problems Attempted :
- Sectorwise Classification.ipynb : This file shows a multiclass classification of NIFTY 50 companies sector-wise using daily stock data which can be used by a beginner in Machine Learning as a starter to get an idea of structuring a complete Machine Learning project including data collection (unlike competitions), data cleaning and making a prediction model on it.
The stock data used here, is of the companies on the NIFTY 50 index, National Stock Exchange of India's benchmark broad based stock market index for the Indian equity market, which has been dowloaded using the Quandl API, and the ticker symbols of the companies from wiki. To train the models on some other company data, search for those companies on Quandl and grab their QuandlCodes and replace the eisting codes with them. e.g. the QuandlCode for the company "Adaniports" is "NSE/ADANIPORTS" where NSE stands for National Stock Exchange.
In order to run these scripts, you'll need the following libraries.
- Tensorflow
- Pandas
- Numpy
- Scikit-learn
- Quandl with a free and email-verified account
- Seaborn
- Matplotlib
The easiest way to install TensorFlow as well as all the other libraries is to start with the Anaconda Python distribution.
-
Follow the installation instructions for Anaconda Python. We recommend using Python 3.6.
-
Follow the platform-specific TensorFlow installation instructions. Be sure to follow the "Installing with Anaconda" process, and create a Conda environment named
tensorflow
. -
If you aren't still inside your Conda TensorFlow environment, enter it by opening your terminal and typing
source activate tensorflow
-
If you haven't done so already, download and unzip this entire repository from GitHub, either interactively, or by entering
git clone https://github.com/RakshitMeshram/ML-for-Finance
-
Use
cd
to navigate into the top directory of the repo on your machine -
Launch Jupyter by entering
jupyter notebook
and, using your browser, navigate to the URL shown in the terminal output (usually http://localhost:8888/)