risk-calculator

risk-calculator is a skill for Claude Code, Codex from kayzaa/k.i.t.-bot. It costs 23 tokens per session (1,410 once invoked), scanned A, a copy of risk-calculator, MIT.

A portfolio risk analysis tool that calculates measures such as Value at Risk, expected shortfall, drawdown, Sharpe ratio, and asset correlations. It also supports position sizing and stress-test scenarios.

In plain words
What is it for?
Use it to analyse portfolio risk, calculate trade sizes, inspect correlations, check margin use, set risk limits, and test crash scenarios.
Why use it?
It turns portfolio data into estimates of possible losses, concentration, volatility, and diversification. This gives you a structured way to assess trade size and portfolio exposure before acting.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to analyse portfolio risk, calculate trade sizes, inspect correlations, check margin use, set risk limits, and test crash scenarios.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kayzaa/k.i.t.-bot/risk-calculator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kayzaa/k.i.t.-bot --skill risk-calculator
Clone the repo
git clone --depth 1 https://github.com/kayzaa/k.i.t.-bot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for risk-calculator

README.md
[![agentmods](https://agentmods.dev/badge/skills/kayzaa/k.i.t.-bot/risk-calculator/github.svg)](https://agentmods.dev/skills/kayzaa/k.i.t.-bot/risk-calculator)
Your own site
<a href="https://agentmods.dev/skills/kayzaa/k.i.t.-bot/risk-calculator"><img src="https://agentmods.dev/badge/skills/kayzaa/k.i.t.-bot/risk-calculator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for risk-calculator

Your own site · 80×15
<a href="https://agentmods.dev/skills/kayzaa/k.i.t.-bot/risk-calculator"><img src="https://agentmods.dev/badge/skills/kayzaa/k.i.t.-bot/risk-calculator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.01410
Opus 5 $0.00012 $0.00705
Sonnet 5 $0.00005 $0.00282
Haiku 4.5 $0.00002 $0.00141

Measured 8d ago against content hash 6f7385abcb4b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

risk-calculator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (__init__.py, risk_calculator.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to risk-calculator — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/risk-calculator/SKILL.md · 216 lines

How it starts

The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.

⚠️ Risk Calculator

Know your risk before you trade. Comprehensive portfolio risk analysis including VaR, Sharpe ratio, drawdown analysis, and optimal position sizing.

Features

📊 Risk Metrics

  • Value at Risk (VaR) - 95% and 99%
  • Conditional VaR (CVaR / Expected Shortfall)
  • Maximum Drawdown
  • Sharpe Ratio
  • Sortino Ratio
  • Beta vs benchmark

🎯 Position Sizing

  • Kelly Criterion calculation
  • Fixed risk position sizing
  • Volatility-adjusted sizing
  • Maximum position limits

📈 Correlation Analysis

  • Asset correlation matrix
  • Portfolio diversification score
  • Concentration risk
  • Sector/chain exposure

⚡ Real-Time Monitoring

  • Live risk dashboard
  • Alert on threshold breach
  • Stress test scenarios
  • Margin utilization

Usage

# Full portfolio risk analysis
kit risk analyze

# Calculate position size for trade
kit risk size BTC/USDT --risk 2%

# Check Value at Risk
kit risk var --confidence 95

# Correlation matrix
kit risk correlation

# Stress test
kit risk stress --scenario crash

CLI Output

⚠️ K.I.T. Risk Calculator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Portfolio Value: $45,231.50
Last Updated: Just now

📊 RISK METRICS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Daily VaR (95%):     $1,234.56 (2.73%)
Daily VaR (99%):     $1,890.23 (4.18%)
Weekly VaR (95%):    $2,761.89 (6.11%)

Max Drawdown (30d):  -12.5%
Current Drawdown:    -3.2%

Sharpe Ratio:        1.85 ✅ Excellent
Sortino Ratio:       2.31 ✅ Excellent
Beta (vs BTC):       1.12

🎯 POSITION LIMITS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Max Single Position: $9,046 (20%)
Recommended Trade:   $904 (2% risk)
Kelly Optimal:       $2,261 (5%)

📈 CORRELATION MATRIX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       BTC    ETH    SOL
BTC   1.00   0.85   0.72
ETH   0.85   1.00   0.68
SOL   0.72   0.68   1.00

Diversification Score: 65/100 ⚠️
Suggestion: Add uncorrelated assets

⚡ STRESS SCENARIOS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-10% Market Crash:   -$4,789 (-10.6%)
-30% Bear Market:    -$15,234 (-33.7%)
2020 COVID Crash:    -$22,851 (-50.5%)

Read the full file on GitHub · 216 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 216 lines · 23 tokens per session scan A 6f7385abcb4b

Subscribe to this mod's changes

risk-calculator is a skill published in the GitHub repository kayzaa/k.i.t.-bot (5 stars, last pushed 6mo ago), licensed MIT. It adds 23 tokens to every session and 1,410 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to risk-calculator, differing in 0 lines, and is treated as a copy.