<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Backtesting on KnightLi Blog</title>
        <link>https://knightli.com/en/tags/backtesting/</link>
        <description>Recent content in Backtesting on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Fri, 03 Jul 2026 09:58:13 +0800</lastBuildDate><atom:link href="https://knightli.com/en/tags/backtesting/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Vibe-Trading: connecting natural-language research, backtesting, and trading tools to an AI Agent</title>
        <link>https://knightli.com/en/2026/07/03/vibe-trading-ai-trading-agent-guide/</link>
        <pubDate>Fri, 03 Jul 2026 09:58:13 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/07/03/vibe-trading-ai-trading-agent-guide/</guid>
        <description>&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/HKUDS/Vibe-Trading&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;HKUDS/Vibe-Trading&lt;/a&gt; is an open-source AI Agent workspace for trading research. Its positioning is direct: one command gives an agent a broad set of trading research capabilities. It combines natural-language questions, market-data loading, strategy generation, backtesting, reports, MCP tools, and persistent research memory. The goal is not to magically make money for you, but to turn research questions into runnable, inspectable, reviewable analysis workflows.&lt;/p&gt;
&lt;p&gt;More precisely, Vibe-Trading fits three kinds of work. First, it can turn a trading idea into a backtest task quickly. Second, it can let multi-agent teams research investing, quant, risk, crypto, and macro topics. Third, it can import your own trading records, analyze behavioral bias, and generate a Shadow Account comparison report. It also supports broker connectors and limited order-placement capabilities, but that part must be treated with strict boundaries: the project does not custody funds, execution happens through brokers you authorize, and you need to understand risk, permissions, and audit mechanisms before using it.&lt;/p&gt;
&lt;p&gt;This article breaks the project down from the perspective of developers and quant research users.&lt;/p&gt;
&lt;h2 id=&#34;what-problem-vibe-trading-solves&#34;&gt;What problem Vibe-Trading solves
&lt;/h2&gt;&lt;p&gt;Many AI trading tools stop at &amp;ldquo;let the model write an analysis&amp;rdquo; or &amp;ldquo;generate a strategy code snippet.&amp;rdquo; Vibe-Trading tries to complete more of the loop: understand the question, choose data sources, fetch market context, generate or call tools, run backtests, output metrics and reports, and preserve the process for later follow-up.&lt;/p&gt;
&lt;p&gt;The workflow roughly looks like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The user asks a question in natural language, such as &amp;ldquo;backtest a BTC-USDT 20/50 moving-average strategy.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;The agent selects relevant skills, tools, data sources, or a swarm preset.&lt;/li&gt;
&lt;li&gt;The data-loading layer pulls A-share, HK, US, crypto, futures, forex, or local data.&lt;/li&gt;
&lt;li&gt;The system generates testable strategy code and calls the matching backtest or analysis tools.&lt;/li&gt;
&lt;li&gt;It outputs returns, drawdown, benchmark comparison, validation reports, run cards, and reusable artifacts.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That makes it closer to a trading research console than a plain chatbot.&lt;/p&gt;
&lt;h2 id=&#34;core-capabilities&#34;&gt;Core capabilities
&lt;/h2&gt;&lt;p&gt;The project README groups its capabilities into several major modules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Self-improving trading agent: natural-language market research, strategy drafts, file and web analysis, and memory-backed workflows.&lt;/li&gt;
&lt;li&gt;Multi-agent trading teams: built-in presets for investment, quant, crypto, macro, and risk teams, with runtime progress and persisted reports.&lt;/li&gt;
&lt;li&gt;Cross-market data and backtesting: A-share, HK, US, crypto, futures, and forex coverage, with data fallback, composite backtests, PIT data, and validation artifacts.&lt;/li&gt;
&lt;li&gt;Shadow Account: extract behavior patterns from real trade records, generate a rule-based shadow strategy, and compare it with actual trading paths.&lt;/li&gt;
&lt;li&gt;Alpha Zoo: hundreds of built-in quant factors that can be evaluated with one command for IC, IR, alive/reversed/dead categorization.&lt;/li&gt;
&lt;li&gt;MCP integration: expose trading research capabilities to clients such as Claude Desktop, Cursor, and OpenClaw that support MCP.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These capabilities are broad. For a first integration, do not enable everything at once. A steadier path is to run a natural-language backtest first, then evaluate data sources, reports, Shadow Account, and MCP integration.&lt;/p&gt;
&lt;h2 id=&#34;quick-install&#34;&gt;Quick install
&lt;/h2&gt;&lt;p&gt;The simplest route is installing the PyPI package:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install vibe-trading-ai
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;After installation, you get three main commands:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading      # interactive CLI / TUI
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading serve # start the FastAPI web service
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading-mcp  # start the MCP server
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;For a first run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading init
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading run -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;Backtest a BTC-USDT 20/50 moving-average strategy for 2024 and summarize return and drawdown&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you are upgrading from an older version, the README notes that 0.1.10 moved to LangChain 1.x. If imports break after an in-place upgrade, recreate the virtual environment or run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install --force-reinstall vibe-trading-ai
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;docker-path&#34;&gt;Docker path
&lt;/h2&gt;&lt;p&gt;For a quick trial, use Docker:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone https://github.com/HKUDS/Vibe-Trading.git
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; Vibe-Trading
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cp agent/.env.example agent/.env
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Edit agent/.env and set your LLM provider and API key&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker compose up --build
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then open:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;http://localhost:8899
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Docker publishes the backend at &lt;code&gt;127.0.0.1:8899&lt;/code&gt; by default and runs as a non-root container user. Keep those security defaults. If you intentionally expose the API to a LAN or the public internet, set a strong &lt;code&gt;API_AUTH_KEY&lt;/code&gt;, and send:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Authorization: Bearer &amp;lt;your-api-key&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If the app inside Docker needs to reach Ollama on the host, do not use &lt;code&gt;localhost:11434&lt;/code&gt;. Inside the container, &lt;code&gt;localhost&lt;/code&gt; means the container itself. The project defaults to:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;http://host.docker.internal:11434
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;local-development-install&#34;&gt;Local development install
&lt;/h2&gt;&lt;p&gt;If you want to modify code or use the full CLI locally, install from source:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone https://github.com/HKUDS/Vibe-Trading.git
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; Vibe-Trading
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python -m venv .venv
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;source&lt;/span&gt; .venv/bin/activate
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install -e .
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cp agent/.env.example agent/.env
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;On Windows PowerShell, activate the virtual environment with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.\.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;venv&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Scripts&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Activate&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;ps1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The Web UI can be started separately:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading serve --port &lt;span class=&#34;m&#34;&gt;8899&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;For the frontend dev server:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; frontend
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;npm install
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;npm run dev
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The default frontend URL is:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;http://localhost:5899
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;environment-variables&#34;&gt;Environment variables
&lt;/h2&gt;&lt;p&gt;Vibe-Trading needs an LLM provider. The README lists OpenRouter, OpenAI, DeepSeek, Gemini, Groq, DashScope/Qwen, Zhipu, Moonshot/Kimi, MiniMax, Xiaomi MIMO, Z.ai, and local Ollama.&lt;/p&gt;
&lt;p&gt;Common environment variables include:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;LANGCHAIN_PROVIDER
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&amp;lt;PROVIDER&amp;gt;_API_KEY
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&amp;lt;PROVIDER&amp;gt;_BASE_URL
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;LANGCHAIN_MODEL_NAME
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;TUSHARE_TOKEN
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;TIMEOUT_SECONDS
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;API_AUTH_KEY
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;VIBE_TRADING_ENABLE_SHELL_TOOLS
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;VIBE_TRADING_ALLOWED_FILE_ROOTS
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;VIBE_TRADING_ALLOWED_RUN_ROOTS
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;CONTENT_FILTER_WARNING_THRESHOLD
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;code&gt;API_AUTH_KEY&lt;/code&gt; is important for network deployments. &lt;code&gt;VIBE_TRADING_ENABLE_SHELL_TOOLS&lt;/code&gt; should be enabled carefully because it involves shell-capable tools. A normal local research workflow does not need high-risk capabilities turned on at the start.&lt;/p&gt;
&lt;p&gt;The project also supports the OpenAI Codex OAuth path:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading provider login openai-codex
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This uses ChatGPT OAuth instead of &lt;code&gt;OPENAI_API_KEY&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;data-sources-and-fallback&#34;&gt;Data sources and fallback
&lt;/h2&gt;&lt;p&gt;One useful part of Vibe-Trading is its data-loading layer. The README says the project currently has 18 market-data sources, covering:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A-share: &lt;code&gt;tencent&lt;/code&gt;, &lt;code&gt;mootdx&lt;/code&gt;, &lt;code&gt;eastmoney&lt;/code&gt;, &lt;code&gt;baostock&lt;/code&gt;, &lt;code&gt;akshare&lt;/code&gt;, &lt;code&gt;tushare&lt;/code&gt;, &lt;code&gt;local&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;US equities: &lt;code&gt;yahoo&lt;/code&gt;, &lt;code&gt;stooq&lt;/code&gt;, &lt;code&gt;sina&lt;/code&gt;, &lt;code&gt;eastmoney&lt;/code&gt;, &lt;code&gt;yfinance&lt;/code&gt;, &lt;code&gt;tiingo&lt;/code&gt;, &lt;code&gt;fmp&lt;/code&gt;, &lt;code&gt;finnhub&lt;/code&gt;, &lt;code&gt;alphavantage&lt;/code&gt;, &lt;code&gt;akshare&lt;/code&gt;, &lt;code&gt;local&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;HK equities: &lt;code&gt;eastmoney&lt;/code&gt;, &lt;code&gt;yahoo&lt;/code&gt;, &lt;code&gt;futu&lt;/code&gt;, &lt;code&gt;yfinance&lt;/code&gt;, &lt;code&gt;akshare&lt;/code&gt;, &lt;code&gt;local&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Crypto: &lt;code&gt;okx&lt;/code&gt;, &lt;code&gt;ccxt&lt;/code&gt;, &lt;code&gt;yfinance&lt;/code&gt;, &lt;code&gt;local&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Futures, funds, macro, and forex: mainly through &lt;code&gt;tushare&lt;/code&gt;, &lt;code&gt;akshare&lt;/code&gt;, and &lt;code&gt;local&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With &lt;code&gt;source: &amp;quot;auto&amp;quot;&lt;/code&gt;, the loader falls back by market and IP-ban risk. For ordinary users, this is much easier than manually handling the availability of every source. For serious research, you should still record the actual data source, time range, adjustment method, and missing-data handling logic.&lt;/p&gt;
&lt;p&gt;If you have your own historical data, use the &lt;code&gt;local:&lt;/code&gt; prefix to connect CSV, Parquet, or DuckDB data. Note that Vibe-Trading&amp;rsquo;s loader layer is for point-in-time historical bars, not real-time ticks or order-book depth. Real-time trading and quotes should go through broker connectors.&lt;/p&gt;
&lt;h2 id=&#34;backtesting-and-research-flow&#34;&gt;Backtesting and research flow
&lt;/h2&gt;&lt;p&gt;The most common use is turning a research question into a runnable flow:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading run -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;Backtest a BTC-USDT 20/50 moving-average strategy for 2024, summarize return and drawdown, then export the report&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;For the built-in Alpha Zoo, run a factor bench directly:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top &lt;span class=&#34;m&#34;&gt;20&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The point is not to replace a rigorous quant platform. It is a fast research entry point: run the hypothesis first, then decide whether the result deserves stricter research, audit, and productionization.&lt;/p&gt;
&lt;h2 id=&#34;shadow-account-infer-behavior-patterns-from-trade-records&#34;&gt;Shadow Account: infer behavior patterns from trade records
&lt;/h2&gt;&lt;p&gt;Shadow Account is one of Vibe-Trading&amp;rsquo;s more distinctive features. It starts from your real trading records instead of an idealized strategy:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading --upload trades_export.csv
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading run -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;A typical flow includes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Read broker-exported trade records, such as Tonghuashun, Eastmoney, Futu, or generic CSV.&lt;/li&gt;
&lt;li&gt;Generate a behavior profile: holding days, win rate, PnL ratio, drawdown, disposition effect, overtrading, momentum chasing, anchoring, and related checks.&lt;/li&gt;
&lt;li&gt;Extract repeated entry and exit rules.&lt;/li&gt;
&lt;li&gt;Run a rule-based Shadow Account backtest and highlight rule breaks, early exits, missed signals, and alternative trade paths.&lt;/li&gt;
&lt;li&gt;Output an HTML/PDF report for review and archiving.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This is better for discovering systematic bias in your trading behavior than for issuing the next trade instruction. It is steadier as a review tool than as a real-time decision engine.&lt;/p&gt;
&lt;h2 id=&#34;mcp-and-agent-integration&#34;&gt;MCP and Agent integration
&lt;/h2&gt;&lt;p&gt;Vibe-Trading can run as an MCP server:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;vibe-trading-mcp
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;That means you can attach it to MCP-capable clients and expose market data, backtesting, report generation, Shadow Account, and similar capabilities as tools for an existing agent. For people already using Claude Desktop, Cursor, or other agent workflows, this is more natural than opening a separate app.&lt;/p&gt;
&lt;p&gt;MCP integration also expands the permission surface. File reads, generated code, shell tools, broker connectors, and API keys all need clear boundaries. In remote deployments, confirm &lt;code&gt;API_AUTH_KEY&lt;/code&gt;, allowed file roots, run roots, and shell-tool switches.&lt;/p&gt;
&lt;h2 id=&#34;recent-updates-worth-noting&#34;&gt;Recent updates worth noting
&lt;/h2&gt;&lt;p&gt;The Vibe-Trading README changes frequently. A few recent updates suggest the project is moving from &amp;ldquo;it runs&amp;rdquo; toward clearer boundaries and more stable runtime behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2026-07-02: factor calculation acceleration, and generated backtest subprocesses inherit only an allowlisted environment, reducing parent-process secrets exposure.&lt;/li&gt;
&lt;li&gt;2026-07-01: tighter API, Docker, and frontend development defaults, plus frontend dependency and CSP fixes.&lt;/li&gt;
&lt;li&gt;2026-06-30: the same agent session runtime can attach to 16 message channels, including Telegram, Slack, Discord, Matrix, WhatsApp, Feishu, DingTalk, Teams, and email.&lt;/li&gt;
&lt;li&gt;2026-06-29: broker-agnostic live advisory safety and a read-only Trading 212 connector.&lt;/li&gt;
&lt;li&gt;2026-06-19: v0.1.10 expanded the global data layer to 18 market-data sources and 18 read-only data tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Projects like this can become dangerous when capabilities grow faster than boundaries. The recent updates show work on security, runtime isolation, data fallback, frontend state, and message channels. Those are more important than simply piling on features.&lt;/p&gt;
&lt;h2 id=&#34;who-it-is-for-and-who-it-is-not-for&#34;&gt;Who it is for, and who it is not for
&lt;/h2&gt;&lt;p&gt;Vibe-Trading is suitable for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Quant researchers who want to generate research and backtesting flows from natural language.&lt;/li&gt;
&lt;li&gt;Developers who want to connect trading research capabilities into MCP / Agent workflows.&lt;/li&gt;
&lt;li&gt;Individual investors who want to review their own trade records and identify behavioral bias.&lt;/li&gt;
&lt;li&gt;Technical users evaluating multi-market data sources, Alpha Zoo, and swarm research teams.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It is not suitable for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Users expecting &amp;ldquo;automatic profits out of the box.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;People who do not understand data quality, backtest bias, and trading risk.&lt;/li&gt;
&lt;li&gt;Anyone who wants to connect unaudited strategies directly to real-money accounts.&lt;/li&gt;
&lt;li&gt;Users unwilling to configure API keys, permission boundaries, and a local environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One reminder matters: backtest results are not return guarantees, and agent output is not investment advice. Any live-trading behavior should have human review, risk limits, audit records, and an instant stop mechanism.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;Vibe-Trading&amp;rsquo;s value is moving trading research from &amp;ldquo;the model writes a few paragraphs&amp;rdquo; to &amp;ldquo;data, tools, backtests, reports, and memory form a reviewable workflow.&amp;rdquo; Its scope is broad: natural-language research, multi-agent teams, cross-market data, Alpha Zoo, Shadow Account, Web UI, CLI, MCP, and broker connectors all live in one project.&lt;/p&gt;
&lt;p&gt;In real use, start with the smallest path: run a read-only local CLI backtest, then inspect whether the data sources and report match expectations. Next, try Shadow Account or Alpha Zoo. Only after that should you consider MCP, Web deployment, and broker connectors. The most expensive mistakes in trading systems are often not about what a tool cannot do, but about users failing to define permission, data, risk, and audit boundaries clearly.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
