risk 技能测试
- 作者仓库星标 39
- 作者仓库 awesome-omni-skill
risk-management
Purpose
This skill enables quantitative analysis, modeling, and mitigation of financial risks. It processes data to calculate metrics like Value at Risk (VaR), stress testing, and suggests strategies to reduce exposure, such as hedging or diversification.
When to Use
Use this skill for scenarios involving financial uncertainty, like portfolio risk assessment, credit risk evaluation, or market volatility analysis. Apply it when you need data-driven insights to comply with regulations (e.g., Basel III) or optimize investment decisions.
Key Capabilities
- Perform VaR calculations using historical or Monte Carlo simulations.
- Build risk models for market, credit, or operational risks with inputs like asset prices or default probabilities.
- Generate mitigation strategies, such as recommending stop-loss levels or portfolio rebalancing based on risk thresholds.
- Integrate with data sources for real-time analysis, supporting formats like CSV, JSON, or API feeds.
- Output results in structured formats, including reports or JSON for further processing.
Usage Patterns
Always initialize with authentication via $OPENCLAW_API_KEY. For CLI, pipe data inputs directly; for API, use asynchronous calls for large datasets. Start by loading configuration files (e.g., YAML for model parameters). Common pattern: Analyze risk -> Review outputs -> Apply mitigation. For code integration, import the SDK and wrap calls in try-except blocks. Example 1: Analyze a stock portfolio's market risk by providing historical prices. Example 2: Evaluate credit risk for a loan portfolio and generate mitigation recommendations.
Common Commands/API
Use the OpenClaw CLI for quick tasks or the REST API for programmatic access. Authentication requires setting $OPENCLAW_API_KEY in your environment.
CLI Command:
openclaw risk analyze --type market --model var --input portfolio.csv --confidence 95
This calculates 95% VaR for market risk; output is a JSON file with metrics.API Endpoint: POST https://api.openclaw.ai/v1/risk/analyze
Body:{"type": "credit", "data": {"loans": [{"amount": 100000, "rating": "A"}]}, "model": "default-prob"}
Response: JSON object with risk score and strategies, e.g.,{"var": 5000, "mitigation": ["increase collateral"]}.Code Snippet (Python):
import openclaw openclaw.set_key(os.environ['OPENCLAW_API_KEY']) result = openclaw.risk.analyze(type='operational', data={'events': [100, 200]}, model='monte-carlo') print(result['mitigation'])Config Format: YAML for custom models, e.g.,
model: type: var parameters: window: 252 # trading days confidence: 0.95
Integration Notes
Integrate by setting $OPENCLAW_API_KEY and using the SDK in your application. For web apps, handle webhooks for asynchronous results (e.g., POST to your endpoint on completion). Connect to data providers like Bloomberg via custom adapters; specify in config: {"data_source": "bloomberg", "api_endpoint": "https://api.bloomberg.com/data"}. Ensure compatibility with other OpenClaw skills by chaining outputs, e.g., pipe risk analysis results into a financial-analysis skill.
Error Handling
Always validate inputs before commands (e.g., check for required fields like --input). For API calls, catch HTTP errors: if status >= 400, retry up to 3 times with exponential backoff. Common errors: 401 (unauthorized – check $OPENCLAW_API_KEY), 400 (bad request – verify JSON schema), or 500 (server error – log and notify). In code, use:
try:
result = openclaw.risk.analyze(...)
except openclaw.APIError as e:
if e.status == 401:
print("Reauthenticate with $OPENCLAW_API_KEY")
else:
raise
Log all errors with timestamps and include debug flags, e.g., openclaw risk analyze --debug.
Graph Relationships
- Related to: financial-analysis (shares finance tag for combined data processing), portfolio-management (uses risk outputs for optimization).
- Connected via: quantitative-analysis (common modeling techniques), mitigation-strategies (links to compliance tools).
- Dependencies: Requires financial cluster skills for data input; provides outputs for decision-making skills.
- 流狐分类
- AI 智能 · finance · risk-management · quantitative-analysis
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @diegosouzapw · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 需要 · Vendor-specific
- 检测到的系统要求
- 未声明
- 底层运行要求
- Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 检测到的网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
作者没有在当前 SKILL.md 中定义固定输出样例。 This skill enables quantitative analysis, modeling, and mitigation of financial risks. It processes data to calculate metrics like Value at Risk (VaR), stress testing, and suggests strategies to reduce exposure, such as hedging or diversification.
Use this skill for scenarios involving financial uncertainty, like portfolio risk assessment, credit risk evaluation, or market volatility analysis. Apply it when you need data-driven insights to comply with regulations (e.g., Basel III) or optimize investment…
Perform VaR calculations using historical or Monte Carlo simulations. Build risk models for market, credit, or operational risks with inputs like asset prices or default probabilities. Generate mitigation strategies, such as recommending stop-loss levels or…
Always initialize with authentication via $OPENCLAWAPIKEY. For CLI, pipe data inputs directly; for API, use asynchronous calls for large datasets. Start by loading configuration files (e.g., YAML for model parameters). Common pattern: Analyze risk -> Review…
Use the OpenClaw CLI for quick tasks or the REST API for programmatic access. Authentication requires setting $OPENCLAWAPIKEY in your environment. CLI Command: openclaw risk analyze --type market --model var --input portfolio.csv --confidence 95
Integrate by setting $OPENCLAWAPIKEY and using the SDK in your application. For web apps, handle webhooks for asynchronous results (e.g., POST to your endpoint on completion). Connect to data providers like Bloomberg via custom adapters; specify in config:…
# risk-management
## Purpose
This skill enables quantitative analysis, modeling, and mitigation of financial risks. It processes data to calculate metrics like Value at Risk (VaR), stress testing, and suggests strategies to reduce exposure, such as hedging or diversification.
## When to Use
Use this skill for scenarios involving financial uncertainty, like portfolio risk assessment, credit risk evaluation, or market volatility analysis. Apply it when you need data-driven insights to comply with regulations (e.g., Basel III) or optimize investment decisions.
## Key Capabilities
- Perform VaR calculations using historical or Monte Carlo simulations.
- Build risk models for market, credit, or operational risks with inputs like asset prices or default probabilities.
- Generate mitigation strategies, such as recommending stop-loss levels or portfolio rebalancing based on risk thresholds.
- Integrate with data sources for real-time analysis, supporting formats like CSV, JSON, or API feeds.
- Output results in structured formats, including reports or JSON for further processing.
## Usage Patterns
Always initialize with authentication via `$OPENCLAW_API_KEY`. For CLI, pipe data inputs directly; for API, use asynchronous calls for large datasets. Start by loading configuration files (e.g., YAML for model parameters). Common pattern: Analyze risk -> Review outputs -> Apply mitigation. For code integration, import the SDK and wrap calls in try-except blocks. Example 1: Analyze a stock portfolio's market risk by providing historical prices. Example 2: Evaluate credit risk for a loan portfolio and generate mitigation recommendations.
## Common Commands/API
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Purpose → When to Use → Key Capabilities → Usage Patterns → Common Commands/API → Integration Notes
要点 -> 原文未标出关键词
文件/命令 -> $OPENCLAWAPIKEY · openclaw risk analyze --type market --model var --input portfolio.csv --confidence 95 · {"var": 5000, "mitigation": ["increase collateral"]} · {"datasource": "bloomberg", "apiendpoint": "https://api.bloomberg.com/data"} · --input · openclaw risk analyze --debug
内容 SHA-256 -> 937e2f9d3d5b
原文结构
适用与边界
原文中的明确线索
$OPENCLAWAPIKEY、openclaw risk analyze --type market --model var --input portfolio.csv --confidence 95、{"var": 5000, "mitigation": ["increase collateral"]}、{"datasource": "bloomberg", "apiendpoint": "https://api.bloomberg.com/data"}、--input、openclaw risk analyze --debug