Skip to main content

The `predictram_stock_data` package provides functionality to load and process stock data and economic indicators such as the Index of Industrial Production (IIP). The package includes functions to retrieve stock data for specific stocks, filter by date range, and load IIP data.

Project description

predictram_stock_data

Overview

The predictram_stock_data package provides functionality to load and process stock data and economic indicators such as the Index of Industrial Production (IIP). The package includes functions to retrieve stock data for specific stocks, filter by date range, and load IIP data.

Installation

To install this package locally, you can run the following command:

pip install predictram_stock_data

Modules and Functions

load_iip_data

  • Description: Loads the Index of Industrial Production (IIP) data from an Excel file.
  • Returns: A pandas.DataFrame containing the IIP data.
  • Raises:
    • FileNotFoundError: If the IIP data file is not found at the specified file path.
    • ValueError: If there is an issue reading the IIP data file.

load_stock_data

  • Description: Loads stock data for a specific stock, with optional date range filtering.
  • Arguments:
    • stock_name (str): The name of the stock (without the .xlsx extension).
    • start_date (str, optional): The start date (inclusive) in YYYY-MM-DD format. Defaults to None.
    • end_date (str, optional): The end date (inclusive) in YYYY-MM-DD format. Defaults to None.
  • Returns: A pandas.DataFrame containing the stock data, optionally filtered by the specified date range.
  • Raises:
    • FileNotFoundError: If the stock data file is not found at the specified location.
    • ValueError: If there is an issue reading the stock data or processing the date range.

Usage Example

from predictram_stock_data import load_stock_data, load_iip_data

# Load stock data for a specific stock
stock_data = load_stock_data("AAPL", start_date="2021-01-01", end_date="2021-12-31")

# Load IIP data
iip_data = load_iip_data()

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

predictram_stock_data-1.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

predictram_stock_data-1.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file predictram_stock_data-1.0.1.tar.gz.

File metadata

  • Download URL: predictram_stock_data-1.0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for predictram_stock_data-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fda2c7a0006b38da3c9c3d5b3bc564e519fc9e18bb590519aa7f953a8a51fc41
MD5 1ff846937e02df8d6969ea835d62c0db
BLAKE2b-256 cafa73ae9b8dfcd59a2aaac7b2c623c5523e3a233f7d83aef99d1b14fd770688

See more details on using hashes here.

File details

Details for the file predictram_stock_data-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for predictram_stock_data-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12e2d3c01ee58aecc70606697d33a5854ab6729793fe934b12688bdbecca6b4d
MD5 19c97e2f8a8e4771aa5c0b97562a2298
BLAKE2b-256 6272be64f8f648c9e3819cd8bd28cc1406497c67f8e2bf00c37b07c089f92466

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