Installation
pip install volprofile
Volume Profile Analysis Package
This package provides functions for analyzing volume profile data using Python. The package includes the following functions:
Functions
getVP(df: pd.DataFrame, nBins: int = 20) -> pd.DataFrame
This function takes a Pandas DataFrame with columns price and volume, and returns a DataFrame consisting of minPrice, maxPrice, and aggregateVolume for each price bin.
getVPWithOHLC(df: pd.DataFrame, nBins: int = 20) -> pd.DataFrame
This function takes a Pandas DataFrame with columns open, high, low, close, and volume, and returns a DataFrame consisting of minPrice, maxPrice, and aggregateVolume for each price bin. It uses the OHLC data to calculate more accurate price bins.
getKMaxBars(volprofile_result: pd.DataFrame, k: int) -> pd.DataFrame
This function takes a DataFrame generated by getVP or getVPWithOHLC, and returns the top k price bins with the highest aggregate volume.
getUnusualIncreasingBars(df: pd.DataFrame, isUpward: bool) -> pd.DataFrame
This function takes a DataFrame generated by getVP or getVPWithOHLC, and returns the price bins that have experienced unusual increases in volume. The isUpward parameter determines whether to search for upward or downward trends.
plot(df: pd.DataFrame, price) -> None
This function takes a DataFrame generated by getVP or getVPWithOHLC, and a price series, and generates a plot of the volume profile. Installation
To install the package, run:
pip install volprofile
Example Usage
import pandas as pd
from volprofile import getVP, plot
# Load data
df = pd.read_csv('mydata.csv')
# Calculate volume profile
vp = getVPWithOHLC(df)
# Plot volume profile
plot(vp, df['price'])
Metadata
Release files for volprofile 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| volprofile-1.0.1.tar.gz | 2.7 kB | Without provenance | Details for volprofile-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| volprofile-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for volprofile-1.0.1-py3-none-any.whl |
Total release size: 6.3 kB
Release files / volprofile-1.0.1.tar.gz
| Download URL | volprofile-1.0.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4579095dc20e4b4186cac679c5bc4d8c268336d41b2a2c27d0b0b8a032f087d
|
|
BLAKE2b-256 checksum How to use checksums |
894d975ee0b1a7b3e7eb26215a2f721cb42c92bd738175f8f70ac34c5902da4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1034-azure
|
Release files / volprofile-1.0.1-py3-none-any.whl
| Download URL | volprofile-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1a1ff9409ef4214fb3d34f5e22c13de78ef32bf4eecf2deff62882044698873
|
|
BLAKE2b-256 checksum How to use checksums |
f11bf23c12f87e491bcd25904d62d33951431561ed90d60372f7c37daef6babc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1034-azure
|
Security for volprofile 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.