Logo: Canada Iiroc Electronic Trading Rules

Canada Iiroc Electronic Trading Rules

Communautéit
HimanshuJ16
canada-iiroc-electronic-trading-rules

Benotzt dëst, wann Dir Orders op kanadesche Maartplaze wéi TSX, TSX Venture, Cboe Canada oder engem ATS weiderleet, wou NI 23-103, Abschnitt 3, an UMIR-Regel 7.1 automatiséiert Kontrollen virum Handel an UMIR 6.2-Orderbezeechnunge fir all Order verlaangen.

Iwwersiicht

EditeurHimanshuJ16
RepositoryAlgo-Trading-Skills
Skill-Nummcanada-iiroc-electronic-trading-rules
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 Canada Iiroc Electronic Trading Rules 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/canada-iiroc-electronic-trading-rules
  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/canada-iiroc-electronic-trading-rules .claude/skills/canada-iiroc-electronic-trading-rules
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Canada Iiroc Electronic Trading Rules 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 Canada Iiroc Electronic Trading Rules automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Canada Iiroc Electronic Trading Rules 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 skill when deploying algorithms that route orders to Canadian marketplaces (TSX, TSX Venture, Cboe Canada — formerly NEO — CSE, and the ATSs). Under National Instrument 23-103 s.3 and UMIR Rule 7.1, a marketplace participant must run automated pre-trade controls over every order before it reaches a marketplace: credit and capital thresholds, price and size parameters, limits on the value of unexecuted orders, and the regulatory designations that UMIR 6.2 requires on entry.

When NOT to Use

  • Non-Canadian venues. These controls are jurisdiction-specific. US market access is governed by SEC Rule 15c3-5 (sec-rule-15c3-5-risk-controls-us) and the EU by MiFID II RTS 6 (mifid-ii-algo-trading-compliance-eu). The short-marking exempt designation has no US or EU analogue — do not port it.
  • As the firm's only short-sale control. The engine checks designation, not the pre-borrow arrangements UMIR requires for certain short sales, and not failed-trade reporting.
  • As a substitute for marketplace-level controls. CIRO's marketplace threshold regime (single-stock circuit breakers, price freezes) runs at the venue. It does not discharge the participant's own obligation under NI 23-103 s.3(5) to set and control its own filters.

Prerequisites

  • Trading system that produces normalized order objects with side, quantity, limit price (or None for a market order), and the account's owned position in the security.
  • A live reference price (last traded price) per symbol. The engine fails closed when the reference price is missing, zero or non-finite — plan for stale-feed handling rather than being surprised by rejections.
  • Firm-determined threshold values. Neither NI 23-103 nor UMIR prescribes any numeric limit; the participant sets, documents and periodically reassesses each one (NI 23-103 s.3(5), s.3(6)).
  • A flag identifying accounts that qualify for the "short-marking exempt" designation.

Workflow

  1. Rule Initialization: Instantiate CiroPreTradeRiskEngine with a RiskLimits object. Set max_open_order_notional_cad if you want this engine to enforce the unexecuted-order-value control; leaving it None disables it and the obligation falls elsewhere in your stack.
  2. Order Interception: Call validate_order(order) synchronously before the order reaches the FIX gateway, and inspect is_compliant. If your routing path has no rejection branch, call enforce_order(order) instead — it raises RegulatoryViolationError so a forgotten return-value check cannot leak an order to the venue.
  3. Input Sanity, Fail Closed: Non-positive quantity, non-finite or negative price, and an unusable reference price are rejected up front (INVALID_ORDER_PARAMETERS, REFERENCE_PRICE_UNAVAILABLE). This is deliberate: NaN compares False against every threshold, so an unchecked NaN price would pass every downstream test.
  4. Size, Notional and Aggregate Checks: Quantity against max_order_quantity; this order's notional against max_order_value_cad; and, when configured, open_order_notional_cad + this order against max_open_order_notional_cad. A market order (price=None) is valued at the reference price so it is still caught by the notional controls.
  5. Price Collar: Limit orders deviating more than max_price_deviation_pct from the reference price are rejected. Market orders carry no limit price and are not collared — size and notional are their only constraints here.
  6. UMIR 6.2 Designation Check: Decide the designation before routing, not after:
    • If the account is short-marking exempt, every order from it — purchase as well as sale — must carry the SME designation and must not also be marked short (UMIR 6.2(1)(b)(ix)). Its use is mandatory, not optional.
    • Otherwise, a sale of a security the account does not own must be marked "short" (UMIR 6.2(1)(b)(viii)) — and a sale fully covered by owned inventory must not be. Over-marking is a misdesignation too.
  7. Rejection Handling: Log every rejection with its ViolationCode and halt routing. Persist the record for supervisory review under UMIR 7.1.

