Code Monkey home page Code Monkey logo

google-stock-price-forecast-using-arima-model-in-python's Introduction

Google-Stock-Price-Forecast-using-ARIMA-Model-in-Python

This time, I would like to simulate an ARIMA process in Python with the time series data of Adjusted closing price of Google Stock. The data is downloaded from yahoo finance in period range between 2004-2021.

  1. Import related library and convert the data into pandas data frame

textimage

  1. Plot the data, which is the adjusted closing price data and see the trend. As we can see the trend is quadratic, so that, we take the d value as 2.

textimage

  1. Run the autocorrelation plot

textimage

  1. Run the Partial autocorrelation in Python to find out the value of p (AR) and q (MA). As both diagram shows that the line crossed the confidence interval (bluecolour-filled space) between line 2 and 3, we took p=2 and q=2

textimage

  1. Run ARIMA process in Python with order 2,1,2 as we have obtained the p, d, and q value beforehand. We took the AR and MA variable that has p value < 5% as p d and

textimage5 textimage6

  1. Plot the residuals. As we can see, there is no trend and showing pure white noise

text image

  1. Forecast the model. First we run only for the next period we got 2543.89688782 for the forecasted value, 12.95333698 for the standard deviation, and [2518.50881385, 2569.28496179] for the confidence interval

textimage

  1. Run the forecasted model for the next 5 period

textimage

google-stock-price-forecast-using-arima-model-in-python's People

Contributors

altheanabila avatar

Watchers

 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.