Skip to content
TotalFinance

Volatility · @insiderfinance/totalfinance

@insiderfinance/totalfinance/volatility/volatility-spot-beta

import { … } from '@insiderfinance/totalfinance/volatility/volatility-spot-beta'
stable-by-law (pre-1.0; not a 1.0 stability guarantee)iface 2fn 1JSON ↗
iface

VolatilitySpotBeta

#

The empirical vol–spot β and its regression diagnostics.

Signature
import type { VolatilitySpotBeta } from '@insiderfinance/totalfinance/volatility/volatility-spot-beta';

/** The empirical vol–spot β and its regression diagnostics. */
export interface VolatilitySpotBeta {
    /**
     * `β = ∂σ/∂S` in decimal vol **per $1 of spot** — feed straight to
     * `minimumVarianceDelta({ volatilitySpotBeta })`, which expects the same per-dollar units.
     *
     * Units matter here: `stickyRegime` reports `volatilitySpotBetaPerLogSpot` = `∂σ/∂lnS` (per 100%
     * spot move), which is `S ×` this number. On a `'log'` basis the conversion is done for you
     * (`slope / referenceSpot`); {@link slope} is the raw regression coefficient in its own basis.
     */
    volatilitySpotBeta: number;
    /** The regression slope: `∂σ/∂ln S` (`'log'`) or `∂σ/∂S` (`'level'`). */
    slope: number;
    /** Standard error of the slope. */
    slopeStandardError: number;
    /** t-statistic of the slope. */
    slopeTStatistic: number;
    /** Correlation of the IV change with the spot-change regressor (leverage ⇒ negative). */
    correlation: number;
    /** Coefficient of determination `R²`. */
    rSquared: number;
    /** Change observations used (after dropping bad pairs). */
    observationCount: number;
    /** Dropped (non-finite / non-positive) change observations. */
    dropped: number;
    /** Reference spot used for the `∂σ/∂S` conversion. */
    referenceSpot: number;
}
Fields, parameters and returned members (9)
Name · typeMeaning · unitRequired · default
correlationnumber

Correlation of the IV change with the spot-change regressor (leverage ⇒ negative).

unitless by name
RequiredNo @default declared
droppednumber

Dropped (non-finite / non-positive) change observations.

unitless by name
RequiredNo @default declared
observationCountnumber

Change observations used (after dropping bad pairs).

count (integer)
RequiredNo @default declared
rSquarednumber

Coefficient of determination R².

unitless by name
RequiredNo @default declared
referenceSpotnumber

Reference spot used for the ∂σ/∂S conversion.

unitless by name
RequiredNo @default declared
slopenumber

The regression slope: ∂σ/∂ln S ('log') or ∂σ/∂S ('level').

unitless by name
RequiredNo @default declared
slopeStandardErrornumber

Standard error of the slope.

unitless by name
RequiredNo @default declared
slopeTStatisticnumber

t-statistic of the slope.

unitless by name
RequiredNo @default declared
volatilitySpotBetanumber

β = ∂σ/∂S in decimal vol **per $1 of spot** — feed straight to minimumVarianceDelta({ volatilitySpotBeta }), which expects the same per-dollar units.

Units matter here: stickyRegime reports volatilitySpotBetaPerLogSpot = ∂σ/∂lnS (per 100% spot move), which is S × this number. On a 'log' basis the conversion is done for you (slope / referenceSpot); slope is the raw regression coefficient in its own basis.

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

VolatilitySpotBetaInput

#

Input for estimateVolatilitySpotBeta.

Signature
import type { VolatilitySpotBetaInput } from '@insiderfinance/totalfinance/volatility/volatility-spot-beta';

/** Input for {@link estimateVolatilitySpotBeta}. */
export interface VolatilitySpotBetaInput {
    /** Chronological spot prices. */
    spot: number[];
    /** The option's implied vol (decimal), aligned to `spot`. */
    impliedVolatility: number[];
    /** Regress IV changes on log-returns (`'log'`, default) or dollar spot changes (`'level'`). */
    basis?: 'log' | 'level';
    /** Reference spot to convert a log-basis slope to `∂σ/∂S` (default: the latest spot). */
    referenceSpot?: number;
    /** Newey–West HAC bandwidth for autocorrelation-robust errors. Default 0 uses classical standard errors (no HAC request). */
    hacLags?: number;
}
Fields, parameters and returned members (5)
Name · typeMeaning · unitRequired · default
basis'log' | 'level'

Regress IV changes on log-returns ('log', default) or dollar spot changes ('level').

unitless by name
OptionalNo @default declared
hacLagsnumber

Newey–West HAC bandwidth for autocorrelation-robust errors. Default 0 uses classical standard errors (no HAC request).

unitless by name
OptionalNo @default declared
impliedVolatilitynumber[]

The option's implied vol (decimal), aligned to spot.

unitless by name
RequiredNo @default declared
referenceSpotnumber

Reference spot to convert a log-basis slope to ∂σ/∂S (default: the latest spot).

unitless by name
OptionalNo @default declared
spotnumber[]

Chronological spot prices.

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.

fn

estimateVolatilitySpotBeta

#

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

Signature
import { estimateVolatilitySpotBeta } from '@insiderfinance/totalfinance/volatility/volatility-spot-beta';

export declare function estimateVolatilitySpotBeta(input: VolatilitySpotBetaInput): Computed<VolatilitySpotBeta, { measure: 'real-world-hedge'; basis: 'log' | 'level'; hacLags: number; }>;
Fields, parameters and returned members (10)
Name · typeMeaning · unitRequired · default
(input)VolatilitySpotBetaInput—unitless by nameRequiredNo @default declared
(input).basis'log' | 'level'

Regress IV changes on log-returns ('log', default) or dollar spot changes ('level').

unitless by name
OptionalNo @default declared
(input).hacLagsnumber

Newey–West HAC bandwidth for autocorrelation-robust errors. Default 0 uses classical standard errors (no HAC request).

unitless by name
OptionalNo @default declared
(input).impliedVolatilitynumber[]

The option's implied vol (decimal), aligned to spot.

unitless by name
RequiredNo @default declared
(input).referenceSpotnumber

Reference spot to convert a log-basis slope to ∂σ/∂S (default: the latest spot).

unitless by name
OptionalNo @default declared
(input).spotnumber[]

Chronological spot prices.

unitless by name
RequiredNo @default declared
return.assumptionsAssumptions<{ measure: 'real-world-hedge'; basis: 'log' | 'level'; hacLags: number; }>

Every applied convention, echoed back.

unitless by name
RequiredNo @default declared
return.diagnosticsimport('@insiderfinance/totalfinance/core').Diagnostics

How the value was computed, plus any warnings.

unitless by name
RequiredNo @default declared
return.provenanceimport('@insiderfinance/totalfinance/core').Provenance

Optional data lineage when the inputs came from a provider.

unitless by name
OptionalNo @default declared
return.valueVolatilitySpotBeta

The computed value. Never NaN or ±Infinity: a value the model cannot produce is null beside a diagnostic that says why (Law 7 — a warning never licenses a non-finite number).

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.