Appearance
Arms Index TRIN
Family: Flow surveillance
What it computes
Emits ArmsIndexTrinTick ticks carrying advances, declines, up_volume, down_volume, trin off subscribed-universe option trades.
Available on the live, historical, and replay drives.
Methodology
Arms (1967) Trading Index (advances / declines) / (up_volume / down_volume) across the matched-cohort universe.
See the methodology overview for the citation index.
Inputs
Subscribed-universe option trades.
Key outputs
Advances, declines, up_volume, down_volume, trin. The full field set is in the tick table below.
Output schema (ArmsIndexTrinTick)
The field / type / description table below is regenerated from the ArmsIndexTrinTick Rust source by docs-site/scripts/inject-doc-tables.ts on every npm run docs:build. Do not hand-edit between the sentinels.
| Field | Type | Description |
|---|---|---|
date | i32 | Trading-session date (YYYYMMDD). |
ts_ms | i32 | Milliseconds since midnight at emission time. |
advances | u32 | Symbols whose session balance is currently > 0. |
declines | u32 | Symbols whose session balance is currently < 0. |
up_volume | f64 | Cumulative call premium across the advancing cohort (USD). |
down_volume | f64 | Cumulative put premium across the declining cohort (USD). |
trin | f64 | Arms TRIN: (advances / declines) / (up_volume / down_volume). NAN when either ratio is undefined; INFINITY when only the volume denominator collapses. |
Configuration (ArmsIndexTrinParams)
Regenerated from the ArmsIndexTrinParams Rust source — see the note above.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Contracts the subscription tracks. The institutional idiom is to subscribe by underlying symbol — the engine fans out across the chain and the TRIN aggregates by symbol. |
conditions | ConditionPolicy | Trade-condition admission policy. |
venues | ExchangeFilter | Exchange / venue admission policy. |
min_emit_interval_ms | i32 | Minimum interval between universe emissions (milliseconds). |
Example
Python
python
import kairos_thetadata as kt
client = kt.Client.connect(kt.Credentials.from_env())
def on_emission(tick):
print(tick)
sub = client.live().arms_index_trin([]).for_index("SPX").on_event(on_emission)
sub.wait(timeout_seconds=60.0)TypeScript
typescript
import { Client, Credentials } from "kairos-thetadata";
const client = await Client.connect(Credentials.fromEnv());
await client
.live()
.armsIndexTrin([])
.forIndex("SPX")
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, ArmsIndexTrinRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.arms_index_trin(["SPX"])
.on_event(|row: &ArmsIndexTrinRow| {
println!("trin={} advances={}", row.trin, row.advances)
})?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }for_index / for_sector are Python / TypeScript SDK conveniences. On the Rust thin client, pass the constituent universe to the analytic accessor (client.live().<analytic>([...])) — the engine drives the same per-symbol fan-out.