Skip to content
TotalFinance

Exposure & flow · @insiderfinance/totalfinance

@insiderfinance/totalfinance/structure

import { … } from '@insiderfinance/totalfinance/structure'
stable-by-law (pre-1.0; not a 1.0 stability guarantee)type 32iface 43class 2fn 15JSON ↗

Functions · 15

Classes · 2

Interfaces · 43

Types · 32

type

AggressorSide

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import type { AggressorSide } from '@insiderfinance/totalfinance/structure';

export type AggressorSide = 'buy' | 'sell' | 'unknown';

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

type

AtSpotExposure

#

What atSpot re-evaluates for a profile: its selected gex and/or dex.

Signature
import type { AtSpotExposure } from '@insiderfinance/totalfinance/structure';

/** What `atSpot` re-evaluates for a profile: its selected `gex` and/or `dex`. */
export type AtSpotExposure<G extends ExposureMetric = ExposureMetric, P extends ExposureMetric = G> = Pick<{
    gex: number;
    dex: number;
}, Extract<G, 'gex' | 'dex'>> & Partial<Pick<{
    gex: number;
    dex: number;
}, Extract<Exclude<P, G>, 'gex' | 'dex'>>>;

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

iface

CallPutPremium

#

Call-vs-put premium/volume summary with put/call ratios (spec §11.6).

Signature
import type { CallPutPremium } from '@insiderfinance/totalfinance/structure';

/** Call-vs-put premium/volume summary with put/call ratios (spec §11.6). */
export interface CallPutPremium {
    callPremium: number;
    putPremium: number;
    callVolume: number;
    putVolume: number;
    /** Put ÷ call traded volume (contracts); `null` when there is no call volume. */
    putCallVolumeRatio: number | null;
    /** Put ÷ call premium ($); `null` when there is no call premium. */
    putCallPremiumRatio: number | null;
    /** Net directional premium across all trades (buy − sell). */
    netPremium: number;
}
Fields, parameters and returned members (7)
Name · typeMeaning · unitRequired · default
callPremiumnumber—currency amount (the field or record currency)RequiredNo @default declared
callVolumenumber—unitless by nameRequiredNo @default declared
netPremiumnumber

Net directional premium across all trades (buy − sell).

currency amount (the field or record currency)
RequiredNo @default declared
putCallPremiumRationumber | null

Put ÷ call premium ($); null when there is no call premium.

decimal fraction / multiple
RequiredNo @default declared
putCallVolumeRationumber | null

Put ÷ call traded volume (contracts); null when there is no call volume.

decimal fraction / multiple
RequiredNo @default declared
putPremiumnumber—currency amount (the field or record currency)RequiredNo @default declared
putVolumenumber—unitless by nameRequiredNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

iface

ClassifiedTrade

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import type { ClassifiedTrade } from '@insiderfinance/totalfinance/structure';

export interface ClassifiedTrade {
    trade: OptionTrade;
    underlying: string;
    type: OptionType;
    strike: number;
    expiry: string;
    /** Supplied or quote-estimated aggressor side, according to classificationProvenance. */
    side: AggressorSide;
    classificationProvenance: FlowClassificationProvenance;
    premium: number;
    size: number;
    isBlock: boolean;
    /** True when the trade prints on its own expiration day (0DTE). */
    isZeroDaysToExpiry: boolean;
    /** Opening estimate: `open` when size exceeds prior open interest (definitely new contracts). */
    openClose: OpenCloseEstimate;
    /** Sweep cluster id (undefined when not part of a sweep). */
    sweepId?: number;
    /** Spread group id (undefined when not part of a detected multi-leg spread). */
    spreadId?: number;
}
Fields, parameters and returned members (68)

Loading 68 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

iface

ContractExposure

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import type { ContractExposure } from '@insiderfinance/totalfinance/structure';

