Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

quant-risk-dashboard量化风险仪表板

Agent Skill

quant-risk-dashboard 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,871

周安装

205

GitHub Stars

公开资料未说明

下载量

1,706
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:quant-risk-dashboard(量化风险仪表板)
来源仓库:https://github.com/jason-aka-chen/quant-risk-dashboard
安装命令:
openclaw skills install quant-risk-dashboard
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install quant-risk-dashboard

简介

专业量化交易风险管理仪表板实现 VaR/CVaR 实时监控。

  • 支持压力测试、持仓限制与回撤预警等功能模块。
  • 适用于机构级交易系统的风控体系集成与审计追踪。
  • 安装后需配置账户权限与阈值参数方可生效运行。
  • 建议定期校准模型假设以适应市场结构变化。quant-risk-dashboard 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
quant-risk-dashboard
description
Professional quantitative trading risk management dashboard. Real-time VaR/CVaR calculation, stress testing, position limits, exposure monitoring, drawdown alerts, and comprehensive risk metrics visualization.
tags
version
1.0.0
author
chenq

Quant Risk Dashboard

Professional risk management system for quantitative trading.

Features

1. Risk Metrics

  • VaR (Value at Risk): Historical, Parametric, Monte Carlo
  • CVaR (Conditional VaR): Expected shortfall
  • Max Drawdown: Current and historical
  • Volatility: Realized and implied
  • Beta: Market sensitivity
  • Sharpe/Sortino/Calar: Risk-adjusted returns

2. Position Management

  • Real-time Positions: Current holdings with P&L
  • Position Limits: Per-stock and total limits
  • Concentration Risk: Single position max%
  • Sector Exposure: Industry allocation

3. Exposure Monitoring

  • Long/Short Ratio: Net exposure
  • Sector Allocation: Industry breakdown
  • Factor Exposure: Style factors (value, growth, momentum)
  • Geographic Exposure: Market cap breakdown

4. Stress Testing

  • Historical Scenarios: 2008 crash, 2020 covid, etc.
  • Custom Scenarios: User-defined shocks
  • Scenario Comparison: Side-by-side analysis
  • Recovery Time: Estimated recovery from scenarios

5. Alerts & Notifications

  • Drawdown Alerts: Threshold-based warnings
  • Position Breach: Limit violation alerts
  • Volatility Spikes: Unusual market moves
  • Custom Rules: User-defined triggers

6. Reporting

  • Daily Risk Report: Automated PDF/HTML reports
  • Risk Attribution: P&L explained by factors
  • Compliance Reports: Regulatory compliance
  • Custom Reports: Flexible report builder

Installation

pip install pandas numpy scipy plotly dash

Usage

Initialize Dashboard

from quant_risk import RiskDashboard

dashboard = RiskDashboard(
    initial_capital=1000000,
    var_confidence=0.95,
    max_position_pct=0.15,
    max_drawdown_pct=0.20
)

Add Positions

dashboard.add_position(
    symbol='600519',
    shares=1000,
    entry_price=1800.0,
    current_price=1850.0
)

dashboard.add_position(
    symbol='000858',
    shares=5000,
    entry_price=45.0,
    current_price=48.0
)

Get Risk Metrics

metrics = dashboard.get_risk_metrics()

print(f"VaR (95%): {metrics['var_95']:,.2f}")
print(f"CVaR (95%): {metrics['cvar_95']:,.2f}")
print(f"Sharpe Ratio: {metrics['sharpe_ratio']:.2f}")
print(f"Max Drawdown: {metrics['max_drawdown']:.2%}")
print(f"Total Exposure: {metrics['total_exposure']:,.0f}")

Stress Test

scenarios = {
    '2008 Crash': -0.50,
    '2020 Covid': -0.30,
    'Rate Hike': -0.15,
    'Custom': -0.25
}

results = dashboard.stress_test(scenarios)

for name, result in results.items():
    print(f"{name}: P&L = {result['pnl']:,.2f}")

Start Web Dashboard

dashboard.start_dashboard(port=8050)
# Open http://localhost:8050

API Reference

Core Methods

MethodDescription
add_position(symbol, shares, entry, current)Add position
remove_position(symbol)Close position
update_price(symbol, price)Update market price
get_positions()Get all positions
get_risk_metrics()Calculate risk metrics

Risk Analysis

MethodDescription
calculate_var(method='historical')Calculate VaR
calculate_cvar()Calculate CVaR
stress_test(scenarios)Run stress tests
factor_exposure()Calculate factor exposure
sector_allocation()Get sector breakdown

Alerts

MethodDescription
add_alert(condition, message)Create alert
get_alerts()Get active alerts
clear_alerts()Clear alerts

Reports

MethodDescription
generate_report(format='pdf')Generate report
get_daily_summary()Daily summary

Risk Metrics Explained

VaR (Value at Risk)

  • Definition: Maximum expected loss at given confidence level
  • Interpretation: "95% VaR = 50,000" means 95% chance loss < 50,000

CVaR (Conditional VaR)

  • Definition: Average loss beyond VaR threshold
  • Interpretation: More conservative than VaR

Sharpe Ratio

  • Definition: Risk-adjusted return
  • Interpretation: >1.0 good, >2.0 excellent

Max Drawdown

  • Definition: Largest peak-to-trough decline
  • Interpretation: Lower is better

Sortino Ratio

  • Definition: Downside risk-adjusted return
  • Interpretation: Only considers downside risk

Configuration

Risk Limits

limits = {
    'max_position_pct': 0.15,    # 15% per position
    'max_sector_pct': 0.30,       # 30% per sector
    'max_leverage': 1.5,          # 1.5x leverage
    'max_drawdown': 0.20,         # 20% stop loss
    'max_var_pct': 0.05,          # 5% VaR limit
}

Alert Thresholds

alerts = {
    'drawdown_warning': 0.10,     # 10% drawdown warning
    'drawdown_critical': 0.15,    # 15% critical
    'var_warning': 0.03,          # 3% VaR warning
    'volatility_spike': 2.0,      # 2x normal volatility
}

Visualization

Web Dashboard

dashboard.start_dashboard()

# Features:
# - Real-time position table
# - P&L charts
# - Risk metrics gauges
# - Sector pie chart
# - Drawdown curve
# - Factor exposure bar chart

Generate Charts

# P&L Chart
chart = dashboard.plot_pnl_history()

# Risk Decomposition
chart = dashboard.plot_risk_attribution()

# Scenario Comparison
chart = dashboard.plot_scenarios()

Integration

Connect to Trading System

# From trading system
import asyncio

async def update_positions():
    while True:
        positions = await trading_system.get_positions()
        
        for pos in positions:
            dashboard.update_price(pos.symbol, pos.current_price)
        
        await asyncio.sleep(60)  # Update every minute

asyncio.run(update_positions())

Webhook Alerts

# Send alerts to Slack/WeChat
def on_alert(alert):
    send_webhook(
        url=os.getenv('ALERT_WEBHOOK'),
        message=f"Risk Alert: {alert['message']}"
    )

dashboard.set_alert_callback(on_alert)

Use Cases

  • Live Trading: Real-time risk monitoring
  • Backtesting: Post-trade risk analysis
  • Portfolio Management: Multi-strategy risk
  • Compliance: Regulatory risk reports
  • Risk Research: Strategy risk profiling

Links

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

70.06%
按下载量换算1,195

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills