Appearance
Greek Flow
Family: Flow surveillance
What it computes
Emits GreekFlowTick ticks carrying delta_flow, gamma_flow, vega_flow, theta_flow, net_greek_flow, prints_in_window off option trade tape.
Available on the live, historical, and replay drives.
Methodology
Per-symbol multi-Greek trade-flow aggregator: Sum_trades (greek · signed_qty) across (delta, gamma, vega, theta) over rolling window.
See the methodology overview for the citation index.
Inputs
Option trade tape.
Key outputs
Delta_flow, gamma_flow, vega_flow, theta_flow, net_greek_flow, prints_in_window. The full field set is in the tick table below.
Output schema (GreekFlowTick)
The field / type / description table below is regenerated from the GreekFlowTick 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 |
|---|---|---|
symbol | Arc<str> | Underlying symbol (interned). |
date | i32 | Trading-session date (YYYYMMDD). |
ms_of_day | i32 | Milliseconds since midnight at emission time. |
delta_flow | f64 | Rolling-window sum of delta_proxy · signed_qty across admitted prints. |
gamma_flow | f64 | Rolling-window sum of gamma_proxy · signed_qty. |
vega_flow | f64 | Rolling-window sum of vega_proxy · signed_qty. |
theta_flow | f64 | Rolling-window sum of theta_proxy · signed_qty. |
net_greek_flow | f64 | Composite reading delta_flow + gamma_flow + vega_flow + theta_flow — the headline multi-Greek flow scalar. |
prints_in_window | i32 | Count of admitted prints contributing to the rolling window. |
Configuration (GreekFlowParams)
Regenerated from the GreekFlowParams Rust source — see the note above.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Contracts the subscription tracks. Option-only. |
conditions | ConditionPolicy | Trade-condition admission policy. |
venues | ExchangeFilter | Exchange / venue admission policy. |
window_ms | i32 | Rolling-window length in milliseconds — the trailing horizon the accumulator averages over. Defaults to [DEFAULT_WINDOW_MS] (60_000 ms). |
min_emit_interval_ms | i32 | Minimum interval between consecutive emissions per symbol, in milliseconds. Defaults to [DEFAULT_MIN_EMIT_INTERVAL_MS] (1_000 ms). |
Example
Python
python
import kairos_thetadata as kt
client = kt.Client.connect(kt.Credentials.from_env())
def on_event(row):
print(row)
sub = client.live().greek_flow(["SPX"]).on_event(on_event)
sub.wait(timeout_seconds=60.0)TypeScript
typescript
import { Client, Credentials } from "kairos-thetadata";
const client = await Client.connect(Credentials.fromEnv());
await client
.live()
.greekFlow(["SPX"])
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, GreekFlowRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.greek_flow(["SPX"])
.on_event(|row: &GreekFlowRow| println!("net_greek_flow={} delta_flow={}", row.net_greek_flow, row.delta_flow))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }