Logo di Risk Management

Risk Management

Community
nimadorostkar
risk-management

Use when defining or enforcing trading risk limits. Covers drawdown circuit breakers, exposure budgets, correlation risk, stop discipline, and pre-trade gates that prevent the worst decisions. Trigger on "set up risk rules for my account", "i'm in a drawdown, should i cut size", "when should i stop trading for the day". Do not use for sizing a single trade — see the position-sizing skill.

Panoramica

Pubblicato danimadorostkar
RepositoryClaude-Skills-collection
Nome della skillrisk-management
Stelle
34
Fork
4
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da nimadorostkar su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Risk Management in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/finance/risk-management
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection.git /tmp/Claude-Skills-collection
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills-collection/skills/finance/risk-management .claude/skills/risk-management
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Risk Management in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Risk Management non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Risk Management non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Risk Management

Purpose

Define the limits that keep a losing period from becoming a terminal one, and enforce them mechanically — because the moment they matter most is the moment you will most want to override them.

When to Use

  • Setting risk limits for a strategy or an account.
  • In a drawdown, deciding whether to reduce size.
  • Before entering a trade, checking it against the rules.
  • After a loss, reviewing whether the rules were followed.

Capabilities

  • Drawdown circuit breakers and de-risking schedules.
  • Exposure budgets: gross, net, per sector, per correlated group.
  • Correlation-aware risk aggregation.
  • Stop-loss discipline and the failure modes around it.
  • Pre-trade checklists as a hard gate.

Inputs

  • Account equity and the current drawdown from the high-water mark.
  • Open positions and their correlations.
  • The proposed trade.

Outputs

  • A pass/fail against each limit.
  • Required size reduction, if any.
  • A stated reason for a rejection.

Workflow

  1. Set the limits when calm — Maximum risk per trade, maximum total exposure, maximum drawdown before de-risking. Write them down. They must be decided before they are tested.
  2. Define the circuit breaker — A drawdown level at which size is cut, and a deeper level at which trading stops entirely. This is the rule that prevents a bad month from becoming a career-ending one.
  3. Aggregate correlated risk — Positions in the same sector, the same factor, or the same theme are one risk. Sum them.
  4. Gate every trade — Check it against the limits before entry, mechanically. A checklist that is consulted after the position is on is not a gate.
  5. Honor the stop — The stop is the risk. Moving it further away after entry converts a defined loss into an undefined one, and it is the single most common way accounts are destroyed.
  6. Review the rule, not the outcome — A trade that followed the rules and lost was a good trade. A trade that broke the rules and won was a bad one, and it will be repeated.

Best Practices

  • Widening a stop is the cardinal sin. The stop was set where the thesis is wrong; moving it means the thesis is wrong and you are staying anyway.
  • A drawdown circuit breaker must be mechanical. In a drawdown, judgment is impaired precisely when it is most needed — that is what the rule is for.
  • Reduce size in a drawdown, not after recovering from one. Risking the same percentage of a smaller account is already a reduction; cutting the percentage as well is what stops the compounding.
  • Correlation is not a static number. It rises sharply in a selloff, which is exactly when the diversification you were relying on stops existing.
  • The purpose of a risk limit is to be binding. A limit you override when it is inconvenient is not a limit; it is a preference.
  • Track rule adherence separately from profit and loss. They are different things, and only one of them is under your control.

Examples

A drawdown circuit breaker with a defined de-risking schedule:

python
@dataclass(frozen=True)
class RiskPolicy:
    base_risk_pct: float = 0.01           # 1% per trade at full size
    max_gross_exposure: float = 1.5       # 150% of equity, long + short
    max_sector_exposure: float = 0.30
    max_correlated_risk_pct: float = 0.04 # aggregate risk across correlated positions


def size_multiplier(drawdown_pct: float) -> float:
    """De-risk as the drawdown deepens. Mechanical, not discretionary."""
    if drawdown_pct >= 0.20:
        return 0.0        # STOP. No new positions. Review the strategy, not the market.
    if drawdown_pct >= 0.15:
        return 0.25
    if drawdown_pct >= 0.10:
        return 0.50
    if drawdown_pct >= 0.05:
        return 0.75
    return 1.0


# Equity 100,000, high-water 120,000 -> drawdown 16.7% -> multiplier 0.25.
# Risk per trade is now 0.25% of 100,000 = $250, not the $1,000 it was at the peak.
# This is a 4x reduction in position size at the point where the strategy is
# demonstrably not working. It is not pessimism; it is arithmetic.

A pre-trade gate that is actually a gate:

python
def pre_trade_check(trade: ProposedTrade, book: Portfolio, policy: RiskPolicy) -> GateResult:
    failures = []

    if trade.stop is None:
        failures.append("BLOCK: no stop defined. Risk is undefined and unbounded.")

    if trade.dollar_risk > book.equity * policy.base_risk_pct * size_multiplier(book.drawdown):
        failures.append(
            f"BLOCK: risk ${trade.dollar_risk:,.0f} exceeds the current limit "
            f"(drawdown {book.drawdown:.1%} -> size multiplier "
            f"{size_multiplier(book.drawdown):.2f})"
        )

    sector_after = book.sector_exposure(trade.sector) + trade.position_value / book.equity
    if sector_after > policy.max_sector_exposure:
        failures.append(
            f"BLOCK: {trade.sector} exposure would reach {sector_after:.0%} "
            f"(limit {policy.max_sector_exposure:.0%})"
        )

    # Correlated positions are one position.
    correlated = book.positions_correlated_with(trade.symbol, threshold=0.7)
    total_correlated_risk = sum(p.dollar_risk for p in correlated) + trade.dollar_risk
    if total_correlated_risk > book.equity * policy.max_correlated_risk_pct:
        failures.append(
            f"BLOCK: aggregate risk across {len(correlated) + 1} correlated positions "
            f"({', '.join(p.symbol for p in correlated)}) would reach "
            f"${total_correlated_risk:,.0f}"
        )

    if trade.is_earnings_within(days=2) and not trade.earnings_intentional:
        failures.append("BLOCK: earnings within 2 days. Overnight gap risk is not sized for.")

    return GateResult(passed=not failures, failures=failures)

Notes

  • The gate above blocks on a missing stop. That single check prevents the majority of catastrophic single-position losses, because an unbounded loss requires an undefined risk.
  • A 20% drawdown triggering a full stop is not a panic response; it is a recognition that either the strategy has stopped working or the market regime has changed, and both warrant investigation rather than more trades.
  • This is educational material on risk-management methodology, not financial advice. Limits appropriate for one account and strategy may be entirely wrong for another.

Domande frequenti

Cosa fa la skill IA Risk Management?

Use when defining or enforcing trading risk limits. Covers drawdown circuit breakers, exposure budgets, correlation risk, stop discipline, and pre-trade gates that prevent the worst decisions. Trigger on "set up risk rules for my account", "i'm in a drawdown, should i cut size", "when should i stop trading for the day". Do not use for sizing a single trade — see the position-sizing skill.

Perché usare Risk Management su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Risk Management è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Risk Management in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/finance/risk-management. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Risk Management?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Risk Management?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Risk Management: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Risk Management è gratuita?

Sì. È pubblicata su GitHub da nimadorostkar con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