Skip to main content

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

Metadata

Release files for stockDL 0.2.5

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

Source distribution (sdist)

Source distribution for stockDL 0.2.5
File Size Uploaded
stockDL-0.2.5.tar.gz 20.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stockDL 0.2.5
File Interpreter ABI Platform
stockDL-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 41.2 kB

Release files / stockDL-0.2.5.tar.gz

Download URL stockDL-0.2.5.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d40fba93d80e1189fb596977d7417735136e8000b4a5650b22ad94cbba4b1dc2
BLAKE2b-256 checksum
How to use checksums
207f4620fe67f6f31f807e6a4bdaa4db5157e17e1b46650c8323d20195e4ff04
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / stockDL-0.2.5-py3-none-any.whl

Download URL stockDL-0.2.5-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e307ac05100ed8dda8eb64e9b76d49fb12461bb181ebf3089a06e23786b3f552
BLAKE2b-256 checksum
How to use checksums
e3874e3d5973f998bf3359d0649072cc543b709089807e476a1ea215e334b24c
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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