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.DataFramecontaining 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.xlsxextension).start_date(str, optional): The start date (inclusive) inYYYY-MM-DDformat. Defaults toNone.end_date(str, optional): The end date (inclusive) inYYYY-MM-DDformat. Defaults toNone.
- Returns: A
pandas.DataFramecontaining 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file predictram_stock_data-1.0.6.tar.gz.
File metadata
- Download URL: predictram_stock_data-1.0.6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6f5665920e514f2cd8a7648a7b3bc1ee4f90312bccefe4f55f9fc11d0884bc2
|
|
| MD5 |
f54379c4839f2e5c60479a0206eb2774
|
|
| BLAKE2b-256 |
66e23218d596c6685bfaf831424c22015c3029fca1c1dad4f8a7640ddf4bc28f
|
File details
Details for the file predictram_stock_data-1.0.6-py3-none-any.whl.
File metadata
- Download URL: predictram_stock_data-1.0.6-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a15d7ad85ae6b7b08cd5f00f34216433ae37583b5c2b616be4a0c4cf637ddca7
|
|
| MD5 |
6b4cc10fa90ce3478e6d5701d5b4f048
|
|
| BLAKE2b-256 |
76da5fafcaf192a2509d5fe4f0f1431c0e2f9da83e76605617cf65ec8ebdebcc
|