Skip to main content

Equity Analyst is an Open-Source Python Package that uses a Deep Learning model to predict future stock prices based on historical values. Additionally, it also acts as an aid to acquire and visualise stock prices without any redundancy.

Installing the Package

$ pip3 install Equity-Analyst

Importing all Functions from the package

from equityanalyst import stock_price_predict

from equityanalyst import get_stock_data

from equityanalyst import plot_stock_data

Function Description

1. y_pred = stock_price_predict(company)

The function performs the following tasks:

  • Accepts the ticker name of the stock and scrapes historic data of the stock using the Yahoo Finance API. The start date and end date for the historic data are 2000 days and 60 days ago respectively.

  • A Recurrent Neural Network model is trained with the data. This model is used to make predictions on the data for a number of days that need to be taken into consideration. This parameter is defined by the user.

  • Plots a graph that displays our predicted values along with the actual values. This will act as a visual aid for the users to comprehend the accuracy of the model on the particular stock.

  • Returns predicted values for the desired number of days which is defined by the user.


https://github.com/harshitbhavnani/Equity-Analyst/blob/main/Examples/Example%201.png?raw=true

2. df = get_stock_data(company)

This function acquires data using the Yahoo Finance API for a particular duration which is specified by the user.


https://github.com/harshitbhavnani/Equity-Analyst/blob/main/Examples/Example%202.png?raw=true

3. plot_stock_data(company)

This function visualises the stock prices for a particular duration specified by the user.


https://github.com/harshitbhavnani/Equity-Analyst/blob/main/Examples/Example%203.png?raw=true

Variable Description:

company(string): Ticker name of the stock

prediction_days(int): Number of days that need to be taken into consideration for predictions

days_pred(int): Number of days that we need projections for

y_pred(array): Predictions for ‘days_pred’ number of days

Dependencies

The libraries that need to be installed for the package to work are as follows:

  • Matplotlib: Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.

    $ pip3 install matplotlib

  • Tensorflow: TensorFlow is a Python library for fast numerical computing created and released by Google. It is a foundation library that can be used to create Deep Learning models directly or by using wrapper libraries that simplify the process built on top of TensorFlow

    $ pip3 install tensorflow

  • Numpy: NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.

    $ pip3 install numpy

  • Pandas: Pandas is a software library written for the Python programming language for data manipulation and analysis. In particular, it offers data structures and operations for manipulating numerical tables and time series.

    $ pip3 install pandas

  • Keras: Keras is a deep learning API written in Python, running on top of the machine learning platform TensorFlow. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result as fast as possible is key to doing good research.

    $pip3 install keras

  • Pandas Data Reader: Pandas Data Reader is used to extract historic data of stocks by calling the Yahoo API

    $pip3 install pandas-datareader

  • TQDM: This package instantly make your loops show a smart progress meter for the fitting of the RNN model

    $pip3 install tqdm

  • Sklearn: MinMaxScaler function from Sklearn is used in order to standardise the closing values between 0 and 1.

    $pip install scikit-learn

Note: The aforementioned commands can be used in Jupyter Notebooks and should be ignored if the libraries have already been installed. Replace the ‘$ pip3’ by ‘!pip’ if you are using Google Colaboratory.

Author:

Harshit Bhavnani - harshit.bhavnani@gmail.com

License

MIT

Release files for Equity-Analyst 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Equity-Analyst 1.0.2
File Size Uploaded
Equity Analyst-1.0.2.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Equity-Analyst 1.0.2
File Interpreter ABI Platform
Equity_Analyst-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.6 kB

Release files / Equity Analyst-1.0.2.tar.gz

Download URL Equity Analyst-1.0.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dc276c7d19a063229c982ca58fe426fb2f46e59e64bda537a7985ec3a9864790
BLAKE2b-256 checksum
How to use checksums
6e7875c3cb2f9e937efb1c62660b7543ea37a7179eb7d65041c507e18f75abae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.8.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.8

Release files / Equity_Analyst-1.0.2-py3-none-any.whl

Download URL Equity_Analyst-1.0.2-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f8f8f8a3e5bc79b13646246e6dd891181059654c6b3f54e46d027d3122fa6b3
BLAKE2b-256 checksum
How to use checksums
7842c04cc6b0f221a8277aeb6c0e69747dcfa09686f1ff38380589be57d5749f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.8.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page