Repository navigation
Releases
Releases · Kuzi-DEV/Tokio-ai
0.7.0: vol surface, put/call data, case studies, MCP server
tokio_ai.vol_surface(symbol): a 3D implied-volatility surface from free
data. Downloads Cboe's delayed option chain (no key) and computes every
vol itself: forwards from put-call parity, out-of-the-money options only,
vols at the bid, mid and ask so you can see how much of the shape is
spread.surf.plot()draws an interactive plotly surface (no
extrapolation);atm_term_structure(),smile(),grid()andpoints
give the numbers. Matches Cboe's own SPX vols to a median 0.03 vol points.tokio_ai.load_put_call(kind): daily Cboe put/call volume, 2006 to
today, free. Stitches Cboe's historical CSVs and daily statistics files,
caches them on disk, and lists the known definitional breaks in
df.attrs["notes"].- MCP server (
tokio-ai-mcp,pip install "tokio-ai[mcp]") for Claude Code,
Cursor and other assistants: price data, check_backtest, backtest_positions
(vs the market by default), check_contracts, vol_surface, put_call. A
session ledger corrects every verdict for every variant checked in the
session. - Case studies (
docs/case-studies.md, scripts inexamples/case_studies/):
put/call sentiment, selling VIX futures, the overnight premium. - Colab notebook: section 8, the volatility surface; section 9, testing
put/call sentiment withcheck_many.
Claude Code plugin: claude plugin install tokio-ai --marketplace Kuzi-DEV/tokio-plugin (needs uv).
TokIO 0.6.0: an honest backtester
tokio_ai.Lab: backtest here, honestly. Writesignal(data, **params)
returning positions; the lab fills them at the next bar's open with
commission and slippage, refuses signals that use future data (a prefix
re-run test), counts every variant run and corrects for all of them in
lab.check(), keeps a holdout locked until a singlefinal_test(), and can
test against exposure-matched buy-and-hold (vs="market"). Matches
vectorbt to 1e-16 per bar without fees. On 400 no-edge markets x 14
variants: best variant's own p < 0.05 in 20.5%,lab.check()2.8%
(scripts/calibration_lab.py).lab.best()andlab.final_test(run): spend the holdout on the strongest variant.- Colab notebook: a "let TokIO run it" section (sweep vs the market, a
lookahead caught, one holdout look). tokio_ai.load_prices(symbol): full daily history from Yahoo (SPY from
1993), split- and dividend-adjusted.range=maxcould come back silently
downsampled; an explicit date span doesn't.- Clearer wording when a result's returns already include their costs.
The agent's plain-English strategy tools are held back until model-written code runs in an isolated process.
TokIO 0.5.1
Moved to github.com/Kuzi-DEV/Tokio-ai (homepage kuzi-dev.github.io/Tokio-ai). Old links redirect. No code changes.
TokIO 0.5.0: is your backtest real?
Is your backtest real? 0.5.0 turns TokIO into a backtest checker.
check_backtest: HAC test of the mean, Romano-Wolf correction for every variant tried,
haircut Sharpe, costs and breakeven cost, probability of backtest overfitting.- Deflated and Probabilistic Sharpe Ratios and the minimum track record length, as
published and corrected for dependence. The published PSR passes 38% of zero-edge
strategies on overlapping trades; the corrected one holds 4-8%. - Lookahead check: re-runs positions one bar later.
- Works directly on vectorbt, backtesting.py and TradingView trade exports; Pine Script
table for the TradingView chart. pip install tokio-ainow needs only numpy; the research agent istokio-ai[agent].
Full list in CHANGELOG.md. Try it in Colab: examples/check_your_backtest.ipynb.
v0.2.0 — Full-screen terminal UI
New feature release: a full-screen terminal UI, now the default tokio-ai experience.
- New
tokio_ai.tuimodule, built with Textual: a dark-themed screen with a "TOKIO AI" banner, a scrollable bordered chat log, and an input box pinned at the bottom. Agent calls run in a background worker so the UI stays responsive during slower (free-tier) LLM round trips. tokio-ainow launches the TUI by default. The previous plain-text REPL moved totokio-ai-plain(still reachable viapython -m tokio_ai.cli) for scripting, piping, or terminals that can't render a full-screen app. Pure presentation layer -- both entry points share the same underlyingAgentclass, no logic duplicated.- Verified with Textual's headless pilot test framework (no real terminal or network needed) plus a rendered SVG snapshot to visually confirm the layout.
- Fixed a real legibility bug caught in review: the initial hand-drawn ASCII-art banner rendered the letter "I" as a plain vertical bar, indistinguishable from a "T" at a glance. Replaced with a proper figlet font where I renders as a distinct slanted stroke.
Full details: CHANGELOG.md
v0.1.1 — Bug-fix release
Bug-fix release. A deep-dive audit (manual pass + an independent code-review pass) found and fixed 7 real bugs, two of which shipped in 0.1.0:
permutation_testcould reportp=0.0exactly. With finite Monte Carlo resampling that overclaims certainty -- fixed with the standard plus-one correction,(hits+1)/(iters+1)(Phipson & Smyth 2010).- Windows encoding bug, live in 0.1.0: reading the bundled S&P 500 CSV without
encoding="utf-8"corrupted names like "Brown-Forman" into mojibake under Windows' default cp1252 codepage. CI now also runs onwindows-latest(previously Linux-only, which is why this shipped unnoticed). TestLedger.verdict()returned the first match by hypothesis name, not the latest -- reusing a name silently reported a stale result forever.recent_filings(limit=0)returned 1 result instead of 0.top_performers(top_n=-N)silently returned "all but the last N" via Python slice semantics instead of erroring.- Agent conversation history could end up inconsistent after an API failure mid-turn, or after exhausting the tool-call round limit.
.envparsing broke on quoted values (KEY="value") and had the same missing-encoding bug as the CSV reader.
Full details: CHANGELOG.md