Macro & Sector Rotation
本頁是宏觀量化分數、資產輪動與 Daily Market Brief context 的操作 reference。使用者只需複製自然語言範例;agent 應自行選擇 MCP tool,不需要使用者輸入 tool ID 或底層 JSON。
Macro & Sector Rotation tools 幫助 AI 建立市場風險偏好、資產強弱與跨資產輪動脈絡。兩個工具都回傳時間序列(series),並支援 summary 模式產生 LLM-ready 解讀欄位。
驗證狀態:artifact-confirmed。下列範例已納入 validation/tool_usage_cases.json;live remote MCP 與 agent matrix 仍需受保護 credentials 才能完成。
宏觀量化分數
| Tool | API Path | 說明 | Best for |
|---|---|---|---|
get_quantified_macro_score | /API/module1 | 查詢指定期間的宏觀量化分數與 components,掌握市場風險偏好、分數變化與主要驅動因子。 | Macro brief、risk-on / risk-off 判斷 |
get_quantified_sector_rotation | /API/module2 | 查詢 Global Assets Index、七大資產指數與 DXY momentum,辨識目前較強與較弱的資產區塊。 | 資產輪動、美元流動性、跨資產觀察 |
參數 Parameters
兩個工具的參數相同:
| 參數 | 型別 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
start_date | string (YYYY-MM-DD) | ✅ | — | 區間起日。 |
end_date | string (YYYY-MM-DD) | ✅ | — | 區間迄日。 |
output_mode | string | — | data | data:結構化序列;summary:LLM-ready 解讀;raw:近原始回傳(需權限)。 |
Macro / Sector 的日期區間最長 1830 天(約 5 年);超過會回傳 DATE_RANGE_TOO_LARGE。start_date 必須早於或等於 end_date。
get_quantified_macro_score
- 適用:指定期間的 macro score、Alpha/Beta components、risk-on / risk-off 脈絡與分數變化。
- 必要資訊:
start_date、end_date,格式皆為YYYY-MM-DD;未提供時 agent 可使用 server 預設期間,但必須回報 resolved range warning。 - 不可臆測:日期、分數、components 與
source.data_date。
請查詢 2025-07-01 到 2025-07-10 的宏觀量化分數、組成項目與資料日期。
回答應包含實際資料範圍、最新資料日、macro score、主要 components、變化與 warnings。若回傳空資料或來源失敗,必須明確說明,不能產生有效分數。
資產輪動
get_quantified_sector_rotation
- 適用:Global Assets Index、七大資產指數、DXY momentum、strongest / weakest assets。
- 必要資訊:
start_date、end_date;日期範圍規則與 macro score 相同。 - 不可臆測:資產強弱排序、美元訊號、分數與資料日期。
請比較 2025-07-01 到 2025-07-10 的全球資產輪動、美元動能與最強弱資產,並標示資料日期。
回答應區分 Global Assets Index、各資產指數與 DXY,並列出實際資料日期及任何缺值或 stale warning。
Daily Market Brief 規格
get_report_spec
- 適用:取得最新版
market_daily_brief的章節、required fields、render requirements、style rules 與 safety rules。 - 必要資訊:一般使用最新版、
locale=zh-TW;此 tool 不回傳市場資料,也不產生最終報告。 - 不可臆測:報告章節與規則。Agent 必須以 tool 回傳版本為準,不可使用記憶中的固定模板。
請告訴我最新版繁中每日市場簡報必須遵守的章節、欄位、風格與安全規則;這次只要格式規格,不要市場資料。
回答應包含 spec version、章節順序、必填欄位、render / safety rules,以及規格指定的 context tool。
Daily Market Brief 資料包
get_market_daily_brief_context
- 適用:準備 Daily Market Brief 所需的 macro、sector、metrics、data quality、coherence 與 commentary skeletons。
- 必要資訊:可提供
end_date與lookback_days;寫報告時使用output_mode=report。 - 不可臆測:resolved range、source range、headline、metrics、confidence、missing fields 與 data-quality state。
請準備截至 2025-07-10、回看 60 天的每日市場簡報資料包,包含宏觀、資產輪動、資料品質與一致性檢查,但先不要寫成最終報告。
回答應明確區分 tool 產生的 report-ready context 與 agent 後續撰寫的最終 prose,並保留 data_quality、coherence、missing_fields 與 warnings。
常見失敗
| 症狀 | 處理方式 |
|---|---|
| 日期格式錯誤或起訖顛倒 | 改用 YYYY-MM-DD,確認 start 不晚於 end。 |
| 日期範圍超過 Module 1/2 上限 | 縮短範圍;不要讓 agent 自行截斷而不說明。 |
| Report context 有 missing fields | 在報告中標示 unavailable,不得補寫來源未提供的訊號。 |
source.data_date 早於今天 | 以 latest available data 描述,不能稱為今日即時資料。 |
回傳格式 Response
所有 API-backed tools 共用同一個 envelope(詳見 工具總覽)。這兩個工具的 data 屬於 series 容器:
| 欄位 | 說明 |
|---|---|
data.series | 以欄位名為 key 的時間序列陣列;來源日期欄會正規化為 date。 |
data.columns | 回傳的序列欄位名清單。 |
data.total_count | 序列長度(資料點數)。 |
summary | 僅 summary 模式有值,包含 signal、recent_change、strongest / weakest assets 等解讀欄位。 |
{
"request_id": "b1f2…",
"tool_id": "get_quantified_macro_score",
"source": { "api_path": "/API/module1", "method": "GET", "data_date": "2026-06-04" },
"output_mode": "data",
"data": {
"series": {
"date": ["2026-05-06", "...", "2026-06-04"],
"score": [0.42, "...", 0.55]
},
"columns": ["date", "score"],
"total_count": 21
},
"summary": {},
"warnings": []
}
上方 series 欄位名(score 等 components)為示意,實際欄位以 /API/module1、/API/module2 回傳為準,將以 dev 端實打結果更新。
AI 回應示意
使用者拿到的不是上面的 JSON,而是 AI 依結構化資料整理後的回答。以下為示意(內容依當日資料而定,數值為示意):
查詢最新 macro score
最新 Macro Score:0.55|資料日 2026-06-04
- 近一週 0.48 → 0.55,分數走升,整體偏 risk-on
- 主要驅動:股票與信用 component 轉強、避險資產走弱
- ⚠️ 量化資訊整理,非投資建議
最近 60 天的 sector rotation
Sector Rotation(近 60 天)|資料日 2026-06-04
- 最強:股票、商品;最弱:債券、貴金屬
- Global Assets Index 動能轉正、DXY 走弱 → 美元流動性偏寬鬆
- ⚠️ 量化資訊整理,非投資建議
每段回應都會帶上 資料日期、分數/排名與變化,以及 非投資建議聲明。