risk-analysis

risk-analysis is a skill for Claude Code, Codex from skloxo/TideTrading. It costs 35 tokens per session (3,023 once invoked), scanned A, original, MIT.

A set of methods for measuring investment risk and testing how portfolios or strategies respond to difficult scenarios. It covers measures such as Value at Risk, expected tail loss, maximum drawdown, simulations, and historical stress tests.

In plain words
What is it for?
It is for calculating risk measures, simulating possible outcomes, measuring drawdowns, and designing market stress tests.
Why use it?
It helps quantify potential losses and examine risks that ordinary performance results may not show.

Skill for Claude CodeCodex

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

Good fit It is for calculating risk measures, simulating possible outcomes, measuring drawdowns, and designing market stress tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skloxo/tidetrading/risk-analysis
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 skloxo/TideTrading --skill risk-analysis
Clone the repo
git clone --depth 1 https://github.com/skloxo/TideTrading

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-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/skloxo/tidetrading/risk-analysis.svg)](https://agentmods.dev/skills/skloxo/tidetrading/risk-analysis)
Your own site
<a href="https://agentmods.dev/skills/skloxo/tidetrading/risk-analysis"><img src="https://agentmods.dev/badge/skills/skloxo/tidetrading/risk-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,023 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
How audits are shown
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.00035 $0.03023
Opus 5 $0.00017 $0.01511
Sonnet 5 $0.00007 $0.00605
Haiku 4.5 $0.00003 $0.00302

Measured 4d ago against content hash b9f4696fe645, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

risk-analysis 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 4d 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.

agent/src/skills/risk-analysis/SKILL.md · 315 lines

How it starts

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

Risk Measurement and Stress Testing

Overview

Systematic risk-measurement methodology covering VaR/CVaR calculation, Monte Carlo simulation, stress-test design, and tail-risk analysis. It provides risk evaluation for backtest results and risk-control constraints for asset allocation.

Risk Measurement Methods

1. VaR (Value at Risk)

Definition: the maximum expected loss over a given horizon at a specified confidence level.

Three Calculation Methods
Method Formula / Steps Advantages Disadvantages
Historical simulation Sort historical returns and take the quantile No distribution assumption Depends on historical samples
Parametric (normal) VaR = μ - z_α × σ Easy to compute Assumes a normal distribution
Monte Carlo Simulate N paths and take the quantile Flexible Computationally intensive
Historical Simulation Implementation
import numpy as np
import pandas as pd

def historical_var(returns: pd.Series, confidence: float = 0.95, horizon: int = 1) -> float:
    """
    Args:
        returns: Daily return series
        confidence: Confidence level, commonly 0.95 or 0.99
        horizon: Holding period in days, default 1
    Returns:
        VaR value (positive means loss)
    """
    sorted_returns = returns.sort_values()
    index = int((1 - confidence) * len(sorted_returns))
    var_1d = -sorted_returns.iloc[index]
    return var_1d * np.sqrt(horizon)  # square-root-of-time rule
Parametric Implementation
from scipy.stats import norm

def parametric_var(returns: pd.Series, confidence: float = 0.95, horizon: int = 1) -> float:
    mu = returns.mean()
    sigma = returns.std()
    z = norm.ppf(1 - confidence)
    var_1d = -(mu + z * sigma)
    return var_1d * np.sqrt(horizon)

2. CVaR / ES (Conditional VaR / Expected Shortfall)

Definition: the average loss beyond the VaR threshold, more conservative than VaR.

def historical_cvar(returns: pd.Series, confidence: float = 0.95) -> float:
    """CVaR = the mean of all losses beyond VaR."""
    var = historical_var(returns, confidence)
    tail_losses = returns[returns < -var]
    return -tail_losses.mean() if len(tail_losses) > 0 else var

Read the full file on GitHub · 315 lines

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. 4d ago First seen · 315 lines · 35 tokens per session scan A b9f4696fe645

Subscribe to this mod's changes

risk-analysis is a skill published in the GitHub repository skloxo/TideTrading (10 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 3,023 once invoked, about $0.0002 per session on Opus 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-03.

Related

Other skills, from other repositories

daily-deep-brief

A scheduled, pre-market investment briefing for Hong Kong and United States stocks. A deterministic preparation step gathers data and an agent adds judgment, while a later step validates and publishes the result.

KCNyu/clawock · 163 tokens

hk-stock-analysis

A workspace-aware analysis workflow for Hong Kong-listed stocks. It retrieves prices, technical indicators, market comparisons, and news through a local data pipeline, then adds Hong Kong-specific investment context.

KCNyu/clawock · 126 tokens

us-stock-analysis

Workspace-aware US stock analysis for kcn. Routes through clawock analyze-us / clawock us-quotes instead of generic web search, then layers fundamental/technical/news analysis on top. Use when user asks to analyze a US ticker (e.g. "analyze AAPL", "look at RKLB", "compare TSLA vs NVDA"), check earnings, run…

KCNyu/clawock · 97 tokens

invest-analyst

A framework for producing professional investment research, including company reports, industry studies, event analysis, analyst-expectation reviews, comparisons, and market summaries. It connects several investment research workflows into one process.

taxueseek/fund-investment-guide · 193 tokens

invest-cli

An investment-analysis command-line tool that fetches data for Chinese stocks and funds, US stocks, and stock screening, then applies matching analysis frameworks. A command-line tool is a program operated from a terminal.

taxueseek/fund-investment-guide · 107 tokens

invest-fund

A Chinese-language guide for analysing investment funds, with different workflows for comparing funds, reviewing ETFs, examining new funds, and studying industry funds.

taxueseek/fund-investment-guide · 142 tokens