Appearance
Market Thrust
Family: Flow surveillance
What it computes
Emits MarketThrustTick ticks carrying advances, declines, advance_ratio, thrust, prev_thrust, thrust_signal off subscribed-universe option trades.
Available on the live, historical, and replay drives.
Methodology
Zweig (1986) streaming EMA over the universe advance ratio at the 10-period anchor; (0.40 → 0.615) threshold-cross thrust signal.
See the methodology overview for the citation index.
Inputs
Subscribed-universe option trades.
Key outputs
Advances, declines, advance_ratio, thrust, prev_thrust, thrust_signal. The full field set is in the tick table below.
Output schema (MarketThrustTick)
The field / type / description table below is regenerated from the MarketThrustTick 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. |
advance_ratio | f64 | Raw advance ratio advances / (advances + declines). NAN when advances + declines == 0. |
thrust | f64 | EMA-smoothed thrust reading (Zweig 10-period anchor). |
prev_thrust | f64 | Prior-emission thrust reading (paired with thrust to drive the Zweig threshold-cross detector). |
thrust_signal | bool | Zweig (1986) thrust signal: prior thrust ≤ 0.40 AND current thrust ≥ 0.615. |
Configuration (MarketThrustParams)
Regenerated from the MarketThrustParams 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 thrust 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().market_thrust([]).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()
.marketThrust([])
.forIndex("SPX")
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, MarketThrustRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.market_thrust(["SPX"])
.on_event(|row: &MarketThrustRow| println!("advance_ratio={} thrust={}", row.advance_ratio, row.thrust))?;
// ... later, to stop delivery ...
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.