Search

PythonReactSEOPDF
OpenClaw

Afrexai Portfolio Risk

Portfolio Risk Analyzer

1kalin0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install 1kalin/afrexai-portfolio-risk

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Portfolio Risk Analyzer

Complete investment portfolio risk management system. Analyze positions, calculate risk metrics, stress test scenarios, optimize allocations, and generate institutional-grade risk reports — all without external APIs.


1. Portfolio Intake

When the user shares their portfolio (positions, tickers, amounts), structure it into this format:

portfolio:
  name: "User Portfolio"
  currency: USD
  as_of: "2026-02-15"
  positions:
    - ticker: AAPL
      shares: 50
      avg_cost: 185.00
      current_price: 228.50  # Look up via web search
      asset_class: US_EQUITY
      sector: Technology
    - ticker: BTC
      units: 0.5
      avg_cost: 42000
      current_price: 97500
      asset_class: CRYPTO
      sector: Digital Assets
    - ticker: VOO
      shares: 100
      avg_cost: 410.00
      current_price: 535.00
      asset_class: US_EQUITY_ETF
      sector: Broad Market
  cash:
    amount: 15000
    currency: USD
Price Lookup

For each position, use web search to find current price:

  • Search: [TICKER] stock price today
  • For crypto: [COIN] price USD today
  • Record source and timestamp
Portfolio Summary Table
Position Shares Cost Basis Current Value Weight P&L P&L %
AAPL 50 $9,250 $11,425 18.2% +$2,175 +23.5%
... ... ... ... ... ... ...
TOTAL $XX,XXX $XX,XXX 100% ±$X,XXX ±X.X%

2. Risk Metrics Calculator

Calculate ALL of the following for every portfolio analysis:

2.1 Concentration Risk
Position Concentration:
- Any single position >20% of portfolio = HIGH RISK ⚠️
- Any single position >10% = MODERATE RISK
- Top 3 positions >50% = CONCENTRATED

Sector Concentration:
- Any sector >30% = OVERWEIGHT
- Count unique sectors — fewer than 4 = UNDER-DIVERSIFIED

Asset Class Breakdown:
- Equities: X%
- Fixed Income: X%
- Crypto: X%
- Cash: X%...

Source information

Source
github
Repository
openclaw/skills
Path
skills/1kalin/afrexai-portfolio-risk
Version
—
Commit
2c4a01c720caa12a1fb54bc7d454c3debec48e74
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

Portfolio Risk Analyzer

Institutional-grade portfolio risk management for AI agents. Analyze positions, calculate VaR, stress test against historical crashes, optimize allocations, and generate professional risk reports — zero dependencies, no API keys required.

Install

clawhub install afrexai-portfolio-risk

What It Does

  • Risk Metrics: Value at Risk (VaR), Sharpe Ratio, Beta, Max Drawdown, Concentration Risk
  • Stress Testing: 6 pre-built scenarios (2008 crash, COVID, dot-com, rate shock, stagflation, crypto winter) + custom
  • Portfolio Optimization: Risk parity analysis, rebalancing recommendations, correlation assessment
  • Risk Scorecard: 0-100 composite score across 6 weighted dimensions
  • Tax-Loss Harvesting: Automated scanner with wash-sale-safe replacements
  • Monitoring: Daily alerts, weekly review templates, earnings calendar
  • Special Assets: Crypto, REITs, options, leveraged positions, international

Quick Start

Tell your agent:

"Here's my portfolio: 50 shares AAPL, 100 shares VOO, 0.5 BTC, $15K cash. Analyze my risk."

The agent will look up current prices, calculate all risk metrics, run stress tests, and deliver a complete risk scorecard.

Example Commands

  • "What's my portfolio risk?"
  • "Stress test against a 2008-style crash"
  • "How should I rebalance?"
  • "What's my Value at Risk?"
  • "Scan for tax-loss harvesting opportunities"
  • "Generate a full risk report"

Why This vs Other Tools

Most portfolio tools require paid API subscriptions or only work with specific brokerages. This skill uses web search for live prices and works with any portfolio — stocks, crypto, bonds, REITs, options. Pure agent intelligence, zero vendor lock-in.


