Logo van Canada Iiroc Electronic Trading Rules

Canada Iiroc Electronic Trading Rules

Community
HimanshuJ16
canada-iiroc-electronic-trading-rules

Gebruik dit bij het routeren van orders naar Canadese handelsplatformen zoals TSX, TSX Venture, Cboe Canada of een ATS, waar NI 23-103 section 3 en UMIR Rule 7.1 geautomatiseerde pre-tradecontroles vereisen, evenals orderaanduidingen volgens UMIR 6.2 voor elke order.

Overzicht

UitgeverHimanshuJ16
RepositoryAlgo-Trading-Skills
Skillnaamcanada-iiroc-electronic-trading-rules
Sterren
50
Forks
7
Meegeleverde bestanden
5
LicentieApache-2.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 5

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door HimanshuJ16 op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Canada Iiroc Electronic Trading Rules in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/canada-iiroc-electronic-trading-rules
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die 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 na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Canada Iiroc Electronic Trading Rules in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Canada Iiroc Electronic Trading Rules automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Canada Iiroc Electronic Trading Rules niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

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

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Canada Iiroc Electronic Trading Rules?

Gebruik dit bij het routeren van orders naar Canadese handelsplatformen zoals TSX, TSX Venture, Cboe Canada of een ATS, waar NI 23-103 section 3 en UMIR Rule 7.1 geautomatiseerde pre-tradecontroles vereisen, evenals orderaanduidingen volgens UMIR 6.2 voor elke order.

Waarom Canada Iiroc Electronic Trading Rules gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Canada Iiroc Electronic Trading Rules bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Canada Iiroc Electronic Trading Rules in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/canada-iiroc-electronic-trading-rules. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Canada Iiroc Electronic Trading Rules gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Canada Iiroc Electronic Trading Rules gebruiken?

Zoveel als je wilt. Je kunt Canada Iiroc Electronic Trading Rules gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Canada Iiroc Electronic Trading Rules gratis?

Ja. Deze skill is door HimanshuJ16 op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