- 9,633GitHub stars
- 1,242Forks
- 28Contributors
- Nevertrades
Vectorbt is a fast Python backtesting library: feed it Moby candles and test thousands of signal and parameter combinations on a token in a few lines.
About
Vectorbt (pip install vectorbt) is a Python toolkit for trading research. It runs on NumPy and Numba, with an optional Rust engine. Indicators (vbt.MA.run, vbt.RSI, vbt.BBANDS and more) and signals run as arrays, so one call can sweep thousands of parameter combinations. vbt.Portfolio.from_signals then simulates them with fees and reports returns, drawdowns, trades and interactive charts.
What it adds to Moby. Fast parameter sweeps. Backtesting.py checks one rule on one token, and Vectorbt checks a whole grid of rules at once, like every fast/slow moving-average pair on a token's hourly candles.
How to pair it. Pull get_token_ohlcv for a Solana token, load it into a pandas DataFrame indexed by time (Moby returns candles newest-first, so reverse them), and run a crossover or RSI sweep. Use the result to shape a Moby strategy, not to pick a trade.
What it does not do. It doesn't trade or read Moby directly. Short, thin memecoin histories make sweeps overfit, so keep it to tokens with weeks of candles. Limit orders, leverage and parallelization are in the paid VectorBT PRO, not this open-source edition. Its license is Apache 2.0 with the Commons Clause: you can use, change and run it freely, but you may not sell it, or a product or service whose value comes mostly from it.
What's inside this repo
- Vectorized backtesting on pandas, NumPy and Numba, with an optional Rust engine
- vbt.Portfolio.from_signals / from_holding / from_random_signals simulate with fees and report stats
- Indicators such as vbt.MA, vbt.RSI, vbt.BBANDS; a custom indicator factory
- Flexible broadcasting: sweep thousands of parameter combinations in one call
- Signal tooling: generate, rank, map and analyse entries and exits
- Walk-forward optimization and label generation for ML
- Plotly charts and Jupyter widgets
- Extras: vectorbt[rust], vectorbt[full] (TA-Lib, Pandas TA, QuantStats)
Install steps
Third-party code: Moby does not audit or control it. Read the source before you run it.
pip install -U vectorbt(add"vectorbt[rust]"for the Rust engine or"vectorbt[full]"for all extras)- Export a token's candles from Moby's
get_token_ohlcv, reverse them to oldest-first, and loadcloseinto a pandas Series indexed by time. - Run a crossover:
fast = vbt.MA.run(price, 10); slow = vbt.MA.run(price, 50); pf = vbt.Portfolio.from_signals(price, fast.ma_crossed_above(slow), fast.ma_crossed_below(slow), init_cash=100); print(pf.stats()) - Docs: https://vectorbt.dev
- Ask:
Pull 30 days of hourly candles for <token> with get_token_ohlcv, put them oldest-first, and sweep fast/slow moving averages from 5 to 50 with vectorbt. Show the top five pairs by Sharpe and their max drawdown.
Permissions
- Reads
- OHLCV data you load (for example exported from Moby's get_token_ohlcv)
- Writes
- Local backtest results and charts
- Tools
- Python library `vectorbt` (pip); Python 3.11 to 3.14
- Trade
- Never trades
Review
Reviewed Nov 2, 2026. Source matches repo at commit 70da8fe
Links
- Repository: https://github.com/polakowo/vectorbt
- Docs: https://vectorbt.dev
- Website: https://vectorbt.dev
How it works with Moby
Vectorbt works on its own. With Moby your agent can also trade on what it finds.
- Set up AI Trading
In the Moby app: create your agent and fund its Solana wallet.
Get the app - Connect Moby MCP
Whale, KOL and smart-money data, plus buy, sell, SL and TP from the agent wallet.
View Moby MCP - Install Vectorbt
Your agent runs it alongside Moby's on-chain data and trades inside your Guardrails.
Install
Related
- KronosKronos, an open-source foundation model for candlesticks, forecasts…
- Vibe-TradingVibe-Trading turns a trading idea into research and a backtest on…
- TradingAgentsTradingAgents runs a desk of LLM analysts who debate a stock or…
- Chronos (Amazon)Amazon's open Chronos models forecast a token's price with an…
- Moby MCP connectorConnect any MCP-capable agent to Moby for live on-chain research on…
- Moby KnowledgeThe /agents page and agents.md as your agent's Moby reference: how…
Reviewed Nov 2, 2026 · Report this item
