LlamaIndex tools for the OptionsAhoy equity-compensation calculators.
Project description
llama-index-tools-optionsahoy
LlamaIndex tools for the OptionsAhoy equity-compensation calculators. OptionsAhoyToolSpec exposes one tool per OptionsAhoy REST endpoint, built on the keyless optionsahoy client. No OptionsAhoy account, no application programming interface (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
OptionsAhoyToolSpec().to_tool_list() returns seven LlamaIndex FunctionTools, one per endpoint:
amt_iso_optimize- multi-year ISO exercise optimizer under the alternative minimum tax (AMT)nso_calculate- non-qualified stock option (NSO) exercise tax, sell-at-exercise versus holdrsu_sell_vs_hold- restricted stock unit (RSU) sell at vest versus hold for long-term capital gainsconcentration_analyze- single-stock concentration risk and the after-tax cost of diversifyingprotective_put_price- protective put and zero-cost collar pricingqsbs_check- qualified small business stock (QSBS) Section 1202 eligibility and exclusionequity_funding_plan- multi-year plan to fund a cash goal from equity by a target date
Coverage spans the full federal tax code plus all 50 states and DC. The adapter pulls in the keyless optionsahoy client automatically. No API key is read, stored, or sent anywhere.
Install
pip install llama-index-tools-optionsahoy
Quickstart
Hand the tools to a LlamaIndex agent backed by any chat model:
import asyncio
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI # pip install llama-index-llms-openai; set OPENAI_API_KEY
from llama_index.tools.optionsahoy import OptionsAhoyToolSpec
tools = OptionsAhoyToolSpec().to_tool_list()
agent = FunctionAgent(
tools=tools,
llm=OpenAI(model="gpt-4o-mini"),
system_prompt=(
"You are an equity-compensation assistant. Use the OptionsAhoy tools to "
"compute exact tax-aware answers; do not estimate the math yourself."
),
)
QUESTION = (
"I hold 500 vested RSUs currently worth $50 each. I file single in California "
"with $200000 of ordinary income, am still employed, and would hold for 1 year. "
"Assume ticker NVDA for forward-looking inputs. Should I sell at vest or hold? "
"Use the rsu_sell_vs_hold tool."
)
async def main():
response = await agent.run(QUESTION)
print(response)
asyncio.run(main())
Pass your own configured client with OptionsAhoyToolSpec(client=OptionsAhoyClient(...)).
The seven endpoints accept forward-looking fields (such as expectedSalePrice or volatility) that the schema marks optional but the API requires at call time; set a covered ticker (for example "NVDA") to let the API derive them, or pass explicit values. Omitting both returns a clear 400 explaining which field is needed.
Runnable example and source
- Runnable example:
examples/ - Source:
integrations/python/llama-index-tools-optionsahoy
Related
Sibling packages wrapping the same calculators:
- optionsahoy - plain Python client (no framework)
- optionsahoy-langchain - LangChain 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 llama_index_tools_optionsahoy-0.1.1.tar.gz.
File metadata
- Download URL: llama_index_tools_optionsahoy-0.1.1.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a97305fa4630079b211e62f468bb06481557c3e4fa746f7f958e164144bae61d
|
|
| MD5 |
5060b33618a95825752100fd9976cf8f
|
|
| BLAKE2b-256 |
a06c183a2a361d6090513dc6655a9ec95e93049610e0d7736e576a87fe6fcdc5
|
Provenance
The following attestation bundles were made for llama_index_tools_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:
llama_index_tools_optionsahoy-0.1.1.tar.gz -
Subject digest:
a97305fa4630079b211e62f468bb06481557c3e4fa746f7f958e164144bae61d - Sigstore transparency entry: 1811614843
- 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 llama_index_tools_optionsahoy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: llama_index_tools_optionsahoy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.6 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 |
bd81f5e51c22bab6f3d7c66b7a0cf2dc43e76f8f1259a9ed0c305606ff878326
|
|
| MD5 |
0b6e44a1c56fc80cb179b2b7de01b9e3
|
|
| BLAKE2b-256 |
2c7faa90d7a4eb3ad4babf3e9aa0dbe8fb37688aaf2ed93b3f04b9d0bdbfcf1c
|
Provenance
The following attestation bundles were made for llama_index_tools_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:
llama_index_tools_optionsahoy-0.1.1-py3-none-any.whl -
Subject digest:
bd81f5e51c22bab6f3d7c66b7a0cf2dc43e76f8f1259a9ed0c305606ff878326 - Sigstore transparency entry: 1811615110
- 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: