skillfed

forward-risk

Quantify potential portfolio losses across normal and extreme market conditions using parametric VaR, Monte Carlo simulation, Expected Shortfall, and scenario analysis. Decompose risk by position and factor to identify which holdings drive portfolio volatility. Stress-test portfolios against historical crises and custom market shocks.

forward-risk estimates potential portfolio losses using VaR, Expected Shortfall, Monte Carlo simulation, and stress testing.

AI-generated summary based on this skill's SKILL.md

159 32 MIT updated by JoelLewis

Install

JoelLewis/finance_skills/forward-risk · repository language: Python

CLI (skillfed)coming soon
git clone https://github.com/JoelLewis/finance_skills
cp -r finance_skills/plugins/wealth-management/skills/forward-risk ~/.claude/skills/forward-risk

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How much could I lose in my portfolio with forward-risk?

forward-risk quantifies potential portfolio losses across normal and extreme market conditions using parametric VaR, Monte Carlo simulation, Expected Shortfall, and scenario analysis. The skill estimates losses at specified confidence levels (such as 99%), decomposing risk by individual positions and factors to show which holdings drive your portfolio's volatility and downside exposure.

Can forward-risk calculate value at risk and expected shortfall?

Yes. forward-risk computes both Value at Risk (VaR) and Expected Shortfall (CVaR) to estimate potential losses. VaR shows maximum loss at a given confidence level under normal conditions, while Expected Shortfall captures tail risk—the average loss when VaR is breached. Both metrics help you understand downside exposure across confidence thresholds.

What's my worst case scenario loss with forward-risk?

forward-risk assesses tail risk and expected losses beyond standard confidence thresholds through scenario analysis and stress testing. You can test your portfolio against historical market crises or custom hypothetical shocks to understand worst-case outcomes. Monte Carlo simulation and parametric methods reveal how extreme market moves impact your holdings.

How does forward-risk decompose portfolio risk by position?

forward-risk decomposes and attributes portfolio risk to individual positions and factors through component VaR and marginal VaR analysis. This breakdown identifies which holdings and risk factors drive overall portfolio volatility, enabling you to understand idiosyncratic versus systematic risk and optimize position sizing based on marginal risk contribution.

Can I stress test my investments with forward-risk?

Yes. forward-risk stress-tests portfolio resilience using historical scenarios (past market crises) and hypothetical custom shocks. You can model correlation breakdowns, liquidity stress, multi-day VaR scaling, and factor-based market moves to project portfolio risk forward and evaluate how your positions withstand extreme conditions.

What methods does forward-risk use for risk calculation?

forward-risk employs parametric VaR, Monte Carlo simulation, and scenario analysis to quantify risk. Parametric methods assume normal distributions for speed; Monte Carlo captures non-linear exposures and tail behavior; scenario analysis applies historical or custom shocks. Together, these approaches provide comprehensive forward-looking risk estimates across market conditions.

SKILL.md

rendered from the published skill — quoted content, verbatim

Forward-Looking Risk Analysis

Core Concepts

Parametric (Variance-Covariance) VaR

Assumes returns are normally distributed. For a single asset or portfolio in dollar terms (assuming zero expected return over short horizons):

VaR = W * z_alpha * sigma_p

where: - W = portfolio value - z_alpha = z-score for confidence level (1.645 for 95%, 2.326 for 99%) - sigma_p = portfolio volatility over the relevant horizon

More generally, including expected return:

VaR_alpha = mu - z_alpha * sigma

To convert from 1-day VaR to h-day VaR (assuming i.i.d. returns):

VaR_h = VaR_1 * sqrt(h)
Portfolio VaR (Multiple Assets)

For a portfolio

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 2 files
plugins/wealth-management/skills/forward-risk/SKILL.md
plugins/wealth-management/skills/forward-risk/scripts/forward_risk.py

Related skills

Tags

tail-loss-estimation risk-decomposition scenario-modeling forward-looking-metrics portfolio-stress-testing quantitative-risk-framework extreme-event-analysis position-contribution-analysis market-shock-simulation risk-attribution