Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Avhz RustQuant ISO 10383

From Leeroopedia


Knowledge Sources
Domains Financial_Standards, Quantitative_Finance
Last Updated 2026-02-07 19:00 GMT

Overview

Concrete tool for identifying securities trading exchanges and regulated markets via ISO 10383 Market Identifier Codes (MICs) provided by the RustQuant library.

Description

The ISO_10383 struct represents a Market Identifier Code as defined by the ISO 10383 standard. Each MIC entry contains the operating MIC, ISO 3166-1 alpha-2 country code, an operating/segment flag (OperatingOrSegment enum), a status flag (MICStatus enum indicating Active, Updated, or Expired), the city of the exchange, and a human-readable description. The module uses a declarative macro (iso_10383!) to generate all MIC constants from a structured list of exchange data, producing thousands of compile-time constants for exchanges worldwide (e.g., XCNQ for the Canadian Securities Exchange, OTCM for OTC Markets). Two supporting enums are provided: OperatingOrSegment distinguishes between operating MICs and segment MICs, while MICStatus tracks whether a code is active, updated, or expired.

Usage

Use this module when you need to reference a specific securities exchange or regulated market by its standardized MIC code, for example when associating trading calendars with exchanges, routing orders to specific venues, or validating exchange identifiers in financial data feeds.

Code Reference

Source Location

Signature

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ISO_10383 {
    pub operating_mic: &'static str,
    pub country_code: &'static str,
    pub oprt_sgmt: OperatingOrSegment,
    pub status: MICStatus,
    pub city: &'static str,
    pub description: &'static str,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum OperatingOrSegment {
    Operating,
    Segment,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MICStatus {
    Active,
    Updated,
    Expired,
}

Import

use RustQuant::iso::ISO_10383;
use RustQuant::iso::{OperatingOrSegment, MICStatus};

I/O Contract

Inputs

Name Type Required Description
operating_mic &'static str Yes The ISO 10383 operating MIC code (e.g., "XCNQ")
country_code &'static str Yes ISO 3166-1 alpha-2 country code (e.g., "CA")
oprt_sgmt OperatingOrSegment Yes Whether this is an operating or segment MIC
status MICStatus Yes Current status: Active, Updated, or Expired
city &'static str Yes City where the exchange is located
description &'static str Yes Human-readable name/description of the exchange

Outputs

Name Type Description
ISO_10383 struct A compile-time constant representing a specific exchange MIC

Usage Examples

use RustQuant::iso::{ISO_10383, OperatingOrSegment, MICStatus, XCNQ, OTCM};

// Access the Canadian Securities Exchange MIC constant
let cse = XCNQ;
assert_eq!(cse.operating_mic, "XCNQ");
assert_eq!(cse.country_code, "CA");
assert_eq!(cse.city, "Toronto");
assert_eq!(cse.oprt_sgmt, OperatingOrSegment::Operating);
assert_eq!(cse.status, MICStatus::Active);

// Access OTC Markets
let otc = OTCM;
assert_eq!(otc.country_code, "US");
assert_eq!(otc.city, "New York");

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment