Tools and research for putting LLMs into markets.
Verified costs, limits and math for building financial software with AI: market-data and broker APIs, LLM costs on real filings, and quant engines with published test vectors. 44 tools that run in your browser and 63 dated articles with the method and every source shown: model costs, market data, backtest validation and agent risk.
Medium (~500 symbols)
| Vendor | Plan | Per year |
|---|---|---|
| Alpaca Markets | Free (IEX feed) | $0 |
| Tiingo | Tiingo Power | $360 |
| Financial Modeling Prep | Ultimate | $1,668 |
| Databento | Standard | $2,388 |
| Massive (formerly Polygon.io) | Stocks Advanced | $2,388 |
| Alpha Vantage | No plan fits | — |
What is AI Fin Hub?
A free, independent set of tools and articles for engineers who build with LLMs in trading and finance. The tools work out model and data costs, validate backtests and test agents in a browser tab; the articles carry their formulas and sources, so any number can be checked. It is education, not investment advice, and it has no sponsors or affiliate links.
Start with the decision you need to make
-
Plan your agent stack
Estimate first-year cost for an LLM agent — token budget, vendor selection, MCP servers.
Start with Agent Cost Envelope Calculator, then Token-Cost Optimizer, Market Data API Cost Calculator and Finance MCP Directory.
-
Validate your strategy
Pressure-test a quant or LLM-augmented strategy before paper-trading or production.
Start with Backtest Overfitting Score, then Walk-Forward Validator, Calibration Dojo and Kelly Criterion Calculator.
-
Audit your pipeline
Catch hallucinations, prompt injections, and regression drift before they ship.
Start with Hallucination Detector, then Prompt Regression Tester, Prompt Injection Tester, Agent Skill Tester for Markets and Price-Blind Research Auditor.
-
Size your bets
Compute Kelly fraction, drawdown bounds, and correlated exposure across a book.
Start with Kelly Criterion Calculator, then Risk-Adjusted Returns Calculator, Returns Distribution Analyzer and Portfolio Correlation Matrix.
-
Explore market structure
Inspect order books, options payoffs, and cross-venue arb in a sandbox before going live.
Start with Order Book Replay Visualizer, then Kalshi vs Polymarket Arbitrage Calculator, Options Greeks Calculator, Options Payoff Calculator and Pair Trading Cointegration Tester.
Contents
All 44 tools on one pageCalculators 16
Inputs to numbers you can act on
- Agent Cost Envelope Calculator Model an LLM research loop end-to-end — steps, tool calls, convergence checks, markets per day — and see per-loop, daily, and monthly cost with cost-cap recommendations.
- Backtest Overfitting Score Upload a backtest trade log and compute Probability of Backtest Overfitting (PBO), Deflated Sharpe Ratio, and the odds your edge survives live trading.
- Batch vs Real-Time Cost Calculator Jobs per day, tokens per job, model, deadline — get real-time vs batch cost side-by-side with savings estimate and batch-eligibility flag. Based on vendor-published batch pricing.
- Deflated Sharpe Ratio Calculator Bailey & López de Prado deflated Sharpe — corrects observed Sharpe for selection bias across K trials. Reports deflated Sharpe, PSR (probability of skill), and the multiple-testing haircut.
- Drawdown-Recovery Markov Simulator Time to recover from an N% drawdown given monthly Sharpe + skew + kurtosis. Cornish-Fisher Monte Carlo, percentile distribution of recovery months.
- Earnings-Call Summarization Cost Calculator LLM cost per stock per quarter to summarize earnings transcripts with current Claude, GPT and Gemini models. Cache-hit-rate aware; prices from a dated model catalog.
- Efficient Frontier Calculator Paste a multi-asset returns CSV. See the Markowitz mean-variance frontier, the minimum-variance portfolio, the max-Sharpe (tangency) portfolio, and the per-asset weights for each highlighted point. Closed-form solution,
- Financial Document Token Estimator Paste a 10-K, 10-Q, 8-K or earnings transcript and see token count + one-pass extraction cost across ten frontier LLMs, with cache-hit toggle.
- Kelly Criterion Calculator Size positions with full, half, quarter, or eighth Kelly and stress-test the choice with a drawdown Monte Carlo simulator.
- Portfolio Correlation Matrix Paste a multi-asset returns CSV. See the Pearson correlation heatmap, condition number, average absolute correlation, and eigenvalue concentration — the diagnostics for detecting redundant strategies before you allocate capital.
- Position Sizing under Edge Variance Bayesian-Kelly bet sizing when your edge is itself uncertain. Compare deterministic Kelly, Bayesian-adjusted, and conservative lower-bound versions. Includes 5%-CVaR.
- Returns Distribution Analyzer Paste a returns CSV. Histogram, normal QQ plot, skewness, excess kurtosis, Jarque-Bera test, tail-weight index. See why Sharpe alone misleads.
- Risk-Adjusted Returns Calculator Paste a returns CSV. Sharpe, Sortino, Calmar, Omega, alpha, beta, tracking error, information ratio, max drawdown, and tail moments — plus a benchmark-relative block when you include one.
- Sharpe Ratio Calculator Paste daily returns; get Sharpe, Sortino, Calmar, and Omega side-by-side with a recommendation on which ratio fits your distribution.
- Statistical Arbitrage Capacity Calculator Maximum strategy AUM from alpha, slippage, fees, daily volume and volatility, and signal half-life. Square-root impact closed-form.
- Token-Cost Optimizer Compute the dollar cost of a trading research loop across Claude, GPT and Gemini: prompt length × model × retries × call volume → cost per idea and per validated trade.
Comparators 4
Vendors and models side by side
- Broker API Comparator Alpaca vs IBKR vs Tradier vs Schwab vs Robinhood — compare auth, rate limits, order types, market data, MCP, and fees before wiring a line of code.
- Kalshi vs Polymarket Arbitrage Calculator Check a Kalshi vs Polymarket arbitrage after both venues' published fees: enter the YES and NO asks, get both trade directions, fees and net profit.
- Market Data API Cost Calculator Compute annual cost of market data across Databento, Massive (formerly Polygon), Alpaca, Tiingo, FMP, and Alpha Vantage for your exact universe, bar resolution, and real-time needs.
- Model Selector for Finance Input task, latency budget, cost budget, context size, and quality sensitivity; get ranked model recommendations with rationale — grounded in published pricing and vendor capabilities, not benchmark scores.
Playgrounds 19
Test agents, prompts and models
- Agent Skill Tester for Markets Paste a SKILL.md definition + sample input + your Anthropic API key. See structured extraction, token cost, and latency — all in your browser. No signup, key never leaves the page.
- Calibration Dojo Train your probabilistic intuition. Answer binary forecasting questions at any confidence level; track Brier score and reliability curve over time. All state stored locally.
- Cointegration Half-Life Solver Engle-Granger residual ADF + Ornstein-Uhlenbeck half-life from any two price/return series. Hedge ratio, p-value, spread chart.
- Execution Simulator Estimate execution cost in closed form with the Almgren et al. (2005) impact model: permanent and temporary impact, half-spread, and a latency-drift band. See the slippage a naive backtest hides.
- Fallback Chain Simulator Define a provider fallback chain, simulate rate-limit and latency failures, and see p50/p95/p99 latency, success rate, total cost, and the degradation-event distribution.
- Forecast Scoring Sandbox Paste a forecast stream (probability + outcome) and see Brier score with full decomposition, log loss, reliability diagram, and bootstrap confidence intervals. Works on any prob + binary outcome CSV.
- Hallucination Detector Paste a source document + an LLM's extraction. Every numeric claim in the output is checked against the source. Client-side. Catches silent fabrication before it ends up in your pipeline.
- LLM Finance Error Taxonomy 12 documented LLM failure modes in finance, from hallucinated tickers and stale prices to unit, currency and off-by-100 errors. Paste output to see flags.
- Options Greeks Calculator Black-Scholes pricer + live Greeks visualizer. Drag spot, strike, vol, DTE, rate, dividend yield — see delta, gamma, theta, vega, rho update with the payoff curve. Call + put.
- Options Payoff Calculator Build 1–4 leg option strategies. Pick call/put, long/short, strike, and contracts. See the at-expiry payoff diagram, break-even points, maximum profit and loss, and the aggregated Greeks at current spot. Presets for straddle, strangle, iron condor, spreads, butterfly.
- Order Book Replay Visualizer Drop a Level-2 snapshot CSV and replay the book snapshot by snapshot. Animated depth bars, best bid/ask, spread and imbalance. Understand microstructure before.
- Pair Trading Cointegration Tester Paste two price series. Engle-Granger cointegration test: OLS hedge ratio, Augmented Dickey-Fuller on residuals, Ornstein-Uhlenbeck half-life, z-score time series with configurable entry/exit bands. Everything
- Price-Blind Research Auditor Paste a research prompt or agent context bundle. The auditor flags price numbers, directional words, and outcome-leaking phrases that cause LLMs to retroactively rationalize positions. Builds a price-blind research boundary.
- Prompt Injection Tester Red-team a finance agent against 23 documented prompt-injection attacks — direct override, role confusion, indirect injection via retrieved content.
- Prompt Regression Tester Run the same prompt against current Claude, GPT and Gemini models with your own keys. Diff outputs, score drift, catch regressions.
- Structured Schema Validator for Finance Paste LLM JSON output and validate against four pre-built finance schemas — research output, trade decision, risk snapshot, peer comparison — with sanity checks on unit and GAAP basis.
- VaR Backtest — Kupiec & Christoffersen Paste P&L + VaR series and run Kupiec POF, Christoffersen independence, and joint conditional-coverage tests. Likelihood-ratio χ² p-values.
- Walk-Forward Validation Visualizer Paste a strategy returns CSV, get per-window in-sample vs out-of-sample Sharpe and the IS→OOS drop. Rolling and anchored window modes.
- Walk-Forward Validator Upload a returns CSV. Rolling or expanding IS/OOS windows, per-window Sharpe, walk-forward efficiency, and a concatenated OOS equity curve. Catches regime decay that PBO alone misses.
Generators and catalogs 5
Blueprints, configurations and directories
- Finance MCP Directory Security-graded catalog of finance MCP servers from Alpaca, Massive, IBKR, Tradier, TradeStation, Robinhood and tastytrade: scope, auth, idempotency.
- Quant Interview Question Generator Curated bank of probability, stats, derivatives, microstructure, and regression questions across easy/medium/hard difficulty. Reproducible by seed. Nothing generated live.
- SEC Filing Chunk Optimizer Pick a filing archetype, tune chunk size and overlap, and see chunk count, embedding cost, and structural-boundary warnings across three chunking strategies.
- Synthetic Market Data Generator Generate synthetic price series — geometric Brownian motion, GARCH(1,1) with volatility clustering, regime-switching bull/bear, or copula-linked correlated pairs. Download CSV/JSON. For backtest scaffolding when you cannot share real data.
- Trading System Blueprinter Pick your data source, LLM, broker, storage, risk engine, and logger. Get a Mermaid architecture diagram and a copyable starter file tree — the full stack before you write code.
Research
All 63 articles- Long-Context Financial Question Answering: SEC Filings & RAG 2026
Long-context financial question answering over SEC filings, annual reports & earnings calls with RAG: eight LLM tasks, chunking, and 2026 benchmarks.
14-minute read, April 23, 2026
- Deflated Sharpe Ratio: Bailey-Lopez de Prado Worked Example
Deflated Sharpe ratio derived from Bailey & Lopez de Prado (2014), with a 1,000-trial Monte Carlo, the skew-kurtosis denominator, and the deflation table.
11-minute read, May 9, 2026
- State of LLM Pricing for Finance Q3 2026
Vendor pricing for 21 LLM tiers across six providers — Anthropic Opus 4.8 + Fable 5, OpenAI GPT-5.5, Google Gemini 3.5 Flash, xAI Grok 4.3, DeepSeek V4, Mistral.
18-minute read, June 21, 2026
Pricing benchmarks are dated and re-checked against vendor pages: all benchmarks.
Vendor and API pricing
- Broker API rate limits 2026
Request caps, order types and option-chain polling at Interactive Brokers, Alpaca, Tradier and Schwab.
- Polygon.io (Massive) pricing 2026, plan by plan
Every Stocks tier from free Basic to $199 Advanced, with annual prices and the other asset-class ladders.
- Market data API pricing 2026
Massive, Databento, Alpaca, Tiingo, FMP and Alpha Vantage, matched to the workload.
- Polygon.io to Massive migration
What changed for engineers: API hosts, SDK packages, WebSocket and flat-file endpoints.
- Polygon.io futures, forex and options
What Massive covers beyond stocks, and what each real-time plan costs.
- Finnhub free tier and pricing 2026
The 60-calls-per-minute free tier, the paid ladder and the commercial-use catch.
- FMP API pricing 2026
Free Basic at 250 calls a day, then $29, $69 and $139 a month, and the display licence.
Reference
- Reference grids
Lookup tables computed by the tools
- Alternatives
Switching options for each data and broker vendor