Risk AI πŸ›‘οΈ

SkillCommerce & finance

Hedge fund-level AI risk management. Real-time portfolio risk assessment, VaR calculation, stress testing, and automatic hedging.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Risk AI πŸ›‘οΈ skill

What this skill tells your AI

The instructions your AI receives, as published by signal-execution-labs/forex-trading-ai-agent in skills/risk-ai/SKILL.md and read by ahel’s review.

Your portfolio's guardian angel. Institutional-grade risk management that protects your capital 24/7.

Risk Metrics

Value at Risk (VaR)

Maximum expected loss at a given confidence level.

kit risk var

# Output:
πŸ“Š Value at Risk Analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Portfolio Value: $100,000

VaR (1 Day):
β€’ 95% Confidence: -$3,450 (-3.45%)
  β†’ 95% sure we won't lose more than $3,450 today

β€’ 99% Confidence: -$5,230 (-5.23%)
  β†’ 99% sure we won't lose more than $5,230 today

VaR (1 Week):
β€’ 95% Confidence: -$7,820 (-7.82%)
β€’ 99% Confidence: -$11,450 (-11.45%)

Historical VaR (Based on last 252 days):
β€’ Worst Day: -8.7% ($8,700)
β€’ Worst Week: -15.2% ($15,200)
β€’ Worst Month: -28.4% ($28,400)

Current Risk Level: MODERATE ⚠️
Suggested Action: Consider reducing BTC exposure by 10%

Expected Shortfall (CVaR)

Average loss when VaR is exceeded.

kit risk cvar

# Output:
πŸ“Š Expected Shortfall (CVaR)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

If we exceed our 95% VaR, the expected loss is:
β€’ 1 Day CVaR: -$5,120 (-5.12%)
β€’ 1 Week CVaR: -$11,890 (-11.89%)

Interpretation:
On the worst 5% of days, we expect to lose ~$5,120 on average.
This is the "tail risk" that VaR doesn't capture.

Portfolio Beta

Correlation with overall market.

kit risk beta

# Output:
πŸ“Š Portfolio Beta Analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Overall Portfolio Beta: 1.23
β†’ Portfolio moves 23% more than the market

By Asset:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Asset   β”‚ Weight β”‚ Beta    β”‚ Contribution       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ BTC     β”‚ 50%    β”‚ 1.00    β”‚ 0.50               β”‚
β”‚ ETH     β”‚ 30%    β”‚ 1.35    β”‚ 0.41               β”‚
β”‚ SOL     β”‚ 10%    β”‚ 1.80    β”‚ 0.18               β”‚
β”‚ USDT    β”‚ 10%    β”‚ 0.00    β”‚ 0.00               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Recommendation:
Portfolio is 23% more volatile than market.
To reduce to beta of 1.0, reduce SOL and ETH exposure.

Stress Testing

kit risk stress

# Output:
πŸ”₯ Stress Test Results
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Scenario Analysis:

1. πŸ“‰ 2022 Bear Market (-75% BTC)
   Portfolio Impact: -$58,000 (-58%)
   Recovery Time: ~18 months
   Survival: βœ… (if no leverage)

2. πŸ“‰ March 2020 Crash (-50% in 24h)
   Portfolio Impact: -$42,000 (-42%)
   Margin Call Risk: ⚠️ if using 2x leverage
   Survival: βœ…

3. πŸ“‰ Exchange Hack (lose 20% of assets)
   Portfolio Impact: -$20,000 (-20%)
   Mitigation: Spread across 3+ exchanges
   Current Status: Assets on 2 exchanges ⚠️

4. πŸ“‰ Stablecoin Depeg (USDT to $0.90)
   Portfolio Impact: -$1,000 (-1%)
   Exposure: 10% in USDT
   Survival: βœ…

5. πŸ“‰ Black Swan (-90% all crypto)
   Portfolio Impact: -$81,000 (-81%)
   Survival: βœ… (but painful)

Stress Test Score: 7/10
Recommendation: Diversify exchange exposure

Real-Time Risk Monitor

kit risk monitor

# Output:
πŸ›‘οΈ Risk Monitor - LIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Last Update: 2 seconds ago

RISK STATUS: βœ… HEALTHY

Current Metrics:
β”œβ”€ Portfolio Value:  $100,000
β”œβ”€ Daily P&L:        +$1,234 (+1.23%)
β”œβ”€ Open Risk:        $4,500 (4.5%)
β”œβ”€ Max Drawdown:     -$2,100 (-2.1%)
└─ Margin Used:      0% (no leverage)