export interface ContractExposure {
    expiry: string;
    strike: number;
    type: OptionType;
    timeToExpiryYears: number;
    impliedVolatility: number;
    openInterest: number;
    multiplier: number;
    /** Applied position sign (+1/−1) from the convention. */
    sign: number;
    gamma: number;
    delta: number;
    gex: number;
    dex: number;
    vega: number;
    vanna: number;
    charm: number;
    theta: number;
    vomma: number;
    speed: number;
    color: number;
}
Fields, parameters and returned members (19)

Loading 19 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

type

ContractExposureRow

#

A per-contract row of a profile (see ExposureAggregate): the contract's identity and inputs, its computed metrics, the raw gamma only when gex was computed and the raw delta only when dex was. With the defaults this is ContractExposure.

Signature
import type { ContractExposureRow } from '@insiderfinance/totalfinance/structure';

/**
 * A per-contract row of a profile (see {@link ExposureAggregate}): the contract's identity and inputs,
 * its computed metrics, the raw `gamma` only when `gex` was computed and the raw `delta` only when
 * `dex` was. With the defaults this is {@link ContractExposure}.
 */
export type ContractExposureRow<G extends ExposureMetric = ExposureMetric, P extends ExposureMetric = G> = Omit<ContractExposure, ExposureMetric | 'gamma' | 'delta'> & ExposureAggregate<G, P> & ('gex' extends G ? {
    gamma: number;
} : 'gex' extends P ? {
    gamma?: number;
} : unknown) & ('dex' extends G ? {
    delta: number;
} : 'dex' extends P ? {
    delta?: number;
} : unknown);
Fields, parameters and returned members (8)
Name · typeMeaning · unitRequired · default
expirystring—unitless by nameRequiredNo @default declared
impliedVolatilitynumber—unitless by nameRequiredNo @default declared
multipliernumber—unitless by nameRequiredNo @default declared
openInterestnumber—unitless by nameRequiredNo @default declared
signnumber

Applied position sign (+1/−1) from the convention.

unitless by name
RequiredNo @default declared
strikenumber—unitless by nameRequiredNo @default declared
timeToExpiryYearsnumber—years (decimal)RequiredNo @default declared
typeOptionType—unitless by nameRequiredNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

type

DefaultScenarioMetric

#

The metrics a scenarioMap computes when none are requested.

Signature
import type { DefaultScenarioMetric } from '@insiderfinance/totalfinance/structure';

/** The metrics a `scenarioMap` computes when none are requested. */
export type DefaultScenarioMetric = 'gex' | 'dex' | 'vanna' | 'charm';

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

iface

DeltaAdjustedPremium

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import type { DeltaAdjustedPremium } from '@insiderfinance/totalfinance/structure';

export interface DeltaAdjustedPremium {
    /** Σ |delta|·premium over prints whose directional lean is bullish (bought calls / sold puts). */
    bullishPremium: number;
    /** Σ |delta|·premium over bearish prints (bought puts / sold calls). */
    bearishPremium: number;
    /** `bullishPremium − bearishPremium` — net directional delta-adjusted premium (> 0 = net bullish). */
    netDirectional: number;
    /** Σ |delta|·premium regardless of direction — the total delta-weighted premium. */
    totalDeltaAdjusted: number;
}
Fields, parameters and returned members (4)
Name · typeMeaning · unitRequired · default
bearishPremiumnumber

Σ |delta|·premium over bearish prints (bought puts / sold calls).

currency amount (the field or record currency)
RequiredNo @default declared
bullishPremiumnumber

Σ |delta|·premium over prints whose directional lean is bullish (bought calls / sold puts).

currency amount (the field or record currency)
RequiredNo @default declared
netDirectionalnumber

bullishPremium − bearishPremium — net directional delta-adjusted premium (> 0 = net bullish).

unitless by name
RequiredNo @default declared
totalDeltaAdjustednumber

Σ |delta|·premium regardless of direction — the total delta-weighted premium.

unitless by name
RequiredNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

iface

DirectionalFlowTrade

#

One directional flow print. delta is the option's signed delta at the print — caller-supplied from their own greeks (this package never fabricates greeks), keeping the compute pure.

