Logo: Adaptive Execution Under Volatility Spikes

Adaptive Execution Under Volatility Spikes

Communautéit
HimanshuJ16
adaptive-execution-under-volatility-spikes

Use before each child-order decision in a TWAP, VWAP or POV schedule when a volatility spike should bound participation, child size and limit offset; fails closed when the volatility feed is stale or missing.

Iwwersiicht

EditeurHimanshuJ16
RepositoryAlgo-Trading-Skills
Skill-Nummadaptive-execution-under-volatility-spikes
Stären
50
Forks
7
Matgeliwwert Dateien
5
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 5 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    HimanshuJ16 huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Adaptive Execution Under Volatility Spikes an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/adaptive-execution-under-volatility-spikes
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HimanshuJ16/Algo-Trading-Skills.git /tmp/Algo-Trading-Skills
mkdir -p .claude/skills
cp -r /tmp/Algo-Trading-Skills/skills/adaptive-execution-under-volatility-spikes .claude/skills/adaptive-execution-under-volatility-spikes
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Adaptive Execution Under Volatility Spikes an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Adaptive Execution Under Volatility Spikes automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Adaptive Execution Under Volatility Spikes net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

When to Use

Use this overlay before each child-order decision in a TWAP, VWAP, or POV schedule when a trusted real-time feed supplies a short-horizon volatility signal. It classifies the signal into NORMAL, HIGH_VOLATILITY, or CRITICAL_SHOCK and returns bounded execution parameters.

The engine is deliberately advisory. It does not place, cancel, replace, or route orders and it does not enforce broker, exchange, or portfolio risk controls.

When NOT to Use

  • Do not use it as a substitute for broker or exchange pre-trade controls, trading-pause handling, limit-up/limit-down validation, or a portfolio kill switch.
  • Do not use it when the volatility feed is stale, unavailable, improperly calibrated, or mixes incompatible instruments or sessions.
  • Do not use it as a standalone market-impact, liquidity, best-execution, or smart-order-routing model; volatility alone does not measure spread, depth, toxicity, or venue availability.
  • Do not route an order solely because this engine returns NORMAL; the parent scheduler and independent risk gates must still approve it.

Prerequisites

  • Python 3.10+.
  • A real-time, instrument-specific volatility signal with documented units and timestamp/freshness checks performed by the caller.
  • A parent execution scheduler and an EMS capable of idempotent cancel/replace requests.
  • Independent pre-trade controls for quantity, notional, price collars, credit, position, and venue trading status.
  • A tested operational procedure for halting, cancelling working orders, alerting, and manually or explicitly resuming a parent order.

Workflow

  1. Validate configuration: Construct AdaptiveVolatilityConfig with participation in [0, 1], a positive base child size, non-negative offsets, finite thresholds, and critical > high. Leave enabled=True: enabled=False is a bypass that returns the base parameters and skips volatility validation entirely, not a safe default. The engine re-validates the config on every call, so a live edit or partial reload fails closed rather than routing on out-of-range bounds.

  2. Validate the signal upstream: Confirm instrument identity, session, timestamp freshness, and calculation method. Pass a finite numeric current_volatility value to evaluate.

  3. Evaluate before routing: Call AdaptiveExecutionUnderVolatilitySpikesEngine.evaluate(market_data) for every child-order decision, using one engine instance per instrument and parent order. Treat MarketDataValidationError or other validation failures as a safety event, not as normal-market input; a failed evaluation leaves engine.current_regime at UNKNOWN rather than at the regime of the last successful call, and a newly constructed engine reports UNKNOWN until an evaluation succeeds.

  4. Apply the decision: branch on halt_trading before reading any numeric field.

    • NORMAL: use configured participation, child size, and normal offset.
    • HIGH_VOLATILITY: use half the configured participation and child size, with the high-volatility offset. Re-check all EMS and venue price/quantity limits.
    • CRITICAL_SHOCK: do not submit new orders. Cancel all working orders for the parent using stable client/order identifiers, record the cancellation outcome, and alert operations.

    limit_offset_bps is a distance away from the aggressive side of your reference price — a buy limit at ref * (1 - bps / 10_000), a sell limit at ref * (1 + bps / 10_000). The larger high-volatility offset is therefore the more passive one. Map the sign explicitly if your EMS defines offsets as aggressiveness.

  5. Recover explicitly: Keep the parent paused after a critical shock until the external recovery policy is satisfied. Revalidate feed freshness, venue status, risk limits, and outstanding-order state before resuming; do not infer recovery from one normal observation.

  6. Observe and reconcile: Emit regime, input timestamp, decision timestamp, parent/order identifier, cancel results, exceptions, and parameter values to an auditable event stream. Reconcile the EMS state before every resume.

Common Pitfalls

  • Missing-data defaulting: Treating absent volatility as 0.0 silently enables normal trading. The implementation raises MarketDataValidationError instead.
  • Control substitution: Treating a strategy threshold as an exchange collar, trading halt, or regulatory control. Those controls remain outside this engine.
  • Non-idempotent cancellation: Sending repeated cancel requests without stable identifiers or reconciling acknowledgements can leave the parent partially active.
  • Stale or cross-instrument data: A numerically valid signal can still be unsafe when its timestamp, instrument, session, or units are wrong.
  • Threshold chatter: A single observation below a threshold is not a sufficient recovery policy. Use an external cooldown, hysteresis, or manual release procedure.
  • Inverted offset convention: Applying limit_offset_bps as aggressiveness rather than passivity makes the high-volatility branch chase a dislocating book — the exact opposite of the intended protection. The halt decision zeroes every numeric field, so a caller that ignores halt_trading and prices off those zeros gets the most aggressive offset available.
  • Bypass mistaken for a default: enabled=False disables the volatility validation along with the overlay. A NORMAL result from a disabled engine says nothing about the market; it was never measured.
  • Shared engine instances: current_regime describes that instance's last evaluation only. One engine shared across symbols or parents reports whichever evaluated most recently, and concurrent calls on one instance race. Read ExecutionParameters.regime from the returned object for a per-decision value.
  • Illusory liquidity: Smaller child orders and wider offsets do not guarantee fills or prevent slippage when displayed depth disappears.

Verification

Run the focused tests from the skill directory:

text
python -m unittest discover -s skills/adaptive-execution-under-volatility-spikes/scripts

The tests cover normal, boundary, negative-signal, high-volatility, child-size-floor, critical-shock halt-sentinel, disabled-bypass, missing-input, invalid-input, mapping-type, constructor-type, runtime config-mutation, and post-fault UNKNOWN state behavior. Before deployment, replay calibrated historical and synthetic shock scenarios and verify that the EMS cancels and reconciles working orders idempotently.

Related Skills

  • execution-algo-twap-vwap-slicing
  • execution-algorithm-kill-switch-integration
  • order-placement-idempotency
  • broker-api-idempotent-cancel-requests

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Adaptive Execution Under Volatility Spikes?

Use before each child-order decision in a TWAP, VWAP or POV schedule when a volatility spike should bound participation, child size and limit offset; fails closed when the volatility feed is stale or missing.

Firwat Adaptive Execution Under Volatility Spikes op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Adaptive Execution Under Volatility Spikes besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Adaptive Execution Under Volatility Spikes an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/adaptive-execution-under-volatility-spikes an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Adaptive Execution Under Volatility Spikes benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Adaptive Execution Under Volatility Spikes benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Adaptive Execution Under Volatility Spikes domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Adaptive Execution Under Volatility Spikes gratis?

Jo. HimanshuJ16 huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