Giter Site home page Giter Site logo

stock-price-forecast's Introduction

stock-price-forecast

Project Description

Forecast stock prices (2009-2019 historical data) using Prophet model

Key steps

  1. Generate Forecast for Test Period: The model is fit to the data, and a forecast is generated for the specified number of new observations. The example provided aims to forecast 252 new periods, corresponding to the number of trading days in a year. This is achieved by using the .make_future_dataframe method of the Prophet class.
  2. Produce Forecast and Plot: With the future dates prepared, the notebook uses the .predict method to generate forecasts. These forecasts are then plotted using the .plot method to visualize the model's predictions.
  3. Compare Forecast to Historical Values: The accuracy of the forecast is evaluated by comparing it to the actual historical values of the stock. This comparison is visualized by plotting the actual prices against the forecasted values.
  4. Cross Validation using Past Data: To assess how well the model fits past data, cross-validation is performed. This process involves generating out-of-sample forecasts at different points in time with various forecasting horizons to understand the model's fit better. The cross_validation function from the Prophet's diagnostics module is used for this purpose, alongside the performance_metrics function to evaluate the model's performance.

stock-price-forecast's People

Contributors

hlz-922 avatar

Stargazers

 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.