Signature
import type { DirectionalFlowTrade } from '@insiderfinance/totalfinance/structure';

// ───────────────────────── directional flow intelligence (spec §11.6) ─────────────────────────
/**
 * One directional flow print. `delta` is the option's signed delta at the print — caller-supplied
 * from their own greeks (this package never fabricates greeks), keeping the compute pure.
 */
export interface DirectionalFlowTrade {
    type: OptionType;
    /** Estimated aggressor side (e.g. from {@link FlowAnalysis}). */
    side: 'buy' | 'sell';
    /** Trade premium in dollars (`price · size · multiplier`). */
    premium: number;
    /** Signed option delta at the print (calls > 0, puts < 0). */
    delta: number;
}
Fields, parameters and returned members (4)
Name · typeMeaning · unitRequired · default
deltanumber

Signed option delta at the print (calls > 0, puts < 0).

unitless by name
RequiredNo @default declared
premiumnumber

Trade premium in dollars (price · size · multiplier).

unitless by name
RequiredNo @default declared
side'buy' | 'sell'

Estimated aggressor side (e.g. from FlowAnalysis).

unitless by name
RequiredNo @default declared
typeOptionType—unitless by nameRequiredNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

type

ExpiryRow

#

A by-expiry row narrowed to the requested metrics (see StrikeRow).

Signature
import type { ExpiryRow } from '@insiderfinance/totalfinance/structure';

/** A by-expiry row narrowed to the requested metrics (see {@link StrikeRow}). */
export type ExpiryRow<M extends ExposureMetric = ExposureMetric> = {
    expiry: string;
} & Pick<ExposureTotals, M>;
Fields, parameters and returned members (1)
Name · typeMeaning · unitRequired · default
expirystring—unitless by nameRequiredNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

type

ExposureAggregate

#

The totals of a profile that computed the guaranteed metrics G and possibly P: guaranteed metrics are required, possible ones optional, everything else absent. With the defaults this is ExposureTotals.

Signature
import type { ExposureAggregate } from '@insiderfinance/totalfinance/structure';

/**
 * The totals of a profile that computed the guaranteed metrics `G` and possibly `P`: guaranteed
 * metrics are required, possible ones optional, everything else absent. With the defaults this is
 * {@link ExposureTotals}.
 */
export type ExposureAggregate<G extends ExposureMetric = ExposureMetric, P extends ExposureMetric = G> = Pick<ExposureTotals, G> & Partial<Pick<ExposureTotals, Exclude<P, G>>>;

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

iface

ExposureConfig

#

Non-market exposure configuration: the sign convention and computation knobs (WS3.2).

Signature
import type { ExposureConfig } from '@insiderfinance/totalfinance/structure';

/** Non-market exposure configuration: the sign convention and computation knobs (WS3.2). */
export interface ExposureConfig {
    /** REQUIRED sign convention; echoed in `assumptions.convention` with its caveat in diagnostics. */
    convention: ExposureConvention;
    priceSource?: PriceSource;
    /** `per1PercentMove` (default, the spec GEX formula) or `perPoint`. */
    gammaUnit?: GammaUnit;
    /** Skip contracts with time-to-expiry below this many years (default 0). */
    minTimeToExpiry?: number;
    /** Contract multiplier when a quote omits one (default 100). */
    defaultMultiplier?: number;
}
Fields, parameters and returned members (7)
Name · typeMeaning · unitRequired · default
conventionExposureConvention

REQUIRED sign convention; echoed in assumptions.convention with its caveat in diagnostics.

unitless by name
RequiredNo @default declared
convention.calls1 | -1—unitless by nameRequiredNo @default declared
convention.puts1 | -1—unitless by nameRequiredNo @default declared
defaultMultipliernumber

Contract multiplier when a quote omits one (default 100).

decimal fraction / multiple
OptionalNo @default declared
gammaUnitGammaUnit

per1PercentMove (default, the spec GEX formula) or perPoint.

