Personal trading agent with shadow-account backtesting via Vibe-Trading
Discovered from README cross-links · 2 days ago
Turn a repo into an agent that researches, backtests, and paper-trades markets.
What they did
They took the Vibe-Trading repo and stood up a personal trading agent rather than a one-off script. Starting from the pip-installable `vibe-trading-ai` package (Python 3.11+, FastAPI backend, React 19 frontend), they installed the package, configured model and market-data credentials, and exposed the agent's trading capabilities over the bundled API/MCP server so an existing agent client could call them as tools. They then used the Shadow Account feature to run strategies against historical data without risking capital, iterating on prompts and parameters until the agent produced coherent research notes, candidate trades, and a paper portfolio. Finally they reviewed the shadow-account results, checked the agent's reasoning against the underlying data, and kept the whole loop inside a repo so runs were reproducible and diffable.
How it went
A working local agent that can research instruments, propose trades, and log them to a shadow account, with a browsable React UI and an MCP endpoint other agents can call. Polish is good for a self-hosted tool: install is one pip command, docs and a demo site exist, and the shadow account makes results inspectable before any real money moves. Limits show up around data quality and model judgment rather than plumbing.
Worth knowing
This is not financial advice and the repo explicitly disclaims any token or memecoin — ignore impersonating accounts and contracts. You need your own model API keys and market-data access, and backtest results depend heavily on data quality and survivorship bias. Shadow-account performance does not predict live returns; brokerage integration and order routing are not a substitute for risk controls. Pin versions, since the project ships frequently and some features are marked unreleased.
Wiring
Order matters: install `vibe-trading-ai` into an isolated Python 3.11+ environment, then supply credentials via environment variables (model provider key, market-data key) before starting anything, because the FastAPI backend reads them at boot. Start the backend, verify its health endpoint, then point the React frontend at it or skip the UI and use the API directly. For agent use, enable the MCP server and register its endpoint with the client so trading capabilities appear as callable tools; the agent then chains data lookup → strategy reasoning → shadow-account order logging. Keep the shadow account as the default execution target and gate any live brokerage adapter behind an explicit config flag plus a separate credentials file. Store run configs and outputs in versioned directories so backtests are reproducible.
Try it yourself
Set up Vibe-Trading in this repo as my personal trading agent. Steps: (1) create a Python 3.11 virtualenv and `pip install vibe-trading-ai`, pinning the version in requirements; (2) add a `.env.example` with placeholders for my model API key and market-data credentials, and make sure `.env` is gitignored; (3) start the local API/MCP server and confirm the health endpoint responds; (4) register the MCP tools with my agent client and list the available trading tools; (5) create a Shadow Account, run one simple strategy over the last 12 months on a small watchlist, and save the config plus results under `runs/`; (6) write a short README section explaining how to reproduce the run and where the caveats about data quality and non-advisory status live. Do not connect any real brokerage account or wallet.