tucano-markets

Crates.iotucano-markets
lib.rstucano-markets
version0.1.0
created_at2025-08-14 01:57:38.647985+00
updated_at2025-08-18 02:46:21.538188+00
descriptionExchange, Instrument, Asset models and market utilities
homepage
repositoryhttps://github.com/brbtavares/tucano
max_upload_size
id1794324
size30,944
Bruno Tavares (brbtavares)

documentation

https://docs.rs/tucano-markets

README

Tucano Markets

Abstractions for market entities (Exchange, Asset, Instrument, Side, OrderType). This crate now contains only traits, enums, and types; all concrete exchange/broker integrations are implemented in data or integration.

๐ŸŽฏ Role

The markets crate provides the taxonomy and semantic types that support execution, data, and risk. It ensures that instruments and assets are consistently identified throughout the platform.

Responsibility Description
Exchange Model exchange.rs defines the ExchangeId enum and characteristics (abstractions only)
Asset Model asset.rs, asset_simplified.rs and specializations (Stocks, ETFs, REITs, Futures) (abstractions only)
Instrument Standardized construction (name, market, derived symbol)
Index index/ for efficient keyed collections

๐Ÿ”‘ Main Types

-- ExchangeId โ€“ Canonical identifier. -- Asset โ€“ Implementations by category (stock, ETF, REIT, future).

  • Instrument โ€“ Combination of asset + market + semantics (e.g., mini-index).
  • Side, OrderType โ€“ Order direction and modality.

๐Ÿ”— Interdependencies

Depends on Reason
rust_decimal, chrono Monetary precision / timestamps
Consumed by Usage
execution Order identification / routing
data Market event normalization
risk Limit calculations per asset/instrument
core Global instrument state
analytics Aggregation keys by instrument

โœ… Completed

-- Enum of exchanges and basic types.

  • Basic instruments listed as examples (stocks, some administrative futures).

๐Ÿงช Parcial

  • Multi-broker abstraction (initial structure; all concrete implementations now live in data or integration).

  • Futures: rollover and adjustment factor calculation not yet implemented.

๐Ÿšง Pending

  • Normalization of derivative symbols (WIN, IND, DOL, WDO) with robust parsing.

  • Configurable multipliers / tick size table.

  • Dynamic instrument catalog (loading via API/Master file).

  • Mapping of corporate actions (dividends / splits) for accurate backtesting.

Exemplo (conceitual)

use markets::exchange::ExchangeId;
// let venue = ExchangeId::SomeExchange;
Commit count: 0

cargo fmt