unitless by name
OptionalNo @default declared
minTimeToExpirynumber

Skip contracts with time-to-expiry below this many years (default 0).

unitless by name
OptionalNo @default declared
priceSourcePriceSource—unitless by nameOptionalNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

type

ExposureConvention

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import type { ExposureConvention } from '@insiderfinance/totalfinance/structure';

export type ExposureConvention = 'callsPositivePutsNegative' | 'dealerShortGamma' | 'tradeSignedAggressor' | {
    calls: 1 | -1;
    puts: 1 | -1;
};
Fields, parameters and returned members (2)
Name · typeMeaning · unitRequired · default
calls1 | -1—unitless by nameRequiredNo @default declared
puts1 | -1—unitless by nameRequiredNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

iface

ExposureInput

#

Input for exposure: the chain, market and convention, plus an optional metric selection.

Signature
import type { ExposureInput } from '@insiderfinance/totalfinance/structure';

/** Input for {@link exposure}: the chain, market and convention, plus an optional metric selection. */
export interface ExposureInput<S extends readonly ExposureMetric[] | undefined = undefined> extends ExposureShortcutInput {
    /**
     * The exposures to compute, e.g. `['gex']` or `['gex', 'dex', 'vanna']`. Omit it for the full
     * profile (every metric, exactly as before). A selection — explicit, nonempty, each name once —
     * computes only those metrics and the Black–Scholes outputs they need, and is echoed in
     * `assumptions.metrics`; uncomputed metrics are absent from the result, never zero.
     */
    metrics?: S;
}
Fields, parameters and returned members (15)

Loading 15 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

type

ExposureMarket

#

Market snapshot for exposure() — the workspace-canonical MarketInputs, except spot is optional here because it falls back to each quote's underlyingPrice when omitted (WS3.2), and asOf also accepts the ONE canonical "when" grammar (core resolveAsOf): epoch ms, YYYY-MM-DD (UTC midnight), or a ZONED ISO datetime — a bare zone-less datetime throws the teaching error.

Signature
import type { ExposureMarket } from '@insiderfinance/totalfinance/structure';

/**
 * Market snapshot for `exposure()` — the workspace-canonical {@link MarketInputs}, except `spot` is
 * optional here because it falls back to each quote's `underlyingPrice` when omitted (WS3.2), and
 * `asOf` also accepts the ONE canonical "when" grammar (core `resolveAsOf`): epoch ms, `YYYY-MM-DD`
 * (UTC midnight), or a ZONED ISO datetime — a bare zone-less datetime throws the teaching error.
 */
export type ExposureMarket = Omit<MarketInputs, 'spot' | 'asOf'> & {
    /** Spot price. Falls back to each quote's `underlyingPrice` when omitted. */
    spot?: number;
    /** Snapshot time: epoch ms, `'YYYY-MM-DD'`, or a zoned ISO datetime (core `resolveAsOf` grammar). */
    asOf: EpochMs | string;
};
Fields, parameters and returned members (4)
Name · typeMeaning · unitRequired · default
asOfstring | number

Snapshot time: epoch ms, 'YYYY-MM-DD', or a zoned ISO datetime (core resolveAsOf grammar).

an instant: epoch milliseconds or a YYYY-MM-DD / zoned ISO string (the resolveAsOf convention)
RequiredNo @default declared
dividendYieldnumber

Continuous dividend yield; defaults to 0 when omitted.

decimal rate (0.05 = 5%)
OptionalNo @default declared
riskFreeRatenumber—decimal rate (0.05 = 5%)RequiredNo @default declared
spotnumber

Spot price. Falls back to each quote's underlyingPrice when omitted.

unitless by name
OptionalNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

type

ExposureMetric

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import type { ExposureMetric } from '@insiderfinance/totalfinance/structure';

export type ExposureMetric = 'gex' | 'dex' | 'vega' | 'vanna' | 'charm' | 'theta' | 'vomma' | 'speed' | 'color';

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

class

ExposureProfile

#

