- This project aims to predict directional agreement of Nifty-50 stock on per minute basis.
Algorithm of web scrapping and more:
After dropping unnecessary features we were left with following features:
- Time
- Close
- High
- Low
- Volume
Out of which we used High and Low to calculate another feature which determines the overall fluctuation within that 1 minute timespan.
Final dataset looked like below:
We performed percentage change operation over all features except time, to normalize the data.
We performed scaling on the normalized data. Here we used StandarScaler which by default scales the data using Normal distribution.
As LSTM requires sequential data, we created a sliding window of size 60. By using the sliding window we generated all possible sequences of 60 from the dataset.
We shifted the Close feature by 3 unites and then did compare it with the original column. If the data in future is higher than the current data then we labeled it as "1". If the data in future is lower than the current data then we labeled it as "0".
We made sure that there are equal amounts of data points for both categories. Therefore, avoiding the biasing in the model.