quant-primitives 0.7.0

Pure trading primitives — candles, intervals, symbols, currencies, asset taxonomy
Documentation
# quant-primitives

Pure trading primitives — candles, intervals, symbols, currencies, asset taxonomy.

Zero I/O, zero async, WASM-compatible. Decimal arithmetic via `rust_decimal` (no float lies).

## Install

```toml
[dependencies]
quant-primitives = "0.4"
```

## Types

| Type | Purpose |
|------|---------|
| `Candle` | OHLC + volume + timestamp, decimal-backed |
| `Interval` | Timeframe enum (Minute / Hour / Day / Week with multipliers); `periods_per_year`, hierarchy queries |
| `Symbol` | Trading symbol with base/quote split |
| `Currency` | ISO + crypto, with `is_crypto_base()` taxonomy |
| `Ticker` | Symbol + venue identifier |
| `PositionConfig` | Validated position sizing config (percentage bounds [0,1]) |

## Example

```rust
use quant_primitives::{Candle, Interval};
use rust_decimal_macros::dec;
use chrono::Utc;

let c = Candle::new(
    Utc::now(),
    dec!(100), dec!(105), dec!(99), dec!(103),
    dec!(1000),
);
assert_eq!(Interval::Hour.periods_per_year(), 8760);
```

## License

MIT — see [LICENSE-MIT](../../LICENSE-MIT).