Position Risks:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Asset   β”‚ Position  β”‚ Risk      β”‚ Stop     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ BTC     β”‚ $50,000 L β”‚ $2,500    β”‚ $47,500  β”‚
β”‚ ETH     β”‚ $30,000 L β”‚ $1,500    β”‚ $2,850   β”‚
β”‚ SOL     β”‚ $10,000 L β”‚ $500      β”‚ $95      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Risk Limits:
β”œβ”€ Daily Loss Limit:  -5% [-1.23% used]  β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘
β”œβ”€ Max Drawdown:      -15% [-2.1% used]  β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘
β”œβ”€ Position Limit:    10% [5% max]       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘
└─ Leverage Limit:    3x [1x used]       β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘

No alerts. Portfolio within all risk parameters.

Automatic Hedging

kit risk hedge

# Output:
πŸ›‘οΈ Hedge Recommendations
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Current Exposure: 90% Long Crypto
Risk Level: HIGH

Recommended Hedges:

1. BTC Put Options
   β”œβ”€ Strike: $45,000 (-10%)
   β”œβ”€ Expiry: 30 days
   β”œβ”€ Cost: $1,200 (1.2% of portfolio)
   β”œβ”€ Protection: Covers losses below $45K
   └─ [EXECUTE HEDGE]

2. Short BTC Futures (Partial)
   β”œβ”€ Size: 0.2 BTC (20% of position)
   β”œβ”€ This creates a delta-neutral portion
   β”œβ”€ Reduces portfolio beta to 0.95
   └─ [EXECUTE HEDGE]

3. Increase Stablecoin Allocation
   β”œβ”€ Current: 10%
   β”œβ”€ Recommended: 20%
   β”œβ”€ Sell: $10,000 of crypto
   └─ [REBALANCE]

Auto-Hedge Settings:
kit risk hedge --auto --threshold 0.15  # Auto-hedge if VaR > 15%

Correlation Matrix

kit risk correlation

# Output:
πŸ“Š Asset Correlation Matrix
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

        BTC    ETH    SOL    SPX    Gold
BTC     1.00   0.85   0.78   0.45   0.12
ETH     0.85   1.00   0.82   0.42   0.08
SOL     0.78   0.82   1.00   0.38   0.05
SPX     0.45   0.42   0.38   1.00   0.15
Gold    0.12   0.08   0.05   0.15   1.00

Analysis:
⚠️ BTC-ETH correlation very high (0.85)
   β†’ Not much diversification benefit

βœ… Crypto-Gold correlation low (0.05-0.12)
   β†’ Gold is a good hedge

Diversification Score: 4/10
Recommendation: Add uncorrelated assets (Gold, Bonds)

Risk Alerts

# TOOLS.md
risk:
  alerts:
    # Position risk
    - type: position_loss
      threshold: 5%
      action: notify

    - type: position_loss
      threshold: 10%
      action: close_50%

    # Portfolio risk
    - type: daily_loss
      threshold: 3%
      action: notify

    - type: daily_loss
      threshold: 5%
      action: pause_trading

    # Drawdown
    - type: drawdown
      threshold: 10%
      action: notify

    - type: drawdown
      threshold: 15%
      action: reduce_exposure

    # VaR breach
    - type: var_breach
      threshold: 1.5x  # 150% of normal VaR
      action: hedge

API

import { RiskAI } from '@binaryfaster/kit';

const risk = new RiskAI();

// Get VaR
const var95 = await risk.calculateVaR(0.95, '1d');

// Stress test
const stressResults = await risk.stressTest([
  { name: '2022 Bear', btcDrop: -75 },
  { name: 'Flash Crash', allAssets: -50 }
]);

// Monitor risk
risk.on('risk_alert', (alert) => {
  console.log(`Risk Alert: ${alert.type} - ${alert.message}`);
});

// Auto-hedge
await risk.enableAutoHedge({
  maxVaR: 0.10,  // 10%
  hedgeInstrument: 'btc_put',
  maxHedgeCost: 0.02  // 2% of portfolio
});

Configuration

# TOOLS.md
risk_ai:
  enabled: true

  # Risk limits
  limits:
    max_daily_loss: 5%
    max_drawdown: 15%
    max_position_size: 10%
    max_portfolio_var: 10%
    max_leverage: 3x

  # Auto-actions
  auto_actions:
    reduce_on_drawdown: true
    hedge_on_var_breach: true
    close_on_stop_loss: true

  # Monitoring
  monitor_interval: 1m
  alert_channels: ["telegram"]

  # Stress testing
  run_stress_tests: daily
  custom_scenarios:
    - name: "Regulatory FUD"
      btc: -30%
      alts: -50%

Signals

GitHub stars
136
Forks
870
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
risk-ai
Source
github.com/signal-execution-labs/forex-trading-ai-agent