⚡ Level up your financial AI agent:

  • Fintech AI Context Pack ($47) — Complete fintech agent context: compliance frameworks, risk models, regulatory intelligence
  • [SaaS Context Pack ($47)](https://...

Extracted content

SKILL.md
# Portfolio Risk Analyzer

Complete investment portfolio risk management system. Analyze positions, calculate risk metrics, stress test scenarios, optimize allocations, and generate institutional-grade risk reports — all without external APIs.

---

## 1. Portfolio Intake

When the user shares their portfolio (positions, tickers, amounts), structure it into this format:

```yaml
portfolio:
  name: "User Portfolio"
  currency: USD
  as_of: "2026-02-15"
  positions:
    - ticker: AAPL
      shares: 50
      avg_cost: 185.00
      current_price: 228.50  # Look up via web search
      asset_class: US_EQUITY
      sector: Technology
    - ticker: BTC
      units: 0.5
      avg_cost: 42000
      current_price: 97500
      asset_class: CRYPTO
      sector: Digital Assets
    - ticker: VOO
      shares: 100
      avg_cost: 410.00
      current_price: 535.00
      asset_class: US_EQUITY_ETF
      sector: Broad Market
  cash:
    amount: 15000
    currency: USD
```

### Price Lookup
For each position, use web search to find current price:
- Search: `[TICKER] stock price today`
- For crypto: `[COIN] price USD today`
- Record source and timestamp

### Portfolio Summary Table

| Position | Shares | Cost Basis | Current Value | Weight | P&L | P&L % |
|----------|--------|-----------|---------------|--------|-----|-------|
| AAPL | 50 | $9,250 | $11,425 | 18.2% | +$2,175 | +23.5% |
| ... | ... | ... | ... | ... | ... | ... |
| **TOTAL** | | **$XX,XXX** | **$XX,XXX** | **100%** | **±$X,XXX** | **±X.X%** |

---

## 2. Risk Metrics Calculator

Calculate ALL of the following for every portfolio analysis:

### 2.1 Concentration Risk

```
Position Concentration:
- Any single position >20% of portfolio = HIGH RISK ⚠️
- Any single position >10% = MODERATE RISK
- Top 3 positions >50% = CONCENTRATED

Sector Concentration:
- Any sector >30% = OVERWEIGHT
- Count unique sectors — fewer than 4 = UNDER-DIVERSIFIED

Asset Class Breakdown:
- Equities: X%
- Fixed Income: X%
- Crypto: X%
- Cash: X%...
README
# Portfolio Risk Analyzer

**Institutional-grade portfolio risk management for AI agents.** Analyze positions, calculate VaR, stress test against historical crashes, optimize allocations, and generate professional risk reports — zero dependencies, no API keys required.

## Install

```bash
clawhub install afrexai-portfolio-risk
```

## What It Does

- **Risk Metrics**: Value at Risk (VaR), Sharpe Ratio, Beta, Max Drawdown, Concentration Risk
- **Stress Testing**: 6 pre-built scenarios (2008 crash, COVID, dot-com, rate shock, stagflation, crypto winter) + custom
- **Portfolio Optimization**: Risk parity analysis, rebalancing recommendations, correlation assessment
- **Risk Scorecard**: 0-100 composite score across 6 weighted dimensions
- **Tax-Loss Harvesting**: Automated scanner with wash-sale-safe replacements
- **Monitoring**: Daily alerts, weekly review templates, earnings calendar
- **Special Assets**: Crypto, REITs, options, leveraged positions, international

## Quick Start

Tell your agent:
> "Here's my portfolio: 50 shares AAPL, 100 shares VOO, 0.5 BTC, $15K cash. Analyze my risk."

The agent will look up current prices, calculate all risk metrics, run stress tests, and deliver a complete risk scorecard.

## Example Commands

- "What's my portfolio risk?"
- "Stress test against a 2008-style crash"
- "How should I rebalance?"
- "What's my Value at Risk?"
- "Scan for tax-loss harvesting opportunities"
- "Generate a full risk report"

## Why This vs Other Tools

Most portfolio tools require paid API subscriptions or only work with specific brokerages. This skill uses web search for live prices and works with any portfolio — stocks, crypto, bonds, REITs, options. Pure agent intelligence, zero vendor lock-in.

---

⚡ **Level up your financial AI agent:**

- [Fintech AI Context Pack ($47)](https://afrexai-cto.github.io/context-packs/) — Complete fintech agent context: compliance frameworks, risk models, regulatory intelligence
- [SaaS Context Pack ($47)](https://...

Related skills

OpenClaw

ai-maestro

23blocks-os

AI Agent Orchestrator with Skills System - Give AI Agents superpowers: memory search, code graph queries, agent-to-agent messaging. Manage Claude, Codex or any AI Agent from one dashboard. Move Agents between c...

OpenClaw

registry-broker-skills

hashgraph-online

AI agent skills for the Universal Registry - search, chat, and register 72,000+ agents across 14+ protocols. Works with Claude, Codex, Cursor, OpenClaw, and any AI assistant.

OpenClaw

skills-manager

rito-w

A cross-platform skills manager for AI IDEs. Search marketplace, download locally, and install to Claude, Cursor, Windsurf, and more with one click.