Skip to content

tbdavid2019/stockbot

Repository files navigation


AI StockBot Powered by Groq with Tool Use and Generative UI

股票機器人 (StockBot) 由 Groq 提供支援:閃電般快速的 AI 聊天機器人,能即時回應互動式股票圖表、財務數據、新聞、篩選器等功能

本專案fork自 https://github.com/bklieger-groq/stockbot-on-groq 修正後的分支

概述功能特點界面展示快速開始致謝


[股票機器人演示](https://github.com/user-attachments/assets/a50fa266-5ae9-4869-a37f-599d7db790d9) > 股票機器人演示提供相關、即時和互動式的股票圖表和界面,現已支援台灣股票市場!

使用 Vercel 部署

概述

股票機器人是一個由 AI 驅動的聊天機器人,它利用 Groq 上的高速推理服務、Vercel 的 AI SDK 和 TradingView 的即時小工具,通過對話方式提供即時、互動式圖表和界面,專門根據您的請求定制。Groq 的高速處理能力使工具調用和響應幾乎瞬間完成,允許通過兩個 API 調用序列與專門的提示返回響應。現在已支援台灣股票市場查詢!

Important

注意:股票機器人可能提供不準確的信息,並不提供投資建議。它僅供娛樂和教學使用。

功能特點

  • 🤖 即時 AI 聊天機器人:與高速回應的 AI 互動,通過自然語言對話請求股票新聞、信息和圖表
  • 📊 互動式股票圖表:接收幾乎即時的、上下文感知的響應,包含承載實時數據的互動式 TradingView 圖表
  • 🔄 自適應界面:動態渲染 TradingView UI 組件,為您的特定查詢定制金融界面
  • Groq 驅動的性能:利用 Groq 的尖端推理技術,實現近乎即時的響應和無縫用戶體驗
  • 🌐 多資產市場覆蓋:訪問股票、外匯、債券和加密貨幣的全面數據和分析
  • 🇹🇼 台灣股票市場支持:現已支援台灣股票市場查詢,包括台積電等台灣上市公司
  • 🤖 AI 投資分析 (新功能):整合 AI Hedge Fund API,提供傳奇投資大師(巴菲特、葛拉漢、乾克曼等)的專業投資建議

AI 投資分析功能

StockBot 整合了 AI Hedge Fund API,可以模擬多位傳奇投資大師的投資風格,為您提供專業的股票分析建議。

使用方式

在聊天中直接詢問:

  • "TSLA 值得買嗎?"
  • "分析一下 NVDA"
  • "Should I buy AAPL?"

分析師團隊

類別 分析師
📊 價值投資大師 Ben Graham、Warren Buffett、Charlie Munger、Bill Ackman、Peter Lynch、Phil Fisher、Michael Burry
🚀 成長與創新 Cathie Wood
📈 技術與情緒分析 Technical Analyst、Sentiment Analyst、Nancy Pelosi、WSB
📐 基本面與估值 Fundamentals Analyst、Valuation Analyst

目前狀態

⚠️ 注意:由於 Vercel Serverless Functions 對非標準 port (6000) 的連線有限制,目前 API 整合功能在 Vercel 部署環境中暫時無法使用。

🤗 替代方案:請移駕至 AI Hedge Fund on Hugging Face 使用完整的 AI 投資分析功能。

未來計畫

待 API 服務調整為標準 port (80/443) 或設定 HTTPS 域名後,將可在 Vercel 環境中正常使用。屆時只需修改環境變數:

# .env.local
AI_HEDGE_FUND_HOST=your-api-domain.com
AI_HEDGE_FUND_PORT=443

相關檔案

  • app/api/stock-analysis/route.ts - API 代理路由
  • components/tradingview/stock-analysis.tsx - 分析結果顯示組件
  • lib/chat/actions.tsx - 聊天工具定義 (analyzeStockWithAI)

Interfaces

Description Widget
AI Investment Analysis (NEW)
Get professional investment advice from legendary investors like Warren Buffett, Ben Graham, and more. Currently redirects to Hugging Face Space.
AI Investment Analysis
Heatmap of Daily Market Performance
Visualize market trends at a glance with an interactive heatmap. Supported markets: US (S&P 500), Germany, Australia, Brazil, Canada, Israel.
Heatmap of Daily Market Performance
Breakdown of Financial Data for Stocks
Get detailed financial metrics and key performance indicators for any stock.
Breakdown of Financial Data for Stocks
Price History of Stock
Track the historical price movement of stocks with customizable date ranges.
Price History of Stock
Candlestick Stock Charts for Specific Assets
Analyze price patterns and trends with detailed candlestick charts.
Candlestick Stock Charts for Specific Assets
Top Stories for Specific Stock
Stay informed with the latest news and headlines affecting specific companies.
Top Stories for Specific Stock
Market Overview
Shows an overview of today's stock, futures, bond, and forex market performance including change values, Open, High, Low, and Close values.
Market Overview
Stock Screener to Find New Stocks and ETFs
Discover new companies with a stock screening tool.
Stock Screener to Find New Stocks and ETFs
Trending Stocks
Shows the top five gaining, losing, and most active stocks for the day.
Trending Stocks
ETF Heatmap
Shows a heatmap of today's ETF market performance across sectors and asset classes.
ETF Heatmap

Quickstart

Important

To use StockBot, you can use a hosted version at tbdavid-stockbot.vercel.app. Alternatively, you can run StockBot locally using the quickstart instructions.

You will need a Groq API Key to run the application. You can obtain one here on the Groq console.

To get started locally, you can run the following:

cp .env.example .env.local

Add your Groq API key to .env.local, then run:

pnpm install
pnpm dev

Your app should now be running on localhost:3000.

Credits

This app was originally developed by Benjamin Klieger at Groq and uses the AI Chatbot template created by Vercel: Github Repository. Taiwan stock market support was added by tbdavid2019.

About

直接用聊天介面看股市資訊 bot.david888.com

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages