Thin Python client for the OptionsAhoy keyless public equity-compensation REST API.
Project description
optionsahoy
A thin, dependency-light Python client for the OptionsAhoy keyless public REST application programming interface (API). It wraps seven deterministic equity-compensation tax calculators behind one synchronous client. No OptionsAhoy account, no API key, full federal tax code plus all 50 states and the District of Columbia (DC).
Why not just ask the model?
We benchmarked five frontier large language models (LLMs), 3 runs each, 15 trials total, on the same multi-year incentive stock option (ISO) exercise problem. Every trial overshot the true after-tax outcome, by 2x to 20x. Multi-year scheduling has a search space larger than an LLM can reason through in-context; these tools return the verifiable answer instead.
Raw responses and scoring: llm-iso-benchmark. Full write-up: But can it do taxes though?.
What it provides
Seven calculators, each a method on OptionsAhoyClient:
amt_iso(...)- multi-year ISO exercise optimizer under the alternative minimum tax (AMT)nso(...)- non-qualified stock option (NSO) exercise tax and after-tax proceeds, sell-at-exercise versus holdrsu_sell_vs_hold(...)- restricted stock unit (RSU) vest decision, sell at vest versus hold for long-term capital gainsconcentration(...)- single-stock concentration risk and the after-tax cost of diversifyingprotective_put(...)- protective put and zero-cost collar pricingqsbs(...)- qualified small business stock (QSBS) Section 1202 eligibility and exclusionequity_funding(...)- multi-year plan to fund a cash goal from equity by a target date
Coverage spans the full federal tax code (ordinary brackets, long-term capital gains, AMT with credit recovery, FICA, the net investment income tax) plus all 50 states and DC. The only runtime dependency is httpx. No API key is read, stored, or sent anywhere.
Install
pip install optionsahoy
Quickstart
from optionsahoy import OptionsAhoyClient, OptionsAhoyError
client = OptionsAhoyClient() # base_url defaults to https://optionsahoy.com
try:
# QSBS: can this founder exclude gain on a planned sale?
result = client.qsbs(
acquisitionDate="2018-01-01",
saleDate="2026-02-01",
entityType="us-c-corp",
acquisitionMethod="original-issuance",
assetCategory="under-50m",
industry="tech-software",
activeBusiness="yes",
adjustedBasis=10000,
expectedGain=2000000,
stateCode="CA",
ordinaryIncome=250000,
filingStatus="single",
)
print(result)
except OptionsAhoyError as err:
print(err.status_code, err.payload)
Field names, types, and required-ness mirror the published OpenAPI schema at https://optionsahoy.com/openapi.json one for one; this client does not invent or rename fields. Optional fields left unset are not sent.
Forward-looking inputs
Some endpoints (for example nso and rsu_sell_vs_hold) accept forward-looking fields such as expectedSalePrice and volatility that the OpenAPI schema marks optional. At runtime the API requires you to supply these explicitly, or to set a covered ticker (for example "NVDA") so the API can derive them from that symbol's trailing data. Do not invent these values; pass what the user provides or a ticker. Omitting both returns a clear 400 explaining which field is needed.
Runnable example and source
- Runnable example:
examples/ - Source:
integrations/python/optionsahoy
Related
Agent-framework adapters that wrap this same client behind each framework's native tool interface:
- optionsahoy-langchain - LangChain tools
- llama-index-tools-optionsahoy - LlamaIndex tools
- crewai-optionsahoy - CrewAI tools
Other surfaces for the same calculators:
- Hosted Model Context Protocol (MCP) server: https://optionsahoy.com/mcp
- Agent integration docs: https://optionsahoy.com/for-agents
- Free in-browser calculators: https://optionsahoy.com/tools
Built by AlphaLatitude Inc., the company behind OptionsAhoy.
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 optionsahoy-0.1.1.tar.gz.
File metadata
- Download URL: optionsahoy-0.1.1.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
908e5d29e260036815425f9b05c359738d915a7f44b7f97f8391ab567c290efa
|
|
| MD5 |
fcabbe1f98b89b484816c685a1197e87
|
|
| BLAKE2b-256 |
e9e49536685974c45fe50163d2b461e8228c67073abe91a248ae04cc18e9d5ce
|
Provenance
The following attestation bundles were made for optionsahoy-0.1.1.tar.gz:
Publisher:
publish-python.yml on AlvisoOculus/optionsahoy-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
optionsahoy-0.1.1.tar.gz -
Subject digest:
908e5d29e260036815425f9b05c359738d915a7f44b7f97f8391ab567c290efa - Sigstore transparency entry: 1811615650
- Sigstore integration time:
-
Permalink:
AlvisoOculus/optionsahoy-mcp@dee2047e11fa6ef0a4ed3e403191b7f1353aab22 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AlvisoOculus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@dee2047e11fa6ef0a4ed3e403191b7f1353aab22 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file optionsahoy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: optionsahoy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90848067c34277f9bcb75de0c5e1488b1a05bd46b1f62dbffc50d37856e6db07
|
|
| MD5 |
5ed108298e6115f403d06bfeb23c0928
|
|
| BLAKE2b-256 |
0aa66dbd53c2eb7b4d7c24ee1e115fa119080830c25bc77ed44b85e06fc58cfc
|
Provenance
The following attestation bundles were made for optionsahoy-0.1.1-py3-none-any.whl:
Publisher:
publish-python.yml on AlvisoOculus/optionsahoy-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
optionsahoy-0.1.1-py3-none-any.whl -
Subject digest:
90848067c34277f9bcb75de0c5e1488b1a05bd46b1f62dbffc50d37856e6db07 - Sigstore transparency entry: 1811615933
- Sigstore integration time:
-
Permalink:
AlvisoOculus/optionsahoy-mcp@dee2047e11fa6ef0a4ed3e403191b7f1353aab22 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AlvisoOculus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@dee2047e11fa6ef0a4ed3e403191b7f1353aab22 -
Trigger Event:
workflow_dispatch
-
Statement type: