Appearance
Sector Rotation Strength
Family: Flow surveillance
What it computes
Emits SectorRotationStrengthTick ticks carrying n_universe_symbols, rotation_spread, legs[(rank, sector, mean_return, n_symbols)] off subscribed-universe stock trades + user sector mapping.
Available on the live, historical, and replay drives.
Methodology
Per-cadence per-sector mean-return ladder under the desk-supplied symbol → sector taxonomy mapping (Bloomberg MOST RV / Refinitiv Eikon sector heat map).
See the methodology overview for the citation index.
Inputs
Subscribed-universe stock trades + user sector mapping.
Key outputs
N_universe_symbols, rotation_spread, legs[(rank, sector, mean_return, n_symbols)]. The full field set is in the tick table below.
Output schema (SectorRotationStrengthTick)
The field / type / description table below is regenerated from the SectorRotationStrengthTick 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. |
n_universe_symbols | u32 | Total number of classified symbols contributing across all sectors. |
rotation_spread | f64 | Cross-sector mean-return spread: legs[0].mean_return − legs[last].mean_return. NAN when fewer than two sectors have contributing symbols. |
legs | Vec<SectorRotationLeg> | Per-sector ladder, ranked by descending mean return. |
Configuration (SectorRotationStrengthParams)
Regenerated from the SectorRotationStrengthParams 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 stock tape and the rotation strength aggregates per sector. |
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().sector_rotation_strength([]).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()
.sectorRotationStrength([])
.forIndex("SPX")
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, SectorRotationStrengthRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.sector_rotation_strength(["SPX"])
.on_event(|row: &SectorRotationStrengthRow| println!("rotation_spread={} n_universe_symbols={}", row.rotation_spread, row.n_universe_symbols))?;
// ... 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.