Skip to main content

Predicts the Gross Yield, Annual Yield and Net Yield of a user given stock ticker.

Project description

DOI PyPI version Downloads Documentation Status

Stock (1)

stockDL: A Deep Learning library for stocks price predictions and calculations

Features

  • Single stock trading and price comparisons based on 2 traditional stock market algorithms [Buy and Hold & Moving Average], and 2 deep learning algorithms [LSTM Network and Conv1D + LSTM Network]
  • Returns result in JSON format comprising the Total Gross Yield, Annual Gross Yield, Total Net Yield, and Annual Net Yield. This JSON Result can be used for web-based price predictions. Considering the broker commission and capital gains tax in India [can be modified]
  • Dynamic model training every time the library is run thus making the model unaffected by unusual stock market changes due to Act of God, Pandemics, Sudden loss, Gains to the share prices.
  • Latest Financial Data collection from Yahoo Finance API (from the starting date of the stock to the current data).
  • Easy backend integration with flask or another python backend for web deployment.
  • Less than 90 seconds result processing time on Tesla K80 GPU with 4992 NVIDIA CUDA and 24 GB VRAM. Much faster than other deep learning stocks analysers. [can be used on Google Colab]
  • Easy Installation with pip. Install and run. Dependencies satisfied automatically.
  • Different plots available according to the user requirements, Plots to show the training and validation accuracy, Months to trade in the market and months to stay out, comparison of the 4 trading strategies and the market predictions for the coming month.

How to install:

For using as a library:

pip install stockDL

import the package as:

import stockDL

to get the results in command line:

from stockDL import main
main.Main('stock_ticker')

Stock tickers can be obtained here.

For using as a template or to make contributions to the repository:

Clone from GitHub: https://github.com/ashishpapanai/stockDL

git clone https://github.com/ashishpapanai/stockDL

Create a virtual environment using pip for Linux and macOS:

python3 -m pip install --user virtualenv
# Create a virtual environment
python3 -m venv env
# Activate the virtual environment
source env/bin/activate

Create a virtual environment using pip for Windows:

py -m pip install --user virtualenv
# Create a virtual environment
py -m venv env
# Activate the virtual environment
.\env\Scripts\activate

Installing dependencies:

pip install -r requirements.txt

Running the package:

python -m stockDL

Dependencies:

  1. Yahoo Finance (yfinance): https://pypi.org/project/yfinance/
  2. Keras: https://pypi.org/project/Keras/
  3. Pandas: https://pypi.org/project/pandas/
  4. Numpy: https://pypi.org/project/numpy/
  5. Matplotlib: https://pypi.org/project/matplotlib/
  6. TensorFlow: https://pypi.org/project/tensorflow/

Install all dependencies in a go: pip install -r requirements.txt If it fails: Install all dependencies on by one [if you are cloning the repository]. for pip installation, dependencies are satisfied automatically.

License:

MIT License © Ashish Papanai 2021

Documentation:

Read the documentation here

Getting Help:

Post your questions in the discussion section of the GitHub repository or mail the author [ashishpapanai00@gmail.com]

Contributing to stockDL:

Contributions are not restricted to bug fixes or enhancements. We welcome contributions including any grammatical or typo error anywhere in the repository.

You can contribute by reviewing the PRs, requesting new and useful features, reporting a bug in the repository or helping the community in the discussion section.

Copyright © Ashish Papanai 2021

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stockDL-0.2.5.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

stockDL-0.2.5-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file stockDL-0.2.5.tar.gz.

File metadata

  • Download URL: stockDL-0.2.5.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for stockDL-0.2.5.tar.gz
Algorithm Hash digest
SHA256 d40fba93d80e1189fb596977d7417735136e8000b4a5650b22ad94cbba4b1dc2
MD5 e0eb59c043f51324d46ed7f0f61738ff
BLAKE2b-256 207f4620fe67f6f31f807e6a4bdaa4db5157e17e1b46650c8323d20195e4ff04

See more details on using hashes here.

File details

Details for the file stockDL-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: stockDL-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for stockDL-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e307ac05100ed8dda8eb64e9b76d49fb12461bb181ebf3089a06e23786b3f552
MD5 d7cdc90a2e8972a4895f414601ed7ca3
BLAKE2b-256 e3874e3d5973f998bf3359d0649072cc543b709089807e476a1ea215e334b24c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page