portfolio-risk

portfolio-risk is a skill for Claude Code, Codex from Orkas-AI/Orkas. It costs 2 tokens per session (620 once invoked), scanned A, original, MIT.

A portfolio-risk calculator that analyses holdings and their returns, or applies declared stress scenarios. It reports measures such as volatility, drawdown, value at risk, concentration, and exposure.

In plain words
What is it for?
Use it for portfolio reviews, historical risk checks, concentration analysis, and scenario-based stress tests. Historical mode needs aligned daily returns and portfolio weights; scenario mode needs weights and declared shocks.
Why use it?
It shows how a portfolio has behaved and how specified shocks could affect it without fabricating missing return data. Value at risk is treated as a statistic, not a guaranteed maximum loss.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for portfolio reviews, historical risk checks, concentration analysis, and scenario-based stress tests. Historical mode needs aligned daily returns and portfolio weights; scenario mode needs weights and declared shocks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/orkas-ai/orkas/portfolio-risk
About the project

Orkas is a desktop application for commanding a team of AI agents through one chat, with a commander model assigning work to specialist agents in parallel or in sequence. People use it to coordinate research, writing, presentations, and software tasks while keeping files on their computer. The catalogue includes skills for extending the agents available to Orkas.

Orkas-AI/Orkas · 2,192 stars · on GitHub · orkas.ai

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 Orkas-AI/Orkas --skill portfolio-risk
Clone the repo
git clone --depth 1 https://github.com/Orkas-AI/Orkas

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 portfolio-risk

README.md
[![agentmods](https://agentmods.dev/badge/skills/orkas-ai/orkas/portfolio-risk/github.svg)](https://agentmods.dev/skills/orkas-ai/orkas/portfolio-risk)
Your own site
<a href="https://agentmods.dev/skills/orkas-ai/orkas/portfolio-risk"><img src="https://agentmods.dev/badge/skills/orkas-ai/orkas/portfolio-risk/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 portfolio-risk

Your own site · 80×15
<a href="https://agentmods.dev/skills/orkas-ai/orkas/portfolio-risk"><img src="https://agentmods.dev/badge/skills/orkas-ai/orkas/portfolio-risk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 620 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 original No closer match found 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.00002 $0.00620
Opus 5.5 $0.00001 $0.00248
Sonnet 5.5 $0.00000 $0.00124
Haiku 4.5 $0.00000 $0.00062

Measured 24d ago against content hash d878a3d82373, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

portfolio-risk 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 24d ago.

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.

resources/builtin/marketplace/agents/1040b336306f/skills/portfolio-risk/SKILL.md · 54 lines

What it actually says

Portfolio Risk

Read with market-data for a portfolio review, stress test, or rebalance question. Keep account values and holdings private and use only what is needed.

Choose the calculation from the supplied data: --mode historical (default) requires aligned daily decimal returns; --mode scenario uses weights and declared shocks, returns no historical statistics, and needs no return series. Do not manufacture a series to make a scenario request fit historical mode.

Historical input uses weights that sum to one and aligned daily decimal returns:

{"positions":[{"symbol":"700.HK","weight":0.4,"currency":"HKD","sector":"Technology","returns":[0.01,-0.02]}],"scenarios":{"tech_down":{"Technology":-0.15}}}

Run:

"$ORKAS_NODE" "$ORKAS_PC_DIR/bin/run-skill.cjs" market-data stock -- portfolio-risk --input portfolio.json --confidence 0.95

The core calculates portfolio return series from aligned observations, annual volatility, max drawdown, historical VaR/CVaR, HHI and top-name concentration, sector/currency exposure, and declared linear scenario losses. VaR is a sample statistic, not a loss ceiling.

For weight-only concentration or declared stress, use the same command with --mode scenario. For simultaneous local-price and FX shocks, supply weights already measured in base_currency NAV and a compound scenario:

{"base_currency":"USD","positions":[{"symbol":"700.HK","weight":1,"currency":"HKD"}],"scenarios":{"stress":{"local":{"700.HK":-0.1},"fx":{"HKD":-0.05}}}}

The core multiplies local and FX returns and also reports their separate contributions. Unspecified shocks are zero assumptions; the base currency cannot move against itself. Prepare this structured input from supplied facts without changing the source or inventing currency conversions. If the weight basis is unknown, resolve it before a cross-currency calculation.

Review missing positions, stale prices, derivatives, leverage, FX translation, liquidity, tax lots, and correlation regime change before recommending action. Frame rebalance ideas as constraint-aware options with trade-offs. Do not silently normalize invalid weights, fabricate correlations, or assume an investor's suitability, tax status, or loss capacity.

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. 24d ago First seen · 54 lines · 2 tokens per session scan A d878a3d82373

Subscribe to this mod's changes

portfolio-risk is a skill published in the GitHub repository Orkas-AI/Orkas (2,192 stars, last pushed today), licensed MIT. It adds 2 tokens to every session and 620 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-23.

Related

Other skills, from other repositories

compound-interest-calculator

Calculate compound interest given principal, rate, time, and compounding frequency.

thesongzhu/Friday · 0 tokens

behavioral-economics

Systematic departures from rational choice theory and their implications for economic analysis and policy. Covers cognitive heuristics (anchoring, availability, representativeness), biases (loss aversion, status quo, overconfidence), prospect theory (reference dependence, probability weighting, diminishing…

Tibsfox/gsd-skill-creator · 103 tokens

development-economics

Economics of low-income countries and the structural transformation from agrarian poverty to industrial prosperity. Covers growth models (Solow, endogenous growth, unified growth theory), the role of institutions (inclusive vs. extractive), inequality measurement and dynamics (Gini, Lorenz curve, Kuznets), poverty…

Tibsfox/gsd-skill-creator · 124 tokens

international-trade

Theory and policy of international economic exchange. Covers comparative advantage (Ricardo, Heckscher-Ohlin), gains from trade, trade policy instruments (tariffs, quotas, subsidies), exchange rate determination, balance of payments, globalization dynamics, trade agreements, and the political economy of protectionism.…

Tibsfox/gsd-skill-creator · 90 tokens

public-policy

Economic analysis of government intervention -- taxation (incidence, efficiency, optimal design), regulation (cost-benefit, market failure correction), externalities (Pigouvian taxation, cap-and-trade, Coasian bargaining), and public goods provision (non-rivalry, non-excludability, free-rider problem). Covers welfare…

Tibsfox/gsd-skill-creator · 108 tokens

macroeconomics

Analysis of aggregate economic phenomena -- GDP measurement, inflation dynamics, unemployment theory, monetary policy (central banks, interest rates, money supply), fiscal policy (government spending, taxation, debt), and the business cycle. Covers Keynesian, monetarist, and new classical perspectives. Use when…

Tibsfox/gsd-skill-creator · 87 tokens