Giter Club home page Giter Club logo

stock-market-prediction's Introduction

Netflix Stock Price Prediction

This repository contains code for predicting Netflix stock prices using an LSTM (Long Short-Term Memory) model. The code is written in Python and utilizes libraries such as pandas, numpy, scikit-learn, and TensorFlow.

Dataset

The dataset used for training and testing the model is the Netflix stock price data. The data is provided in a CSV file, which includes historical stock prices including the 'Close' price column. Download the Netflix stock price dataset from here.

Model Architecture

The LSTM model is implemented using the Keras API from TensorFlow. The model consists of an LSTM layer with 64 units followed by a Dense layer with 1 unit. The model is compiled with the Adam optimizer and mean squared error (MSE) loss function.

Data Preprocessing

The 'Close' price column is extracted from the dataset and scaled using the MinMaxScaler from scikit-learn. The data is then divided into training and testing sets. Input sequences of a specified length sequence_length are created along with their corresponding target values.

Training and Evaluation

The model is trained on the training data using the created sequences and target values. The training is performed for a specified number of epochs with a batch size of 64. After training, the model is evaluated on the test data to measure its performance using the mean squared error (MSE) loss.

Prediction

Using the trained model, predictions are made on the test data. The predicted values are then inverse scaled to obtain the actual stock prices. The predicted and actual prices are printed to compare the model's performance.

Requirements

  • pandas
  • numpy
  • scikit-learn
  • TensorFlow

The dependencies can be installed using the following command:

pip install -r requirements.txt

stock-market-prediction's People

Contributors

ayo-folashade 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.