GithubHelp home page GithubHelp logo

sanskritiharmukh / forecasting-stock-market-index Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 4.0 308 KB

Analyzing the stock quotes and forecasting the prices on the basis of historical data using Artificial Intelligence.

Home Page: https://share.streamlit.io/sanskritiharmukh/forecasting-stock-market-index/main/project.py

License: GNU General Public License v3.0

Python 98.14% Procfile 1.86%
machine-learning deep-learning time-series-analysis artificial-intelligence stock-price-prediction python stock time-series

forecasting-stock-market-index's Introduction

Forecasting-Stock-Market-Index

Motivation and Purpose of the project

As we know Stock Market prices are highly unpredictable and volatile. This means that there are no consistent patterns in the data that allow one to model stock prices over time near-perfectly. So, as a stock buyer, you can reasonably decide when to buy stocks and when to sell them to make a profit. Instead of considering it a stochatic or random process and that there is no hope for machine learning. We are trying to model the data, so that the predictions one makes correlate with the actual behavior of the data. This is where time-series modeling comes in. You need good machine learning models that can look at the history of a sequence of data and correctly predict what the future elements of the sequence are going to be.

What does the project use?

We are working with Time Series Model, which analyzes a sequence of data points collected over a time interval. In time series analysis, analysts record data points at consistent intervals over a set period of time rather than just recording the data points intermittently or randomly. Time series data can be used for forecasting - predicting future data based on historical data.

We are using 3 major open-source frameworks and tools in our project.

Streamlit: The fastest way to build and share data apps

Streamlit is an open-source python framework for building web apps for Machine Learning and Data Science. It is the fastest way to build and share data apps. We can develop and deploy our web app using Streamlit very easily. In just a few minutes you can build and deploy powerful data apps.

Prophet: Automatic Forecasting Procedure

Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well. It works best with time series that have strong seasonal effects

Yahoo Finance: To get free stock quotes

Yahoo! Finance is a media property that is part of the Yahoo! network. It provides financial news, data and commentary including stock quotes, press releases, financial reports, and original content. It also offers some online tools for personal finance management.

Python Installation and proceedings

1. Make sure you have python installed in your system already. If not, you can install it using in following command your terminal for installation

sudo apt install python3.8

check version using,

python3 --version

2. Now, for installing and managing the software packages, we'll first install pip using

sudo apt install python3-pip 

and can check version by

pip3 --version

3. Next thing to do is create a virtual environment to separate your site packages used in this project from your rest of the projects, therefore to install use,

pip install virtualenv

create virtual environment using,

virtualenv <your_env_name>

and activate using,

source <your_env_name>/bin/activate

4. Further install all necessary modules using

pip install streamlit fbprophet yfinance ploty

This will install all the required packages for the project such as, numpy, pandas, matplotlib, etc.

Note - Make sure you install one of the major dependency of Prophet pystan explicitly. You can refer doc for the same and if you encounter an import error with prophet then degrade holidays version to 0.9.12 and clone the repository.

5. It's time to write some code. Refer the file attached in the repository for the same and understand the working of each line through the comments.

6. After writing the code, let's run it using the following command through the terminal

streamlit run home/username/Documents/<project_name.py>

The Streamlit app will now be visible in your browser at localhost:8501 .

7. Lastly you can deactivate the virtual environment by giving command deactivate to your terminal.

Glimpse of the Web App

Let's see which source code line is responsible for which part of the output in our web app.

Note : View in Dark Dimmed mode for better experience.

Input:

image

Output:

image

Input:

image image image

Output:

image

Input:

image

Output:

image

Input:

image

Output:

image

Input:

image

image

Output:

image

Input:

image

Output:

image

Input:

image

Output:

image

Find a link to the project Predict over data in the about section.

Collaborators and Team Members Mansi Mishra | Satyam Jain | Archit Chawda

Made with ♥️.

forecasting-stock-market-index's People

Contributors

0904-mansi avatar archit27-uo avatar sanskritiharmukh avatar satyam298 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.