Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Dalio All Weather

ASecurity

A股达利欧全天候/债务周期参考配置:用宽基指数、国债ETF、黄金ETF与商品指数计算相关性、波动率与风险平价权重,并回测年化/最大回撤/夏普 | A-share Ray Dalio all-weather / debt-cycle reference allocator: computes correlations, volatilities, risk-parity-style weights across stocks/bonds/gold/commodities, and backtests CAGR/max-drawdown/Sharpe | A株レイ・ダリオ式オールウェザー/債務サイクル参照配分:幅基指数、国債ETF、金ETF、商品指数から相関・ボラティリティ・リスクパリティ風ウェイトを算出し、年率リターン・最大ドローダウン・シャープレシオでバックテスト

21 stars
0 votes
0 copies
0 views
Added 9/24/2026
ai-agentspythongobash

Security Analysis

A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 6 files and shows the line behind each finding

Scanned 9/24/2026

$npx -y skills add Serennity007/awesome-stock-quant-skills --skill dalio-all-weather --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dalio All Weather?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Dalio All Weather
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/serennity007-dalio-all-weather/badge)](https://www.skillsdirectory.com/skills/serennity007-dalio-all-weather)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: dalio-all-weather
description: A股达利欧全天候/债务周期参考配置:用宽基指数、国债ETF、黄金ETF与商品指数计算相关性、波动率与风险平价权重,并回测年化/最大回撤/夏普 | A-share Ray Dalio all-weather / debt-cycle reference allocator: computes correlations, volatilities, risk-parity-style weights across stocks/bonds/gold/commodities, and backtests CAGR/max-drawdown/Sharpe | A株レイ・ダリオ式オールウェザー/債務サイクル参照配分:幅基指数、国債ETF、金ETF、商品指数から相関・ボラティリティ・リスクパリティ風ウェイトを算出し、年率リターン・最大ドローダウン・シャープレシオでバックテスト
author: Serennity007
license: MIT
---

# 🌧️ 全天候资产配置:用达利欧的“四宫格”给 A 股做参考仓位

经济只有 4 种天气:**增长↑/↓ × 通胀↑/↓**。瑞·达利欧的全天候策略不预测天气,而是让组合在四种天气下承担相等的风险。本技能把它搬到 A 股:用沪深300/中证500、国债ETF、黄金ETF、中证商品期货指数作为代理资产,自动算相关性、波动率、近一年表现,并给出风险平价风格的参考权重与回测摘要。

> ⚠️ **简化示意**:这不是达利欧实盘策略,也不考虑杠杆、费率、滑点、税务与分红再投资。仅供学习研究,不构成投资建议。

---

## 1) 这个技能做什么?

| 能力 | 说明 |
|---|---|
| 拉取历史行情 | 宽基指数、国债/黄金 ETF、商品指数的日线收盘价 |
| 计算相关性矩阵 | 看股票、债券、黄金、商品四类资产有多“不同步” |
| 计算波动率与近 1 年表现 | 年化收益、年化波动、夏普 |
| 风险平价风格配权 | 按逆波动率分配权重,低波动资产自动占更高仓位 |
| 输出回测摘要 | 组合年化收益、最大回撤、夏普比率 |

---

## 2) 全天候的 A 股代理资产

默认使用以下资产代表四个经济象限:

| 经济环境 | 代表资产 | akshare 代理 |
|---|---|---|
| 增长 | A 股宽基 | 沪深300 `sh000300`、中证500 `sh000905` |
| 通缩/衰退 | 国债 | 国债ETF `sh511010` |
| 通胀 | 黄金/商品 | 黄金ETF `sh518880`、中证商品期货指数 |

可以用 `--codes` 传入任意 A 股代码做“小样本”测试(例如 `--codes 600519,000858,600036`),脚本会把它们视为股票类资产并重新配权。

---

## 3) 使用方法

```bash
pip install akshare==1.18.96 pandas

# 默认:用四类资产做全天候参考配置
python scripts/allocation.py --lookback 252 --out allocation.csv

# 小样本测试:只看几只股票的相关性与配权
python scripts/allocation.py --codes 600519,000858,600036 --lookback 60 --out test_alloc.csv
```

参数说明:

- `--codes`: 逗号分隔的 A 股代码(可选,默认使用内置全天候资产池)
- `--lookback`: 回看交易日数(默认 252,约一年);也支持 `YYYYMMDD` 或 `YYYY-MM-DD` 格式作为起始日期
- `--out`: 输出 CSV 路径(默认 `allocation.csv`)

---

## 4) 数据来源与降级策略

- 数据来源为 akshare 公开的东方财富、新浪、同花顺接口。
- 脚本**默认禁用系统代理**(如 `127.0.0.1:7890`),避免本地代理阻断东财/同花顺直连。
- 所有 akshare 调用均包 `_retry_call` 指数退避 3 次,调用间 `time.sleep(0.15)`。
- 东财接口失败时自动降级到新浪/同花顺同类接口;商品指数默认走中证商品期货指数接口。

---

## 5) 配套文件

- `references/dalio_principles.md` — 债务周期八阶段、全天候逻辑、极度透明/极度求真、分散化的圣杯。

---

## 免责声明

本技能仅供学习研究,不构成投资建议。历史回测不代表未来收益;任何配置结果都必须结合当前市场环境、个人风险偏好与独立判断二次确认。

Attribution

Serennity007Serennity007
View sourceSee grades on GitHubMore from Serennity007 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →