Modular Market Brief
Create a concise but information-dense market report that is modular (can include/exclude sections) and data-backed (prices/returns/trend state when possible).
Inputs to ask for (or assume defaults)
- - Time window: AM (since prior close) vs PM (what changed since AM)
- Regions: e.g., US, Canada, EU, Asia (user chooses)
- Asset blocks: equities, rates, FX, commodities, crypto
- Core tickers: indices + user’s preferred ETFs/tickers
- Movers source: which exchange/market and where to get movers
- Risk appetite: conservative vs aggressive framing
If the user doesn’t specify, default to a broad global dashboard with US indices, USD, oil, gold, BTC/ETH.
Report structure (recommended)
1)
TL;DR (3–6 bullets)
2)
Equities (by region)
3)
Rates (2Y/10Y + key central bank watch)
4)
FX (DXY or major pairs; local pair for user)
5)
Commodities (WTI/Brent, gold, copper; add relevant)
6)
Crypto (BTC/ETH + anything user cares about)
7)
Top movers (top gainers/losers for a chosen exchange)
8)
Patterns / trend box (BUY/SELL/WAIT labels for selected instruments)
9)
One best idea (cross-asset; include invalidation)
Data guidance
Prefer programmatic price tape when available:
- - Use yfinance for tickers/ETFs/crypto/commodity futures (optional dependency).
- If a market needs a dedicated movers list, use a web source (exchange site / finance portal) and then enrich tickers via yfinance.
Installing yfinance (recommended, but not required)
If yfinance isn’t available, the skill can still produce a narrative brief from public sources.
For reliable installs on modern Linux distros (PEP 668), prefer a venv:
python3 -m venv ~/.venvs/market-brief
~/.venvs/market-brief/bin/pip install -U pip
~/.venvs/market-brief/bin/pip install yfinance pandas numpy
Then run scripts using
~/.venvs/market-brief/bin/python.
Trend labeling (simple + explainable)
Use MA/RSI-based state labels:
- - BUY: close > MA20 > MA50 and RSI(14) >= 50
- SELL: close < MA20 < MA50 and RSI(14) <= 50
- WAIT: everything else
Always present it as a pattern (not a guarantee) and include a one-line rationale.
Bundled scripts (optional helpers)
- -
scripts/price_tape.py: pull prices + returns + MA/RSI for a ticker list (yfinance) - INLINECODE2 : free Yahoo Finance screeners for top gainers/losers/actives (best-effort)
- INLINECODE3 : example movers scraper (TMX Money) you can adapt or swap
- INLINECODE4 : a template you can reuse
Only run scripts if you actually need structured output; otherwise write the report directly.
Safety / finance guardrails
- - Don’t place trades.
- Avoid certainty language. Use “pattern / bias / invalidation.”
- If the user asks for explicit buy/sell instructions, provide a conceptual plan + risks.
- Remind about tax/fees only when relevant.
模块化市场简报
生成一份简洁但信息密集的市场报告,要求模块化(可包含/排除章节)且数据支撑(尽可能提供价格/回报/趋势状态)。
需询问的输入项(或采用默认值)
- - 时间窗口: 上午(自上次收盘以来)与下午(自上午以来的变化)
- 地区: 例如美国、加拿大、欧盟、亚洲(用户选择)
- 资产板块: 股票、利率、外汇、大宗商品、加密货币
- 核心代码: 指数 + 用户偏好的ETF/股票代码
- 涨跌榜来源: 指定交易所/市场及获取涨跌榜的渠道
- 风险偏好: 保守型与进取型框架
若用户未指定,默认采用包含美国指数、美元、原油、黄金、BTC/ETH的全球综合仪表盘。
报告结构(推荐)
1)
概要(3-6个要点)
2)
股票(按地区划分)
3)
利率(2年期/10年期 + 主要央行观察)
4)
外汇(美元指数或主要货币对;用户本地货币对)
5)
大宗商品(WTI/布伦特原油、黄金、铜;可添加相关品种)
6)
加密货币(BTC/ETH + 用户关注的品种)
7)
涨跌榜(选定交易所的涨幅/跌幅最大品种)
8)
形态/趋势框(选定工具的买入/卖出/等待标签)
9)
最佳策略(跨资产;包含失效条件)
数据指引
优先使用程序化价格数据源(如可用):
- - 使用yfinance获取股票代码/ETF/加密货币/商品期货(可选依赖项)。
- 若某市场需要专属涨跌榜,则使用网络数据源(交易所网站/财经门户),再通过yfinance丰富股票代码信息。
安装yfinance(推荐但非必需)
若yfinance不可用,该技能仍可从公开来源生成叙述性简报。
在基于PEP 668规范的现代Linux发行版上可靠安装时,建议使用虚拟环境:
bash
python3 -m venv ~/.venvs/market-brief
~/.venvs/market-brief/bin/pip install -U pip
~/.venvs/market-brief/bin/pip install yfinance pandas numpy
随后使用~/.venvs/market-brief/bin/python运行脚本。
趋势标签(简单且可解释)
采用基于移动平均线/相对强弱指数的状态标签:
- - 买入: 收盘价 > 20日均线 > 50日均线 且 14日RSI >= 50
- 卖出: 收盘价 < 20日均线 < 50日均线 且 14日RSI <= 50
- 等待: 其他情况
始终将其呈现为形态(非保证),并附上一行逻辑说明。
配套脚本(可选辅助工具)
- - scripts/pricetape.py:获取股票代码列表的价格+回报+移动平均线/相对强弱指数(yfinance)
- scripts/moversyahoo.py:免费雅虎财经筛选器,获取涨幅/跌幅/活跃度最大品种(尽力而为)
- scripts/tmxmovers.py:涨跌榜爬虫示例(TMX Money),可适配或替换
- scripts/renderexample.md:可复用的模板
仅在确实需要结构化输出时运行脚本;否则直接撰写报告。
安全/金融护栏
- - 不执行交易操作。
- 避免确定性表述。使用形态/倾向/失效条件等措辞。
- 若用户要求明确的买卖指令,提供概念性方案及风险提示。
- 仅在相关时提醒税费/手续费。