Google 财经股票追踪器:自动投资组合监控 - Openclaw Skills
作者:互联网
2026-04-04
什么是 Google 财经股票追踪器?
此技能使开发者和交易者能够通过从 Google 财经提取实时数据来自动化其市场研究,而无需昂贵的 API 密钥。利用 Openclaw Skills,用户可以直接在 Agent 工作流中维护本地自选股名单、监控市场动量并接收关于股票表现的结构化报告。
该工具为技术分析提供了一个强大的框架,涵盖估值、成交量和新闻情绪,帮助用户对其资产做出知情观察。它设计为在本地运行,在确保数据隐私的同时,通过简单的命令行界面提供专业级的洞察。
下载入口:https://github.com/openclaw/skills/tree/main/skills/mli-cj/google-finance
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install google-finance
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 google-finance。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Google 财经股票追踪器 应用场景
- 监控特定股票代码的价格波动和成交量激增。
- 基于 50 日均线等技术指标生成启发式的买入、持有或卖出信号。
- 持续获取来自主要财经媒体的特定公司新闻头条。
- 为自定义投资组合设置自动化的开盘和收盘报告。
- 脚本通过标准 HTTP 请求从公开的 Google 财经行情页面获取最新的 HTML 数据。
- 解析关键指标,包括当前价格、当日涨跌幅和近期新闻头条。
- 使用当前快照更新本地状态文件,以便与之前的数据点进行对比分析趋势。
- 计算动量和成交量估值等技术指标,生成从 +10 到 -10 的信号评分。
- 输出格式化报告,突出显示重大警报或突破阈值的情况,以便用户立即关注。
Google 财经股票追踪器 配置指南
要开始使用此技能,请确保您的系统中已安装 python3。不需要 API 密钥。
# 将股票添加到自选列表(例如:特斯拉)
python3 {baseDir}/scripts/parse-stock.py --add TSLA
# 对所有关注的股票运行汇总检查
python3 {baseDir}/scripts/parse-stock.py --check --summary
# 检查特定股票代码的详细分析
python3 {baseDir}/scripts/parse-stock.py --check --symbol AAPL
Google 财经股票追踪器 数据架构与分类体系
该技能在本地 ~/.openclaw/workspace/stock-tracker-state.json 中维护状态,以追踪随时间变化的数据。
| 字段 | 类型 | 描述 |
|---|---|---|
watchlist |
数组 | 包含交易所后缀的股票代码列表(例如:NVDA:NASDAQ)。 |
lastChecked |
字符串 | 最近一次数据获取的 ISO 8601 时间戳。 |
snapshots |
对象 | 每个股票代码的详细价格、涨跌幅和时间戳。 |
name: google-finance
description: "Track stock prices and company news from Google Finance on a schedule. Use when user wants to monitor stocks, get buy/sell recommendations, check price changes, follow company news, set up stock alerts, or track portfolio symbols. Triggers: 'track stock', 'watch AAPL', 'stock alert', 'buy or sell', 'stock news', 'Google Finance'. Default watchlist: NVDA, AAPL, META, GOOGL."
homepage: https://finance.google.com
user-invocable: true
metadata: {"clawdbot": {"emoji": "??", "requires": {"bins": ["python3"]}, "os": ["darwin", "linux", "win32"], "files": ["scripts/parse-stock.py"]}}
Stock Tracker
Monitor stocks, generate buy/sell signals, and track your portfolio.
Quick Start
Check all watched stocks (auto-fetches data):
python3 {baseDir}/scripts/parse-stock.py --check --summary
Check single stock:
python3 {baseDir}/scripts/parse-stock.py --check --symbol AAPL
Add/remove stocks:
python3 {baseDir}/scripts/parse-stock.py --add TSLA
python3 {baseDir}/scripts/parse-stock.py --remove TSLA
Show watchlist:
python3 {baseDir}/scripts/parse-stock.py --list
How It Works
The parse-stock.py script handles everything:
- Fetches data from Google Finance (no API key required!)
- Calculates scores based on momentum, volume, valuation
- Generates signals (BUY / HOLD / SELL)
- Updates state in
~/.openclaw/workspace/stock-tracker-state.json
Analysis Framework
Apply the scoring framework in {baseDir}/references/analysis-framework.md to produce:
Symbol: AAPL
Price: $182.30 (+1.4% today)
Signal: BUY [score: +6/10]
Confidence: MEDIUM
Key factors:
? Price above 50-day SMA (estimated)
? Volume 1.3× above average
? 2 positive news items in past 24h
?? P/E 28.5 — elevated but within sector norm
? Within 3% of 52-week high (limited upside)
Recent headlines:
? "Apple reportedly in talks with..." — Reuters (2h ago)
? "iPhone sales beat estimates..." — Bloomberg (5h ago)
Recommendation: Consider buying on dips. Set stop-loss at 5% below current price.
4. Persist State
Store watchlist and last-seen prices in ~/.openclaw/workspace/stock-tracker-state.json.
Default watchlist (pre-loaded on first run if state file does not exist):
NVDA:NASDAQ— NVIDIAAAPL:NASDAQ— AppleMETA:NASDAQ— Meta PlatformsGOOGL:NASDAQ— Alphabet (Google)
Format:
{
"watchlist": ["NVDA:NASDAQ", "AAPL:NASDAQ", "META:NASDAQ", "GOOGL:NASDAQ"],
"lastChecked": "2026-03-03T09:00:00Z",
"snapshots": {
"NVDA:NASDAQ": { "price": 875.40, "change_pct": 2.1, "ts": "2026-03-03T09:00:00Z" },
"AAPL:NASDAQ": { "price": 182.30, "change_pct": 1.4, "ts": "2026-03-03T09:00:00Z" },
"META:NASDAQ": { "price": 512.60, "change_pct": -0.8, "ts": "2026-03-03T09:00:00Z" },
"GOOGL:NASDAQ": { "price": 175.20, "change_pct": 0.5, "ts": "2026-03-03T09:00:00Z" }
}
}
Load state at the start of every run. Compare new price against snapshots to compute Δ since last check.
5. Alert on Significant Moves
Emit a highlighted alert if any of the following thresholds are crossed:
- Price change > ±3% since last check
- Volume > 2× 30-day average
- Any headline contains keywords:
earnings,merger,acquisition,SEC,lawsuit,recall,CEO,bankruptcy
Setting Up a Cron Schedule
Run the following to add a recurring job that checks stocks every weekday at market open (09:30 ET) and close (16:00 ET):
# Market open — 09:30 ET (UTC-4 during EDT)
openclaw cron add r
--name "Stock Open Check" r
--cron "30 13 * * 1-5" r
--tz "America/New_York" r
--session isolated r
--message "Run /stock-tracker check and output a full report with buy/sell signals for all watched stocks." r
--announce r
--channel slack r
--to "channel:REPLACE_WITH_CHANNEL_ID"
# Market close — 16:00 ET
openclaw cron add r
--name "Stock Close Check" r
--cron "0 20 * * 1-5" r
--tz "America/New_York" r
--session isolated r
--message "Run /stock-tracker check and output end-of-day summary with buy/sell signals for all watched stocks." r
--announce
For a simpler every-4-hours check (including after-hours):
openclaw cron add r
--name "Stock Tracker" r
--every 14400000 r
--session isolated r
--message "Run /stock-tracker check for all watched symbols. Report price changes > 1%, news, and signals."
See {baseDir}/references/data-sources.md for timezone and exchange hours reference.
Output Format Rules
- Always show: symbol, price, change %, signal, top 3 headlines
- If multiple stocks: group by signal (BUY first, then HOLD, then SELL)
- Use emoji prefix: ?? BUY / ?? HOLD / ?? SELL
- Append
?? ALERTto any symbol that crossed a threshold - End every report with a disclaimer: "This is not financial advice. Data sourced from Google Finance."
Limitations & Notes
- Google Finance does not provide real-time Level 2 data; prices may be 15 min delayed for some exchanges.
- This skill cannot execute trades. Recommendations are informational only.
- For non-US stocks, use the exchange suffix (e.g.
0700.HK,7203.T,BABA.N). See data-sources.md for the full mapping. - If Google Finance blocks the browser session, fall back to Yahoo Finance scraping as described in data-sources.md.
External Endpoints
This skill makes outbound requests to the following public URLs only:
| URL | Purpose |
|---|---|
https://www.google.com/finance/quote/* |
Stock price & stats |
No user data, credentials, or personal information is sent to any external endpoint.
Security & Privacy
- No credentials required. All data is fetched from public Google Finance pages.
- Local state only. The watchlist and price snapshots are stored exclusively at
~/.openclaw/workspace/stock-tracker-state.jsonon your machine. Nothing is sent to remote servers. - No browser required. Data is fetched via HTTP requests and parsed from HTML. No JavaScript execution.
parse-stock.pyis sandboxed. It reads/writes only the state file at the path above. It does not access environment variables or other files.- Buy/sell signals are heuristic only. No financial data or decisions are transmitted anywhere. All analysis runs locally.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
Minecraft 3D 建造计划生成器:AI 场景架构师 - Openclaw Skills
Scholar Search:自动化文献搜索与研究简报 - Openclaw Skills
issue-to-pr: 自动化 GitHub Issue 修复与 PR 生成 - Openclaw Skills
接班交班总结器:临床 EHR 自动化 - Openclaw Skills
Teacher AI 备课专家:K-12 自动化教案设计 - Openclaw Skills
专利权利要求映射器:生物技术与制药 IP 分析 - Openclaw Skills
生成 Tesla 车身改色膜:用于 3D 显示的 AI 图像生成 - Openclaw Skills
Taiwan MD:面向台湾的 AI 原生开放知识库 - Openclaw Skills
自学习与迭代演进:AI Agent 成长框架 - Openclaw Skills
HIPC Config Manager: 安全的 API 凭据处理器 - Openclaw Skills
AI精选
