Risk Assessment
by brainupgrade-in
Evaluates investment risks, performs Monte Carlo simulations, and generates risk reports. Use when analyzing portfolio risk, stress testing, or regulatory compliance.
Skill Details
Repository Files
1 file in this skill directory
name: risk-assessment description: Evaluates investment risks, performs Monte Carlo simulations, and generates risk reports. Use when analyzing portfolio risk, stress testing, or regulatory compliance.
Risk Assessment Framework
Overview
This skill provides systematic approaches to evaluating investment risks, performing stress tests, and generating comprehensive risk reports for portfolio management and regulatory compliance.
Risk Categories
Market Risk
Value at Risk (VaR)
VaR(α) = Portfolio Value × σ × z(α) × √t
Where:
α = Confidence level (95% or 99%)
σ = Portfolio standard deviation
z(α) = Z-score (1.65 for 95%, 2.33 for 99%)
t = Time horizon in days
| Confidence | Z-Score | Interpretation |
|---|---|---|
| 95% | 1.65 | 5% chance of exceeding loss |
| 99% | 2.33 | 1% chance of exceeding loss |
Expected Shortfall (CVaR)
CVaR(α) = E[Loss | Loss > VaR(α)]
CVaR represents the average loss in the worst (1-α)% of cases
Beta and Systematic Risk
β = Cov(Ri, Rm) / Var(Rm)
Where:
Ri = Asset return
Rm = Market return
Beta Interpretation:
β = 1: Moves with market
β > 1: More volatile than market
β < 1: Less volatile than market
β < 0: Inverse correlation
Credit Risk
| Metric | Formula | Description |
|---|---|---|
| PD | Historical default rate | Probability of Default |
| LGD | 1 - Recovery Rate | Loss Given Default |
| EAD | Current exposure + Potential future exposure | Exposure at Default |
| Expected Loss | PD × LGD × EAD | Average credit loss |
Credit Rating Implications:
| Rating | 1-Year PD | 5-Year PD | Category |
|---|---|---|---|
| AAA | 0.00% | 0.07% | Investment Grade |
| AA | 0.02% | 0.22% | Investment Grade |
| A | 0.05% | 0.54% | Investment Grade |
| BBB | 0.16% | 2.02% | Investment Grade |
| BB | 0.75% | 8.39% | Speculative |
| B | 3.32% | 21.76% | Speculative |
| CCC | 22.20% | 44.38% | High Yield |
Liquidity Risk
Bid-Ask Spread Analysis:
Liquidity Cost = Position Size × Bid-Ask Spread / 2
Volume-Based Metrics:
Days to Liquidate = Position Size / Average Daily Volume
Liquidity Score = 1 / (Days to Liquidate × Spread)
Operational Risk
| Risk Type | Example | Mitigation |
|---|---|---|
| Process | Trade execution errors | Dual approval, automation |
| People | Key person dependency | Cross-training, documentation |
| Systems | IT outage | Redundancy, DR plans |
| External | Vendor failure | Due diligence, backup vendors |
Stress Testing Scenarios
Historical Scenarios
| Scenario | Equity | Bonds | Commodities | Period |
|---|---|---|---|---|
| 2008 Financial Crisis | -50% | +5% | -30% | 2008 |
| COVID Crash | -34% | +8% | -25% | Mar 2020 |
| Tech Bubble Burst | -45% | +15% | -10% | 2000-2002 |
| 1987 Black Monday | -22% | +4% | -5% | Oct 1987 |
Hypothetical Scenarios
Interest Rate Shock (+300bps):
- Bond prices: -15% to -25% (duration dependent)
- Equity: -10% to -20%
- Real estate: -15% to -25%
Market Drawdown (-30%):
- Calculate portfolio loss
- Assess margin requirements
- Evaluate liquidity needs
Currency Devaluation (-20%):
- Impact on foreign holdings
- Hedging effectiveness
- Rebalancing needs
Monte Carlo Simulation Framework
Setup Parameters
# Simulation Parameters
num_simulations = 10000
time_horizon = 252 # Trading days (1 year)
confidence_level = 0.95
# Portfolio Parameters
initial_value = 1_000_000
expected_return = 0.08 # Annual
volatility = 0.15 # Annual
Output Metrics
- Expected portfolio value (mean)
- VaR at specified confidence
- CVaR (Expected Shortfall)
- Probability of achieving target return
- Maximum drawdown distribution
Regulatory Compliance Checks
Basel III Requirements
| Metric | Minimum | Description |
|---|---|---|
| CET1 Ratio | 4.5% | Core Equity Tier 1 |
| Tier 1 Ratio | 6.0% | Tier 1 Capital |
| Total Capital | 8.0% | Total Capital |
| Leverage Ratio | 3.0% | Non-risk weighted |
| LCR | 100% | Liquidity Coverage |
| NSFR | 100% | Net Stable Funding |
Dodd-Frank Reporting
- Form PF (Private Fund Advisers)
- Volcker Rule compliance
- Swap data reporting
- Stress test disclosure (CCAR/DFAST)
Risk Report Template
Executive Summary
- Overall portfolio risk score (1-10)
- Key risk concentrations
- Limit breaches and near-breaches
- Recommended actions
Quantitative Analysis
| Metric | Current | Limit | Status |
|---|---|---|---|
| VaR (95%, 1-day) | |||
| VaR (99%, 1-day) | |||
| CVaR (95%, 1-day) | |||
| Beta | |||
| Tracking Error |
Stress Test Results
| Scenario | P&L Impact | Margin Impact |
|---|---|---|
| 2008 Crisis | ||
| Rate +300bps | ||
| Market -30% |
Recommendations
- Position-level adjustments
- Hedging strategies
- Liquidity planning
- Limit modifications
Risk Limits Framework
| Risk Type | Metric | Hard Limit | Soft Limit |
|---|---|---|---|
| Market | VaR (95%) | 5% of NAV | 4% of NAV |
| Concentration | Single position | 10% of NAV | 7% of NAV |
| Sector | Sector exposure | 25% of NAV | 20% of NAV |
| Leverage | Gross exposure | 200% | 150% |
| Liquidity | Days to liquidate | 30 days | 20 days |
Related Skills
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Senior Data Scientist
World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics. Expertise in Python (NumPy, Pandas, Scikit-learn), R, SQL, statistical methods, A/B testing, time series, and business intelligence. Includes experiment design, feature engineering, model evaluation, and stakeholder communication. Use when designing experiments, building predictive models, performing causal analysis, or driving data-driven decisions.
Hypogenic
Automated hypothesis generation and testing using large language models. Use this skill when generating scientific hypotheses from datasets, combining literature insights with empirical data, testing hypotheses against observational data, or conducting systematic hypothesis exploration for research discovery in domains like deception detection, AI content detection, mental health analysis, or other empirical research tasks.
Ux Researcher Designer
UX research and design toolkit for Senior UX Designer/Researcher including data-driven persona generation, journey mapping, usability testing frameworks, and research synthesis. Use for user research, persona creation, journey mapping, and design validation.
Hypogenic
Automated LLM-driven hypothesis generation and testing on tabular datasets. Use when you want to systematically explore hypotheses about patterns in empirical data (e.g., deception detection, content analysis). Combines literature insights with data-driven hypothesis testing. For manual hypothesis formulation use hypothesis-generation; for creative ideation use scientific-brainstorming.
Data Engineering Data Driven Feature
Build features guided by data insights, A/B testing, and continuous measurement using specialized agents for analysis, implementation, and experimentation.
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Dashboard Design
USE THIS SKILL FIRST when user wants to create and design a dashboard, ESPECIALLY Vizro dashboards. This skill enforces a 3-step workflow (requirements, layout, visualization) that must be followed before implementation. For implementation and testing, use the dashboard-build skill after completing Steps 1-3.
Ux Researcher Designer
UX research and design toolkit for Senior UX Designer/Researcher including data-driven persona generation, journey mapping, usability testing frameworks, and research synthesis. Use for user research, persona creation, journey mapping, and design validation.
Performance Testing
Benchmark indicator performance with BenchmarkDotNet. Use for Series/Buffer/Stream benchmarks, regression detection, and optimization patterns. Target 1.5x Series for StreamHub, 1.2x for BufferList.
