Skip to main content

Stock Prediction using FBProphet

Project description

StockAnalysis

Installation

As ususal installation

$ pip install pyindia-stock

It uses FBProphet for analysis and prediction.

Getting Started

You can use command-line script. pyindia_stock -h will give the following.

usage: pyindia_stock [-h] --index INDEX --from_date FROM_DATE
                     [--to_date TO_DATE]

Analyzing the Past Behavior of an index from Indian Stock Market

required arguments:
  --index INDEX         NSE index name
  --from_date FROM_DATE
                        starting date to consider for evaluation. Date in
                        d/m/Y,H format, H: should be in 24hrs format

optional arguments:
  --to_date TO_DATE     Specific/present date to consider for evaluation. Date
                        in d/m/Y,H format, H: should be in 24hrs format.
                        Default: Sets to present date and time.

You can use it in scripts.

# import pyindia_stock
$ from pyindia_stock import StockAnalysis

# run StockAnalysis with index and period_from as arguments.
$ StockAnalysis("SBIN",period_from="01/01/2000,15")

# StockAnalysis has the following arguments:
# - index: Only NSE index name
# - period_from: starting date to consider for evaluation. Date in "%d/%m/%Y,%H" format, H: should be in 24hrs format.
# - period_to: Specific/present date to consider for evaluation. Date in "%d/%m/%Y,%H" format, H: should be in 24hrs 				format.Default: Sets present date and time.
#StockAnalysis has attributes 
# - read_data: Read stock Dataframe
# - fbprophet: Instance of class FBProphet with daily seasonality.
# - is_data_available: if data has loaded to dataframe and has suitable format, then in is true

How to use it?

Colab starter notebook:

About FBProphet:

Prophet is a forecasting procedure implementation in R and Python. It is fast and provides completely automated forecasts that can be tuned by hand by data scientists and analysts.
Prophet follows the sklearn model API. We create an instance of the Prophet class and then call its fit and predict methods.
The input to Prophet is always a dataframe with two columns: ds and y. The ds (datestamp) column should be of a format expected by Pandas, ideally YYYY-MM-DD for a date or YYYY-MM-DD HH:MM:SS for a timestamp. The y column must be numeric, and represents the measurement we wish to forecast.

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

pyindia_stock-0.0.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyindia_stock-0.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file pyindia_stock-0.0.1.tar.gz.

File metadata

  • Download URL: pyindia_stock-0.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for pyindia_stock-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4abd31198277362205f6fcfcd5a640aa2c2823ad610ac307326d9c2644d26c0b
MD5 21239cfbc13581a7b6eed434ecbc437e
BLAKE2b-256 91fcb0e9670f1085894f788d10f523a110045c5bead3e94d90c2f474d716ddd8

See more details on using hashes here.

File details

Details for the file pyindia_stock-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyindia_stock-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for pyindia_stock-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77760b7fc9d846e2057188d4a3f238a55a17bbb48b4ec08a2fcb24b5e588248b
MD5 5a0da379dde371c4c35497890b3028e8
BLAKE2b-256 a4b735ec76ab1640e39c17c0af203944fc133bec6eb7be10b7648c461d87d982

See more details on using hashes here.

Supported by

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