Xpersona
F

Financial Event Historical Impact Analyzer

CLAWHUB · Unverified

Analyze historical impact of financial events on related assets. Kensho-style event-driven analysis. Use when: asking about asset reactions to events (oil su...

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s174c3qf7rzby58ss8ght6wmyd83hx75:financial-event-impact-analyzer
  1. Install using `clawhub skill install s174c3qf7rzby58ss8ght6wmyd83hx75:financial-event-impact-analyzer` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/laigen/financial-event-impact-analyzer before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-laigen-financial-event-impact-analyzer/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

146,757 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: financial-event-impact-analyzer
description: "Analyze historical impact of financial events on related assets. Kensho-style event-driven analysis. Use when: asking about asset reactions to events (oil surge, gold rise, rate hikes), historical precedent analysis, causal indicator relationships. Outputs Chinese reports and charts."
dependencies:
  - python3
  - pandas
  - numpy
  - matplotlib
  - yfinance
  - tushare (TUSHARE_TOKEN env variable)
  - chinese-fonts: SimHei / WenQuanYi Micro Hei / Noto Sans CJK SC
env:
  TUSHARE_TOKEN:
    required: true
    description: "Tushare Pro API Token for Chinese A-share market data. Register at: https://tushare.pro/register"
    sensitive: true
  FRED_API_KEY:
    required: false
    description: "FRED API Key for US macroeconomic data (optional). Register at: https://fred.stlouisfed.org/docs/api/api_key.html"
    sensitive: true
---

# Financial Event Impact Analyzer (金融事件影响分析器)

## Overview

分析特定金融事件发生时相关资产的历史表现。类似 Kensho 的事件驱动分析:识别事件 → 查找历史先例 → 推论相关资产 → 分析历史表现。

**输出**: 中文分析报告 + 中文标注图表

---

## 环境依赖

### ⚠️ 前置检查(重要)

**每次执行前必须检查**:

| 检查项 | 命令 | 失败修复 |
|--------|------|---------|
| **中文字体** | `fc-list :lang=zh family` | `sudo apt install fonts-wqy-microhei fonts-noto-cjk` |
| **TUSHARE_TOKEN** | `echo $TUSHARE_TOKEN` | 在 ~/.bashrc 中设置 |
| **输出目录** | `mkdir -p memory/reports/` | 确保有写权限 |

**自动检查**: `generate_charts.py` 会自动执行前置检查,输出结果。

### Python 包依赖

```bash
pip install yfinance pandas numpy matplotlib tushare
```

### 🔤 中文字体依赖(重要)

图表使用中文标注,需要系统安装中文字体:

| 系统 | 安装命令 |
|------|---------|
| **Ubuntu/Debian** | `sudo apt install fonts-wqy-microhei fonts-noto-cjk` |
| **CentOS/RHEL** | `sudo yum install wqy-microhei-fonts` |
| **macOS** | 系统自带 PingFang SC / Heiti SC |
| **Windows** | 系统自带 SimHei(黑体) |

**验证字体**:
```bash
# 查看可用中文字体
fc-list :lang=zh family

# matplotlib 查找字体
python3 -c "import matplotlib.font_manager; print([f.name for f in matplotlib.font_manager.fontManager.ttflist if 'Hei' in f.name or 'Noto' in f.name])"
```

**备选字体优先级**:
1. `SimHei` (黑体,Windows/macOS)
2. `WenQuanYi Micro Hei` (Linux常用)
3. `Noto Sans CJK SC` (现代Linux)
4. `PingFang SC` (macOS)

### 数据源环境变量

```bash
export TUSHARE_TOKEN="your_token_here"  # 注册: https://tushare.pro
export FRED_API_KEY="your_key_here"     # 可选,用于 FRED 数据
```

---

## Workflow(10步工作流程)

### Step 0: 创建分析输出目录 ⭐ 重要

**目标**: 创建本次分析的专用输出文件夹,放置在 **workspace** 目录下,避免污染 skill 目录。

**命名规则**: `<indicator>_<YYYYMMDD>_<direction>`
- 例如: `brent_crude_20260328_increase`

**输出目录**: `~/.openclaw/workspace/memory/reports/<analysis_folder>/`

**目录结构**:
```
~/.openclaw/workspace/memory/reports/brent_crude_20260328_increase/
├── data/                    # 中间数据文件
│   ├── brent_crude.json
│   ├── xle.json
│   └── jets.json
│   └── ...
├── charts/                  # 图表文件
│   ├── brent_crude_vs_xle.png
│   ├── brent_crude_vs_jets.png
│   ├── performance_summary.png
│   ├── event_matrix_heatmap.png
│   └── charts_manifest.json
├── events.json              # 相似事件列表
├── related

_meta.json

{
  "ownerId": "kn7fw4bnhsaf250vztqhw0t6js81z2pe",
  "slug": "financial-event-impact-analyzer",
  "version": "1.0.5",
  "publishedAt": 1774756334367
}

references/indicator_mapping.md

# Indicator Mapping Reference

## Overview

This document provides the complete mapping of financial indicators to data sources and symbols.

## Data Sources

### Yahoo Finance
- Free, no API key required
- Covers: commodities futures, stock indices, ETFs, forex
- Data availability: Typically 10-30 years for major assets
- Update frequency: Daily

### FRED (Federal Reserve Economic Data)
- Requires API key (set `FRED_API_KEY` environment variable)
- Covers: US macroeconomic data
- Data availability: Decades of historical data
- Update frequency: Monthly/Quarterly

### Tushare
- Requires API token (set `TUSHARE_TOKEN` environment variable)
- Covers: A-share indices, Chinese market data
- Registration: https://tushare.pro/register
- Data availability: Since 1990 for indices

---

## Complete Indicator List

### Commodities (Yahoo Finance)

| Indicator ID | Symbol | Name | Description |
|-------------|--------|------|-------------|
| `brent_crude` | BZ=F | Brent Crude Oil | Global oil benchmark |
| `wti_crude` | CL=F | WTI Crude Oil | US oil benchmark |
| `gold` | GC=F | Gold Futures | Precious metal |
| `silver` | SI=F | Silver Futures | Precious metal |
| `copper` | HG=F | Copper Futures | Industrial metal |
| `aluminum` | ALI=F | Aluminum Futures | Industrial metal |
| `natural_gas` | NG=F | Natural Gas | Energy commodity |

### US Market Indices (Yahoo Finance)

| Indicator ID | Symbol | Name | Description |
|-------------|--------|------|-------------|
| `sp500` | ^GSPC | S&P 500 | Large-cap US stocks |
| `nasdaq` | ^IXIC | NASDAQ Composite | Tech-heavy index |
| `dow_jones` | ^DJI | Dow Jones Industrial | 30 large stocks |
| `russell2000` | ^RUT | Russell 2000 | Small-cap index |
| `vix` | ^VIX | VIX Index | Volatility index |

### US Sector ETFs (Yahoo Finance)

| Indicator ID | Symbol | Name | Description |
|-------------|--------|------|-------------|
| `xlk` | XLK | Technology ETF | Tech sector |
| `xle` | XLE | Energy ETF | Energy sector |
| `xlf` | XLF | Financial ETF | Banks, insurers |
| `xlv` | XLV | Healthcare ETF | Healthcare sector |
| `xli` | XLI | Industrial ETF | Industrials |
| `jets` | JETS | Airlines ETF | Aviation sector |
| `iyr` | IYR | Real Estate ETF | REITs |

### Foreign Exchange (Yahoo Finance)

| Indicator ID | Symbol | Name | Description |
|-------------|--------|------|-------------|
| `usd_cny` | CNY=X | USD/CNY | US dollar to Chinese yuan |
| `usd_index` | DX-Y.NYB | US Dollar Index | Dollar strength vs basket |
| `eur_usd` | EURUSD=X | EUR/USD | Euro to US dollar |

### US Treasury Yields (Yahoo Finance)

| Indicator ID | Symbol | Name | Description |
|-------------|--------|------|-------------|
| `us_10y_treasury` | ^TNX | 10-Year Treasury | Long-term rates |
| `us_2y_treasury` | ^FVX | 2-Year Treasury | Short-term rates |

### FRED Macro Data

| Indicator ID | FRED Code | Name | Description |
|-------------|-----------|------|-------------|
| `fed_funds_rate` | FEDFUNDS | Federal Funds Rate | Fed policy rate 

references/report_template.md

# 中文报告模板

## 报告结构

以下是金融事件影响分析报告的标准模板,输出时使用中文。

---

# 金融事件历史影响分析报告

## 🎯 核心结论(优先展示)

### 最重要发现

**一句话总结**: [最关键的结论,如:能源ETF在历史上100%跟随油价上涨]

### 分项结论

| 结论 | 说明 |
|------|------|
| **确定性最高** | [资产名称]: 胜率XX%,平均收益XX% |
| **风险提示** | [资产名称]: 胜率仅XX%,需谨慎 |
| **颠覆认知** | [传统认知与历史数据的差异] |

---

## 一、事件概述

**分析事件**: [事件名称]

**表征指标**: [指标名称] ([指标ID])

**当前特征**: [量化特征描述,如:近90天上涨40%]

**分析日期**: [YYYY年MM月DD日]

---

## 二、当前事件特征分析

### 近期走势概况

| 时间窗口 | 变动幅度 | 方向 |
|---------|---------|------|
| 90天 | XX% | ↑/↓ |
| 60天 | XX% | ↑/↓ |
| 30天 | XX% | ↑/↓ |

**波动率**: XX% (30日)

**事件类型判定**: [事件类型]

---

## 三、历史相似事件

共发现 N 次历史相似事件(按时间从最新到 earliest 排序):

| 序号 | 时间区间 | 变动幅度 | 相似度 |
|-----|---------|---------|--------|
| 1(最新) | YYYY.MM.DD ~ YYYY.MM.DD | XX% | XX% |
| 2 | YYYY.MM.DD ~ YYYY.MM.DD | XX% | XX% |
| 3 | YYYY.MM.DD ~ YYYY.MM.DD | XX% | XX% |
| ... | ... | ... | ... |

---

## 四、相关资产推论

基于因果关系、上下游产业链、替代效应分析:

### 受益资产

| 资产类别 | 指标 | 推论依据 |
|---------|------|---------|
| [类别] | [指标] | [原因] |
| ... | ... | ... |

### 受损资产

| 资产类别 | 指标 | 推论依据 |
|---------|------|---------|
| [类别] | [指标] | [原因] |
| ... | ... | ... |

### 不确定/中性资产

| 资产类别 | 指标 | 推论依据 |
|---------|------|---------|
| [类别] | [指标] | [原因] |
| ... | ... | ... |

---

## 五、历史变动幅度表格(新增核心章节)

### 各历史事件期间资产变动幅度

**表格说明**: 按时间从最新到最早排列,**加粗**表示高相关性(同向变动)

| 历史事件 | 时间区间 | 表征指标变动 | [资产A] | [资产B] | [资产C] | ... |
|---------|---------|-------------|---------|---------|---------|-----|
| **事件1**(最新) | YYYY.MM.DD ~ YYYY.MM.DD | 🔴 +XX% | 🔴 **+XX%** | 🟢 -XX% | 🔴 +XX% | ... |
| **事件2** | YYYY.MM.DD ~ YYYY.MM.DD | 🔴 +XX% | 🔴 **+XX%** | 🔴 **+XX%** | 🟢 -XX% | ... |
| **事件3** | YYYY.MM.DD ~ YYYY.MM.DD | 🟢 -XX% | 🟢 **-XX%** | 🔴 +XX% | 🟢 **-XX%** | ... |
| **事件4** | YYYY.MM.DD ~ YYYY.MM.DD | 🔴 +XX% | 🔴 +XX% | 🔴 **+XX%** | 🟢 -XX% | ... |
| ... | ... | ... | ... | ... | ... | ... |

**颜色规范**:
- 🔴 红色 = 上涨 (+)
- 🟢 绿色 = 下跌 (-)
- **加粗** = 与表征指标同向变动(高相关性)

---

### 相关性统计

| 资产 | 同向变动次数 | 同向占比 | 相关性评级 |
|------|:-----------:|:-------:|:---------:|
| [资产A] | X/N | XX% | ⭐⭐⭐⭐⭐ |
| [资产B] | X/N | XX% | ⭐⭐⭐ |
| [资产C] | X/N | XX% | ⭐⭐ |
| ... | ... | ... | ... |

---

## 六、历史表现汇总

### 各资产历史表现统计

| 指标 | 平均收益 | 收益标准差 | 胜率 | 最佳表现 | 最差表现 |
|------|:-------:|:---------:|:---:|:-------:|:-------:|
| [指标A] | 🔴 XX% | XX% | XX% | XX% | XX% |
| [指标B] | 🟢 XX% | XX% | XX% | XX% | XX% |
| ... | ... | ... | ... | ... | ... |

### 各历史事件详细表现

**事件1** (YYYY.MM.DD ~ YYYY.MM.DD):

| 指标 | 收益率 | 波动率 | 最大回撤 |
|------|:------:|:------:|:-------:|
| [指标] | 🔴 XX% | XX% | XX% |
| ... | ... | ... | ... |

**事件2** (YYYY.MM.DD ~ YYYY.MM.DD):
...

---

## 七、图表展示

### 📊 双Y轴时序对比图

每类相关资产单独一张时序对比图:

| 图表 | 文件名 | 说明 |
|------|--------|------|
| [表征指标] vs [资产A] | `primary_vs_assetA.png` | 左轴表征指标,右轴关联资产 |
| [表征指标] vs [资产B] | `primary_vs_assetB.png` | 红色虚线框标记历史事件区间 |
| ... | ... | ... |

**图表规范**:
- **左Y轴**: 表征指标(如油价)
- **右Y轴**: 关联资产指标(如能源ETF)
- **红色虚线框**: 标记历史事件时间区间
- **中文标注**: 标题、轴标签、图例均为中文

---

### 📈 表现汇总图

- **平均收益对比图**: `performance_summary.png`
- *

skill-card.md

## Description:

Analyzes how financial events historically affected related assets by identifying similar events, inferring cross-market relationships, and producing Chinese reports and charts.

This skill is ready for commercial/non-commercial use.

## Publisher:

[laigen](https://clawhub.ai/user/laigen)

### License/Terms of Use:

MIT-0

## Use Case:

External users and agents use this skill to examine historical reactions to financial shocks such as oil moves, gold rallies, rate hikes, VIX spikes, and currency strength. It supports event-driven analysis across assets and economies, then assembles Chinese-language reports with data-backed charts.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The setup guidance can expose API tokens if users echo TUSHARE_TOKEN or store secrets directly in shell startup files.

Mitigation: Use a protected secret mechanism and presence-only environment checks; do not print tokens or place raw credentials in ~/.bashrc.

Risk: The workflow sends financial data requests to Yahoo Finance, Tushare, and optionally FRED.

Mitigation: Review the required data sources and credentials before installation, and run the skill only where that network access is acceptable.

Risk: Font installation guidance may use privileged system package commands.

Mitigation: Prefer an isolated environment with locked Python dependencies, and use sudo package installation only when intentionally administering the host.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/laigen/skills/financial-event-impact-analyzer)
- [Indicator Mapping Reference](artifact/references/indicator_mapping.md)
- [Chinese Report Template](artifact/references/report_template.md)
- [Tushare Registration](https://tushare.pro/register)
- [FRED API Key Documentation](https://fred.stlouisfed.org/docs/api/api_key.html)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance, files]

**Output Format:** [Chinese Markdown reports with PNG charts and JSON/CSV data artifacts]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Writes analysis outputs under ~/.openclaw/workspace/memory/reports/<analysis_folder>/ and uses Yahoo Finance, Tushare, and optionally FRED as data sources.]

## Skill Version(s):

1.0.5 (source: server release metadata; artifact/skill.json lists 1.1.0)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Financial Event Historical Impact Analyzer and adjacent AI workflows.