Weekly Investor Sentiment AI Trading Bot ======================================== .. meta:: :description: Python AI trading bot that tracks weekly investor sentiment across web, financial news, and YouTube/social trends (with optional vidIQ MCP plug-in) to hold 4 to 8 diversified stocks or ETFs. .. image:: ../docs/assets/ai-agent-workflows/weekly-investor-views-vidiq-bot.png :alt: Research agent scans weekly investor sentiment across web, news, and YouTube/social trends and hands ideas to the trading agent :width: 100% Every week, prominent fund managers, macro strategists, and market commentators share their highest-conviction ideas across financial news, public letters, podcasts, and YouTube/social channels. This bot runs a weekly LumiBot research agent over open web, news, and social/YouTube sources out of the box, with an optional vidIQ MCP plug-in for deeper YouTube transcript analysis, and hands four to eight diversified stock or ETF picks to a trading agent. .. admonition:: View or Run on BotSpot Marketplace :class: tip Explore live AI trading bots, cloud backtests, and one-click broker connections on BotSpot Marketplace without local setup. .. raw:: html
View / Run on BotSpot Marketplace
How it works ------------ This strategy runs on a weekly cadence (Mondays, or immediately on first launch) using two specialized agents: 1. **Research agent** scans weekly investor sentiment across financial news, web articles, letters, podcasts, and YouTube or social trends covering investors such as Ray Dalio, Bill Ackman, Stan Druckenmiller, Chris Camillo, Peter Thiel, Paul Tudor Jones, David Einhorn, Howard Marks, Warren Buffett, and David Tepper. Set ``use_vidiq_mcp=True`` to optionally plug in the remote vidIQ MCP server via LumiBot's built-in ``MCPServer`` client for extra YouTube search and transcript coverage. It returns four to eight concrete stock or ETF ideas with dates and theses. 2. **Trading agent** builds a diversified portfolio of four to eight holdings mirroring those verified ideas, investing roughly 95% of available equity with at most 25% in any single ticker. When weekly investor sentiment shifts, it sells outdated holdings first, never shorts, and never exceeds available cash. Want to follow a different list of investors, industry podcasts, or sector experts? Edit the names directly in the researcher's prompt. Run it on BotSpot ----------------- Explore AI strategies and run bots in the cloud on `BotSpot Marketplace `_. BotSpot hosts LumiBot strategies, tracks backtests, and links your broker account without local server maintenance. Using Claude, ChatGPT, Codex, or Cursor to customize this bot? Connect the free :doc:`BotSpot MCP ` for LumiBot strategy skills and cloud backtesting. Want structured guidance on connecting external MCP servers and live trading bots? Check out `BotSpot Courses `_ or join the `free AI Trading Challenge `_. The code -------- The full strategy fits in under 100 lines of Python, runs out of the box with built-in web and news research, and shows how cleanly an optional remote MCP server (such as vidIQ) plugs in via ``MCPServer``. .. literalinclude:: ../lumibot/example_strategies/ai_weekly_investor_views_vidiq.py :language: python Run it yourself --------------- .. code-block:: bash pip install lumibot python -m lumibot.example_strategies.ai_weekly_investor_views_vidiq Set ``OPENAI_API_KEY`` and your broker credentials (for example ``ALPACA_API_KEY``, ``ALPACA_API_SECRET``, and ``ALPACA_IS_PAPER=true``) in your ``.env`` file. To enable the optional vidIQ YouTube MCP plug-in, also set ``VIDIQ_API_KEY`` and pass ``parameters={"use_vidiq_mcp": True}``. To run locally with a ChatGPT subscription instead of an OpenAI API key, follow :doc:`agents_chatgpt` and change ``model`` to ``chatgpt/gpt-6-luna``. With ``IS_BACKTESTING=true``, the script runs a historical backtest on Yahoo Finance daily data over ``BACKTESTING_START`` and ``BACKTESTING_END``. With ``IS_BACKTESTING=false``, the same strategy runs live with your configured broker. Good to know ------------ * No third-party MCP key is required by default; built-in web and news research works immediately, and vidIQ MCP is an opt-in plug-in for deeper YouTube transcript analysis. * Weekly gating via ``self.vars`` ensures the agents run once per ISO week rather than re-querying web and social sources every single trading day. * In historical backtests, the research agent filters strictly to sources published before the simulated date, and web/MCP search availability for older material depends on what each source returns. * This example is inspired by public commentary and is not affiliated with or endorsed by any named investor or vidIQ. Backtest results do not guarantee future performance. See :doc:`agents_examples` for more AI trading bots and :doc:`strategy_run_modes` for backtest and live runners.