Risk AI π‘οΈ
SkillCommerce & financeHedge 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.
No other account needed.
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