Einstein Research — Portfolio Risk Analyzer
Performs a comprehensive, portfolio-level risk analysis. Calculates VaR (Value at Risk), max drawdown, correlation matrix, stress tests against historical crises, and identifies concentration risks. Use when asked about portfolio risk, drawdown, hedging, or stress testing.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/clawdiri-ai/einstein-research-portfolio-risk-dvPortfolio Risk Analyzer
Overview
This skill performs a comprehensive, portfolio-level risk analysis. It goes beyond individual position risk to quantify systemic and correlated risks across the entire portfolio.
Core Features:
- Value at Risk (VaR): Calculates 95% and 99% VaR using Parametric, Historical, and Monte Carlo methods.
- Max Drawdown Analysis: Identifies historical and potential future maximum drawdowns.
- Correlation Matrix: Visualizes how positions move in relation to each other, highlighting diversification benefits or weaknesses.
- Stress Testing: Simulates portfolio performance during historical market crises (e.g., 2008 GFC, 2020 COVID crash, 2022 rate hikes).
- Concentration Risk: Identifies over-concentration in specific sectors, factors, or individual positions.
- Beta Calculation: Measures portfolio volatility relative to benchmarks (SPY, QQQ).
When to Use This Skill
Explicit Triggers:
- "Analyze the risk of my portfolio."
- "What is my portfolio's Value at Risk?"
- "How would my portfolio perform in another 2008-style crash?"
- "Am I too concentrated in the tech sector?"
- "Calculate the max drawdown of my holdings."
- User asks about "portfolio risk," "drawdown," "VaR," "correlation," "stress test," or "concentration."
Implicit Triggers:
- User is concerned about a market downturn.
- User is adding a new large position and wants to understand its impact on overall portfolio risk.
- User is reviewing their overall asset allocation.
Workflow
Step 1: Ingest Portfolio Data
The analysis requires the current portfolio holdings, typically from a CSV or JSON file.
Input Format (portfolio.json):
{
"positions": [
{ "ticker": "AAPL", "quantity": 100, "avg_price": 150.00 },
{ "ticker": "TSLA", "quantity": 50, "avg_price": 200.00 },
{ "ticker": "SPY", "quantity": 200, "avg_price": 400.00 }
],
"cash": 25000
}
Step 2: Execute the Risk Analysis Script
The portfolio-risk-analyzer CLI tool runs the full analysis suite.
portfolio-risk-analyzer run \
--portfolio path/to/portfolio.json \
--benchmark SPY
The script performs the following calculations:
- Fetches historical price data for all positions.
- Calculates daily returns for each position and the total portfolio.
- VaR:
- Parametric: Assumes normal distribution of returns.
- Historical: Uses the actual distribution of historical returns.
- Monte Carlo: Simulates thousands of possible future return paths.
- Max Drawdown: Finds the largest peak-to-trough decline in the portfolio's history.
- Correlation: Computes the correlation matrix for all positions.
- Stress Tests: Re-prices the portfolio based on the returns of historical crisis periods.
- Concentration: Calculates weights by position, sector, and factor.
Step 3: Analyze the Output
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-clawdiri-ai-einstein-research-portfolio-risk-dv": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
Follow-Through Day (FTD) Detector
Detects Follow-Through Day (FTD) signals for market bottom confirmation using William O'Neil's methodology. Dual-index tracking (S&P 500 + NASDAQ) with state machine for rally attempt, FTD qualification, and post-FTD health monitoring. Use when user asks about market bottom signals, follow-through days, rally attempts, re-entry timing after corrections, or whether it's safe to increase equity exposure. Complementary to market-top-detector (defensive) - this skill is offensive (bottom confirmation).
Gumroad Page Generator
Generates Gumroad product page content from a simple spec.
Analytics Tracking
Track events and user behavior using Segment.
AutoSignals - Autonomous Trading Signal Optimization
Monitors and controls the AutoSignals autonomous research loop.
first-principles
Deep first-principles analysis of any topic, decision, strategy, or assumption. Strips inherited thinking, identifies what is provably true, and rebuilds from ground truth. Use when user asks for first principles analysis, wants to challenge assumptions, says "analyze this from scratch", "break this down", "what's really true here", or triggers with /firstprinciples. Also useful for strategic decisions, investment theses, product strategy, career moves, or any situation where conventional wisdom may be wrong.