A computed exposure profile with levels, by-strike/by-expiry views, and scenario maps. R2 envelope: the sign convention and every resolved knob live in assumptions; model limitations ride diagnostics.warnings as model.limitation entries — nothing is hoisted top-level.

SELECTIVE (selective Greeks and exposure spec, decision 11). A profile built with exposure({ …, metrics }) — or a shortcut such as gammaExposure — computed ONLY the selected metrics and the Black–Scholes outputs they need. Its rows and aggregate carry exactly those metrics; an uncomputed metric is ABSENT, never zero. G is the set the type guarantees (a literal selection) and P the set that may be present (a dynamic selection); both default to every metric — the full profile exposure() has always returned.

Signature
import { ExposureProfile } from '@insiderfinance/totalfinance/structure';

export declare class ExposureProfile<G extends ExposureMetric = ExposureMetric, P extends ExposureMetric = G> {
  constructor(request: ExposureInput<undefined>);
  readonly aggregate: ExposureAggregate<G, P>;
  readonly assumptions: Assumptions<{ timeDecayDirection: 'perCalendarDayElapsed'; scanVolatilityPolicy: 'stickyStrike'; convention: { name: string; calls: number; puts: number; }; gammaUnit: GammaUnit; priceSource: PriceSource; minTimeToExpiry: number; defaultMultiplier: number; metrics?: readonly ExposureMetric[]; }>;
  atSpot(spot: number): AtSpotExposure<G, P>;
  byExpiry<M extends ExposureMetric = G>(metrics?: readonly M[]): ExpiryRow<M>[];
  byStrike<M extends ExposureMetric = G>(metrics?: readonly M[]): StrikeRow<M>[];
  readonly contracts: readonly Readonly<ContractExposureRow<G, P>>[];
  readonly diagnostics: Diagnostics;
  levels(options?: { pinRiskBand?: number; }): Levels;
  netDrift(): NetDrift;
  scenarioMap<M extends ExposureMetric = DefaultScenarioMetric>(options?: ScenarioMapOptions<M>): ScenarioMap<M>;
  readonly spot: number;
}
Fields, parameters and returned members (114)

Loading 114 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

iface

ExposureShortcutInput

#

The chain, market and sign convention every exposure takes — the input of the single-metric shortcuts.

Signature
import type { ExposureShortcutInput } from '@insiderfinance/totalfinance/structure';

/** The chain, market and sign convention every exposure takes — the input of the single-metric shortcuts. */
export interface ExposureShortcutInput {
    quotes: OptionQuote[];
    market: ExposureMarket;
    config: ExposureConfig;
}
Fields, parameters and returned members (14)

Loading 14 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

iface

ExposureTotals

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import type { ExposureTotals } from '@insiderfinance/totalfinance/structure';

export interface ExposureTotals {
    /** Dollar gamma exposure (`Γ·OI·mult·spot²·0.01` per-1%-move, signed by convention). */
    gex: number;
    /** Dollar delta exposure (`Δ·OI·mult·spot`). */
    dex: number;
    /** Vega exposure (`vega/1%·OI·mult`). */
    vega: number;
    /** Vanna exposure: dollar-delta change per +1% vol. */
    vanna: number;
    /**
     * Charm exposure: signed dollar-delta change as ONE calendar day ELAPSES (positive ⇒ dealer delta
     * increases day-over-day). Reported as `−∂DEX/∂T` per day, so its sign matches the passage of time.
     */
    charm: number;
    /** Theta exposure: dollar option-price decay per calendar day. */
    theta: number;
    /** Vomma (volga) exposure: change in vega exposure per +1% vol. */
    vomma: number;
    /**
     * Speed exposure: the CHANGE IN `gex` for a **+1% spot move**, in the same unit as `gex`
     * (`gammaUnit`). It is the full derivative of the GEX definition, not the bare third-order greek:
     * per-1%-move, `Δgex = (speed·S + 2·Γ)·OI·mult·sign·S²·1e-4`; per-point, `(speed·S + Γ)·OI·mult·sign·S·0.01`.
     * So `aggregate.speed ≈ atSpot(spot·1.01).gex − atSpot(spot).gex` (a first-order estimate of it).
     */
    speed: number;
    /**
     * Color exposure: signed change in GEX as ONE calendar day ELAPSES (`−∂GEX/∂T` per day), in the
     * same unit as `gex` (`gammaUnit`), so a positive value means dealer gamma exposure grows as time
     * passes. Per 1% move it is `−color·OI·mult·sign·S²·0.01/365`; per point, `−color·OI·mult·sign·S/365`.
     */
    color: number;
}
Fields, parameters and returned members (9)
Name · typeMeaning · unitRequired · default
charmnumber

