CLI tool for plotting financial data and analyzing options
Project description
fplot - Financial Plotting & Options Analysis CLI
A command-line tool for plotting comparative stock price history and analyzing options contracts.
Installation
From PyPI
pip install grynn-fplot
Or with uv:
uv tool install grynn-fplot
From Source
For development, install the package in editable mode:
make dev
Or install locally:
make install # Uses uv tool install .
Usage
Stock Plotting
fplot <ticker> [--since <date>] [--interval <interval>]
Examples:
fplot AAPLfplot AAPL --since 2020fplot AAPL,TSLA --since "mar 2023"
Options Listing
fplot <ticker> --call # List call options (default: 6 months max)
fplot <ticker> --put # List put options (default: 6 months max)
fplot <ticker> --call --max 3m # List calls with 3 month max expiry
fplot <ticker> --put --all # List all available put options
fplot <ticker> --call --min-dte 1y # List long-dated calls (min 1 year)
fplot <ticker> --call --filter "dte>1y" # Filter using time expressions
Examples:
fplot AAPL --callfplot TSLA --put --max 3mfplot AAPL --call --allfplot AAPL --call --min-dte 1y# Long-dated calls (1+ year)fplot AAPL --call --min-dte 6m# Calls with 6+ months to expiryfplot AAPL --call --filter "dte>10, dte<50"# 10-50 days to expiryfplot AAPL --call --filter "dte>1y"# Options with 1+ year to expiry
The options output includes pricing and return metrics:
AAPL 225C 35DTE ($5.25, 18.5%)
AAPL 230C 35DTE ($3.10, 25.2%)
AAPL 235C 35DTE ($1.85, 35.1%)
Format: TICKER STRIKE[C|P] DAYS_TO_EXPIRY (price, return_metric)
- For calls: return_metric is CAGR to breakeven
- For puts: return_metric is annualized return
Expiry Filtering Options:
--max <time>: Filter to show only options expiring within the specified time- Examples:
3m(3 months),6m(6 months),1y(1 year),2w(2 weeks),30d(30 days) - Default:
6m(6 months)
- Examples:
--min-dte <time>: Minimum days to expiry (useful for long-dated options)- Accepts plain days or time expressions:
300,1y,1.5y,6m,2w - Examples:
--min-dte 1y(1+ year),--min-dte 6m(6+ months) - Note: Using
--min-dteautomatically enables--allbehavior
- Accepts plain days or time expressions:
--all: Show all available expiries (overrides--max)
Advanced Filtering with --filter:
The --filter option supports complex filter expressions with logical operators:
-
Syntax:
- Comma (
,) represents AND operation - Plus (
+) represents OR operation - Comparison operators:
>,<,>=,<=,=,!= - Parentheses for grouping:
(expr1 + expr2), expr3
- Comma (
-
Filter Fields:
dte: Days to expiryvolume: Option volumeprice: Last pricereturn,ret,ar: Return metric (CAGR for calls, annualized return for puts) - all aliases workstrike_pct,sp: Strike percentage above/below spot (positive = above spot, negative = below spot)lt_days: Days since last trade (useful for filtering stale options)
-
Examples:
--filter "dte>300"- Options with more than 300 days to expiry--filter "dte>10, dte<50"- Options between 10-50 days (AND operation)--filter "dte<30 + dte>300"- Short-term OR long-dated (OR operation)--filter "sp>5, sp<15"- Strikes 5-15% above current spot price--filter "(dte>300 + dte<30), sp>5"- Complex nested filters--filter "volume>=100"- High volume options--filter "lt_days<=7"- Options traded within last 7 days--filter "ar>50"- Annualized return > 50%
-
Time Values:
- DTE-style expressions:
1y(365 days),6m(180 days),2w(14 days) - Duration expressions:
2d15h,30m,1d(converted to hours for duration fields) - Examples:
--filter "dte>1y"- Options with more than 1 year to expiry--filter "dte>6m"- Options with more than 6 months to expiry--filter "lt_days<=7"- Options traded in the last week
- DTE-style expressions:
Options data is cached for 1 hour to improve performance and reduce API calls.
Project details
Release history Release notifications | RSS feed
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 grynn_fplot-0.3.2.tar.gz.
File metadata
- Download URL: grynn_fplot-0.3.2.tar.gz
- Upload date:
- Size: 131.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fde24aff2c26062fe39ec6ea2d9ad32353a5120cf556e9c45a3a27d561558e02
|
|
| MD5 |
594565366c9b64b302800d3e1b32e91f
|
|
| BLAKE2b-256 |
6a37b7e943b2760f4c8f46fcd01c7c277ffa6ab7821ae492db2267db7afe204a
|
Provenance
The following attestation bundles were made for grynn_fplot-0.3.2.tar.gz:
Publisher:
publish.yml on Grynn/grynn_cli_fplot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grynn_fplot-0.3.2.tar.gz -
Subject digest:
fde24aff2c26062fe39ec6ea2d9ad32353a5120cf556e9c45a3a27d561558e02 - Sigstore transparency entry: 774249502
- Sigstore integration time:
-
Permalink:
Grynn/grynn_cli_fplot@ddd2565d6dac438a7b6b7f4682f2c431f74d9b75 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/Grynn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ddd2565d6dac438a7b6b7f4682f2c431f74d9b75 -
Trigger Event:
push
-
Statement type:
File details
Details for the file grynn_fplot-0.3.2-py3-none-any.whl.
File metadata
- Download URL: grynn_fplot-0.3.2-py3-none-any.whl
- Upload date:
- Size: 35.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a71b27195b8b7859dc214372575e9788dcf81917cf711df8caa22545374c717
|
|
| MD5 |
01cbd6013d903c000da75c7f6bdb9e27
|
|
| BLAKE2b-256 |
85de5b6ca7dc03601dcf65c439c8fe03b326697b33b8464c62825be872d0102f
|
Provenance
The following attestation bundles were made for grynn_fplot-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on Grynn/grynn_cli_fplot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grynn_fplot-0.3.2-py3-none-any.whl -
Subject digest:
5a71b27195b8b7859dc214372575e9788dcf81917cf711df8caa22545374c717 - Sigstore transparency entry: 774249503
- Sigstore integration time:
-
Permalink:
Grynn/grynn_cli_fplot@ddd2565d6dac438a7b6b7f4682f2c431f74d9b75 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/Grynn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ddd2565d6dac438a7b6b7f4682f2c431f74d9b75 -
Trigger Event:
push
-
Statement type: