Equity Analyst is an Open-Source Python package with the key function of accepting the ticker name of the stock and predicting its future value based on historical data.
Project description
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.
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.
3. plot_stock_data(company)
This function visualises the stock prices for a particular duration specified by the user.
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.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Equity Analyst-1.0.2.tar.gz
.
File metadata
- Download URL: Equity Analyst-1.0.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc276c7d19a063229c982ca58fe426fb2f46e59e64bda537a7985ec3a9864790 |
|
MD5 | f45fbc69f72dcd48c03afd7e6346010a |
|
BLAKE2b-256 | 6e7875c3cb2f9e937efb1c62660b7543ea37a7179eb7d65041c507e18f75abae |
File details
Details for the file Equity_Analyst-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: Equity_Analyst-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f8f8f8a3e5bc79b13646246e6dd891181059654c6b3f54e46d027d3122fa6b3 |
|
MD5 | 8c3f4326ffd16d129e10ad1f1887b26e |
|
BLAKE2b-256 | 7842c04cc6b0f221a8277aeb6c0e69747dcfa09686f1ff38380589be57d5749f |