Charm exposure: signed dollar-delta change as ONE calendar day ELAPSES (positive ⇒ dealer delta increases day-over-day). Reported as −∂DEX/∂T per day, so its sign matches the passage of time.

unitless by name
RequiredNo @default declared
colornumber

Color exposure: signed change in GEX as ONE calendar day ELAPSES (−∂GEX/∂T per day), in the same unit as gex (gammaUnit), so a positive value means dealer gamma exposure grows as time passes. Per 1% move it is −color·OI·mult·sign·S²·0.01/365; per point, −color·OI·mult·sign·S/365.

unitless by name
RequiredNo @default declared
dexnumber

Dollar delta exposure (Δ·OI·mult·spot).

unitless by name
RequiredNo @default declared
gexnumber

Dollar gamma exposure (Γ·OI·mult·spot²·0.01 per-1%-move, signed by convention).

unitless by name
RequiredNo @default declared
speednumber

Speed exposure: the CHANGE IN gex for a **+1% spot move**, in the same unit as gex (gammaUnit). It is the full derivative of the GEX definition, not the bare third-order greek: per-1%-move, Δgex = (speed·S + 2·Γ)·OI·mult·sign·S²·1e-4; per-point, (speed·S + Γ)·OI·mult·sign·S·0.01. So aggregate.speed ≈ atSpot(spot·1.01).gex − atSpot(spot).gex (a first-order estimate of it).

unitless by name
RequiredNo @default declared
thetanumber

Theta exposure: dollar option-price decay per calendar day.

unitless by name
RequiredNo @default declared
vannanumber

Vanna exposure: dollar-delta change per +1% vol.

unitless by name
RequiredNo @default declared
veganumber

Vega exposure (vega/1%·OI·mult).

unitless by name
RequiredNo @default declared
vommanumber

Vomma (volga) exposure: change in vega exposure per +1% vol.

unitless by name
RequiredNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

class

FlowAnalysis

#

Result of analyzing a stream of option trades. R2 envelope: the rules/windows ride assumptions and the heuristic caveats ride diagnostics.warnings as model.limitation entries — nothing is hoisted top-level.

Signature
import { FlowAnalysis } from '@insiderfinance/totalfinance/structure';

export declare class FlowAnalysis {
  constructor(rawTrades: OptionTrade[], options?: FlowOptions);
  readonly assumptions: Assumptions<{ nbboRule: 'quote-rule-midpoint-unknown'; classificationSource: FlowClassificationSource; sweepWindowMs: number; spreadWindowMs: number; sweepMinPrints: number; blockMinSize: number; blockMinPremium: number; multiplier: number; venueVerifiedSweeps: boolean; }>;
  blocks: ClassifiedTrade[];
  callPutPremium(): CallPutPremium;
  readonly diagnostics: Diagnostics;
  groupBy(keys: Array<keyof FlowGroupKey>): FlowGroup[];
  rank(groups: FlowGroup[], options?: RankOptions): FlowGroup[];
  readonly spreads: readonly Readonly<Spread>[];
  readonly sweeps: readonly Readonly<Sweep>[];
  readonly trades: readonly Readonly<ClassifiedTrade>[];
  zeroDaysToExpiry: ClassifiedTrade[];
}
Fields, parameters and returned members (88)

Loading 88 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.