# Agent Financial Advisor

> The compliance officer, risk manager, tax advisor and performance auditor for AI agents that trade and advise.

Call these before you act. Rule-based, deterministic, sourced to the regulation, and current (rules version 2026-10-11).

## Tools
- **rules_digest** (free): Free. The current US trading, margin, settlement and tax rules an agent must follow, with effective dates and sources. Includes changes your training data may predate, such as the June 2026 replacement of the Pattern Day Trader rule.
- **pre_trade_check** ($0.005/call): Run an order past a compliance officer and risk manager before sending it to the broker. Checks buying power, cash-account settlement violations, FINRA intraday margin (post-PDT) or legacy PDT limits, Reg SHO short-sale rules, wash-sale exposure, position concentration, per-trade risk versus stop, liquidity, spread, fat-finger prices, leverage and market hours. Returns approve / approve_with_warnings / reject with reasons and a resized quantity when useful.
- **position_size** ($0.005/call): Size a position the way a risk manager would: fixed-fractional risk to a stop, volatility targeting (ATR or annualized vol), or fractional Kelly from your edge statistics. Applies a max-position cap and round lots, and explains the binding constraint.
- **tax_lot_plan** ($0.02/call): Act as the tax advisor for a sale: compares FIFO, LIFO, HIFO and minimum-tax lot selection, splits short- and long-term gains, estimates tax, flags wash sales, and notes lots about to turn long-term. With mode=harvest it scans positions for tax-loss harvesting.
- **portfolio_review** ($0.05/call): A periodic advisor review of a portfolio: weights, concentration (HHI and effective number of holdings), sector and asset-class exposure, drift from targets with the trades to rebalance, and, given return history, volatility, Sharpe, Sortino, drawdown, VaR/CVaR and beta. Ends with prioritized findings.
- **strategy_audit** ($0.1/call): An independent performance auditor for a trading strategy or backtest. From a trade list and/or periodic returns it computes win rate, expectancy, profit factor, streaks, Sharpe/Sortino/drawdown, and tests whether the edge is real: t-stat, Probabilistic Sharpe Ratio and the Deflated Sharpe Ratio that corrects for how many variants you tried. Returns a verdict and red flags.
- **suitability_check** ($0.03/call): The compliance review a robo-advisor or advisory agent should run before recommending a portfolio to a person: compares the proposal with the client's age, horizon, risk tolerance, liquidity needs and experience under Reg BI / fiduciary standards, flags complex products, and returns a timestamped, hashed suitability memo for the audit file.

## Use
- REST: POST https://agent-financial-advisor.agent-financial-advisor.workers.dev/v1/tools/{name} with a JSON body. Schemas: GET https://agent-financial-advisor.agent-financial-advisor.workers.dev/v1/tools, OpenAPI: https://agent-financial-advisor.agent-financial-advisor.workers.dev/openapi.json
- MCP (streamable HTTP): https://agent-financial-advisor.agent-financial-advisor.workers.dev/mcp
- Free trial: a few calls a day without a key. Free API key (POST /v1/keys) adds 25 free calls a day.
- Pay per call with x402 (USDC on Base; minimum $0.01 per call), or prepay credits at list price: POST /v1/credits?pack=5|20|100 (packs of $20 and $100 include 10% and 20% bonus credit).

Outputs are automated analysis for software agents, not personalized investment, tax or legal advice.