项目作者: Sanket-Kumbhare

项目描述 :
Predicting Closing price of Nifty-fifty companies
高级语言: Jupyter Notebook
项目地址: git://github.com/Sanket-Kumbhare/Nifty-Prediction.git
创建时间: 2021-03-20T22:02:48Z
项目社区:https://github.com/Sanket-Kumbhare/Nifty-Prediction

开源协议:

下载


Stock Price Prediction of Nifty 50 Companies

Group members

  • Nihal N. Bhopatrao (Roll No. 5)
  • Sanket R. Kumbhare (Roll No. 36)
  • Shashank D. Wankhede (Roll No. 59)

Project Guide

- Prof. A. S. Kunte

Content

Main Directory

  1. Nifty-Prediction
  2. └───Documents
  3. └───Nifty-50-Prediction
  4. └───models
  5. └───Screenshots

1. Documents Folder

Contains Reports, PPT and Project diaries of 7th and 8th semester.

Documents Directory

  1. Documents
  2. | 7th sem project diary smpp.pdf
  3. | PPT Sem8 Stock Market Prediction.pdf
  4. | Project Report Stock Market Prediction.pdf
  5. | Sem 8 Project Diary.pdf
  6. | Sem8 report stock Price Prediction.pdf
  7. | Stock Market Prediction PPT-converted.pptx

2. Nifty-50-Prediction Folder

Contains following Django Project files and folders.
Nifty-50-Prediction Directory

  1. Nifty-50-Prediction
  2. └───Stock_Prediction
  3. └───lstm
  4. └───stock
  5. | db.sqlite3
  6. | manage.py
  7. | nifty50Companies.csv
  • Stock_Prediction

    The Django project holds some configurations that apply to the project as a whole, such as project settings, URLs, shared templates and static files. Each application can have its own database and has its own functions to control how the data is displayed to the user in HTML templates.\
    Stock_Prediction Directory
    1. Stock_Prediction
    2. | __init__.py
    3. | asgi.py
    4. | settings.py
    5. | urls.py
    6. | wsgi.py
  • lstm

    It is special kind of recurrent neural network that is capable of learning long term dependencies in data. This is achieved because the recurring module of the model has a combination of four layers interacting with each other.\
    lstm Directory
    1. lstm
    2. | RunModel.py
    3. | TrainModel.py
    4. | lstmModel_final.json
    5. | weights_final.h5
    Our LSTM model \
    following code is from TrainModel.py
    1. model = Sequential()
    2. model.add(LSTM(64, activation='relu', return_sequences=True,input_shape=(n_steps, n_features)))
    3. model.add(LSTM(64, activation='relu'))
    4. model.add(Dense(1))
    5. model.compile(optimizer='adam', loss='mse',)
    6. model.fit(X, y, epochs=30, verbose=1)
    Prediction for 30 days \
    following code is from RunModel.py
    ```python
    def getNext30Days(self):
    1. self.__inputHandler()
    2. dataset = self.data
    3. dataset = dataset['Close'].values
    4. dataset = dataset[len(dataset)-30:]
    5. n_features = 1
    6. n_steps = 30
    7. past_days = 30
    8. # demonstrate prediction for next 30 days
    9. x_input = np.array(dataset.tolist())
    10. temp_input = list(x_input)
    11. lst_output = []
    12. i = 0
    13. while(i < 30):
  1. if(len(temp_input) > past_days):
  2. x_input = np.array(temp_input[1:])
  3. x_input = x_input.reshape((1, n_steps, n_features))
  4. yhat = self.model.predict(x_input, verbose=0)
  5. temp_input.append(yhat[0][0])
  6. temp_input = temp_input[1:]
  7. lst_output.append(yhat[0][0])
  8. i = i+1
  9. else:
  10. x_input = x_input.reshape((1, n_steps, n_features))
  11. yhat = self.model.predict(x_input, verbose=0)
  12. temp_input.append(yhat[0][0])
  13. lst_output.append(yhat[0][0])
  14. i = i+1
  15. print(lst_output)
  16. predictions = lst_output
  17. return predictions
  1. - #### [stock](https://github.com/Sanket-Kumbhare/Nifty-Prediction/tree/master/Nifty-50-Prediction/stock)
  2. > A Django application is a Python package that is specifically intended for use in a Django project. An application may use common Django conventions, such as having models , tests , urls , and views submodules.\
  3. > stock Directory

stock
└───migrations
└───templates
| | base.html
| | home.html
| | signup.html
| init.py
| admin.py
| apps.py
| forms.py
| models.py
| tests.py
| views.py

  1. - #### [db.sqlite3](https://github.com/Sanket-Kumbhare/Nifty-Prediction/tree/master/Nifty-50-Prediction/db.sqlite)
  2. > SQLite3 is a software library that provides a relational database management system. The lite in SQLite means lightweight in terms of setup, database administration, and required resources. SQLite has the following noticeable features: self-contained, serverless, zero-configuration, transactional.\
  3. > We are using sqlite3 for manageing User Authentication
  4. <img src="https://github.com/Sanket-Kumbhare/Nifty-Prediction/blob/master/Screenshots/myapp_models.png" width="800px;"/>
  5. - #### [manage.py](https://github.com/Sanket-Kumbhare/Nifty-Prediction/blob/master/Nifty-50-Prediction/manage.py)
  6. > A command-line utility that lets you interact with this Django project in various ways. You can read all the details about manage.py in django-admin and manage.py. The inner mysite/ directory is the actual Python package for your project.
  7. - #### [nifty50Companies.csv](https://github.com/Sanket-Kumbhare/Nifty-Prediction/blob/master/Nifty-50-Prediction/nifty50Companies.csv)
  8. > Csv file containing the list of nifty 50 companies with their respective symbol
  9. ### 3. [models Folder](https://github.com/Sanket-Kumbhare/Nifty-Prediction/tree/master/models)
  10. Contains experiments with models
  11. > models Directory

models
| NiftyPrediction.ipynb
| NiftyPrediction.ipynb
```

4. Screenshots Folder

Contains screenshots of the UI
Home/Login Page | Signup Page
:—-:|:—-:
|

Prediction News Section

Required Libraries

  • django Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • nsepy NSEpy is a library to extract historical and realtime data from NSE’s website.
  • sklearn Simple and efficient tools for predictive data analysis
  • tenserflow TensorFlow is an end-to-end open source platform for machine learning.
  • keras Keras is a deep learning API written in Python, running on top of the machine learning platform TensorFlow.
  • datetime The datetime module supplies classes for manipulating dates and times.

Contributors


Sanket-Kumbhare

swankhede

nihalbhopatrao

kgce-git