Full procedure: see references/workflows.md. Standards reference: see references/standards.md. Printable pre-flight checklist: see assets/checklist.md.

Common Pitfalls

  • Post-Trade Only: Relying on T+1 drop-copy reconciliation. NI 23-103 s.3(2) requires automated controls pre-trade; post-trade monitoring is an addition to them, not a substitute.
  • Failing Open on Missing Market Data: Skipping the price collar when the reference price is zero, None or NaN. A gap in the feed is exactly when a fat-finger order is most dangerous — a control that quietly stops running is worse than no control, because nobody notices.
  • Treating SME as an Optional Extra Flag: Marking a qualifying account's order both "short" and "short-marking exempt", or marking only sales SME and leaving its purchases unmarked. SME replaces the short marker and applies to both sides of the account's flow.
  • Only Checking Under-Marking: Marking a fully covered long sale as "short" is a UMIR 6.2 misdesignation in its own right and corrupts the audit trail CIRO relies on.
  • Static Price Limits: Hardcoding a "$50 limit" instead of linking price collars to the current reference price.
  • Confusing Single-Order and Aggregate Controls: A per-order notional cap does not satisfy the Policy 7.1 control on the value of unexecuted orders. A thousand small orders can breach a capital threshold that no single order does.
  • Citing Repealed Rules in Controls Documentation: UMIR 3.1 (short sale price restrictions, the tick test) was repealed effective September 1, 2012. Short-sale obligations now live in the UMIR 6.2 designations and the pre-borrow provisions.

Verification

  • Simulate a "fat-finger" market order for 1,000,000 shares and confirm the engine blocks it before FIX transmission.
  • Submit an order with a NaN limit price and with a zero reference price; confirm both are rejected rather than silently passed.
  • Submit a purchase from a short-marking exempt account with no designation; confirm IMPROPER_SME_MARK.
  • Run python -m unittest discover -s skills/canada-iiroc-electronic-trading-rules/scripts and confirm all tests pass.

Related Skills

  • broker-account-margin-call-handling
  • best-execution-record-keeping-global
  • sec-rule-15c3-5-risk-controls-us
  • mifid-ii-algo-trading-compliance-eu

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 Canada Iiroc Electronic Trading Rules?

Benotzt dëst, wann Dir Orders op kanadesche Maartplaze wéi TSX, TSX Venture, Cboe Canada oder engem ATS weiderleet, wou NI 23-103, Abschnitt 3, an UMIR-Regel 7.1 automatiséiert Kontrollen virum Handel an UMIR 6.2-Orderbezeechnunge fir all Order verlaangen.

Firwat Canada Iiroc Electronic Trading Rules op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Canada Iiroc Electronic Trading Rules 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 Canada Iiroc Electronic Trading Rules an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/canada-iiroc-electronic-trading-rules 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 Canada Iiroc Electronic Trading Rules 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 Canada Iiroc Electronic Trading Rules benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Canada Iiroc Electronic Trading Rules 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 Canada Iiroc Electronic Trading Rules 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 👇