Posts

Showing posts with the label Keras

Short-term Stock Market Price Prediction using Deep Learning Models

Image
  This blog is about short-term stock market price trend prediction using a comprehensive deep learning LSTM model. Results show that t he model achieves overall high accuracy for stock market trend prediction .  The following end-to-end sequence  provides the detailed Python/Jupyter workflow from data processing to prediction, including the data exploration: 1. Data Preparation Phase #import libraries import pandas as pd import numpy as np # To remove the scientific notation from numpy arrays np.set_printoptions(suppress=True)   # install the nsepy library to get stock prices !pip install nsepy   ############################################ # Getting Stock data using nsepy library from nsepy import get_history from datetime import datetime   startDate=datetime(2021, 1,1) endDate=datetime(2022, 10, 3)   # Fetching the data StockData=get_history(symbol='INFY', start=startDate, end=endDate) print(StockData.shape) StockData.head() # Creating a column as date StockData['TradeDa

Supervised ML/AI Stock Prediction using Keras LSTM Models

Image
  (the image was created using Visme [1]). Introduction Stock markets are analyzed either technically or fundamentally [2]. Fundamental analysis studies supply and demand relationships that define the stock price at any given time.  Technical analysis uses specialized methods of predicting prices by analyzing past price patterns and levels.  T here are many techniques used to examine stock price lines and patterns [2]: bar or high/low/close charts moving averages trend lines channels cycles resistance and support planes corrections double tops and bottoms head and shoulders formation trading volume open interest.  Theere are numerous limitations of these techniques: moving averages responds to general trends only is not highly precise short-term moving averages can give false indications, especially in times of volatile prices Trend lines work best with sustained trends positioning of trend lines is subjective and takes practice trends must be established before they become recognizabl