The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

Public API / @insiderfinance/totalfinance

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

import from '@insiderfinance/totalfinance/volatility/volatility-spot-beta'

Every public export in this entry point, including type-only declarations. Search by name or concept.

Jump to an export (3)

VolatilitySpotBeta · VolatilitySpotBetaInput · estimateVolatilitySpotBeta

interface

VolatilitySpotBeta

The empirical vol–spot β and its regression diagnostics.

/** 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 & returned members (9)
Name / typeMeaning & unitOptional / default
correlation
number
Correlation of the IV change with the spot-change regressor (leverage ⇒ negative).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
dropped
number
Dropped (non-finite / non-positive) change observations.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
observationCount
number
Change observations used (after dropping bad pairs).
count (integer)
Required / declared member
No @default declared; consult the signature and description.
rSquared
number
Coefficient of determination `R²`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
referenceSpot
number
Reference spot used for the `∂σ/∂S` conversion.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
slope
number
The regression slope: `∂σ/∂ln S` (`'log'`) or `∂σ/∂S` (`'level'`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
slopeStandardError
number
Standard error of the slope.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
slopeTStatistic
number
t-statistic of the slope.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
volatilitySpotBeta
number
`β = ∂σ/∂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.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

VolatilitySpotBetaInput

Input for {@link estimateVolatilitySpotBeta}.

/** 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 & returned members (5)
Name / typeMeaning & unitOptional / default
basis
'log' | 'level'
Regress IV changes on log-returns (`'log'`, default) or dollar spot changes (`'level'`).
unitless by name
Optional
No @default declared; consult the signature and description.
hacLags
number
Newey–West HAC bandwidth for autocorrelation-robust errors. Default 0 uses classical standard errors (no HAC request).
unitless by name
Optional
No @default declared; consult the signature and description.
impliedVolatility
number[]
The option's implied vol (decimal), aligned to `spot`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
referenceSpot
number
Reference spot to convert a log-basis slope to `∂σ/∂S` (default: the latest spot).
unitless by name
Optional
No @default declared; consult the signature and description.
spot
number[]
Chronological spot prices.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

function

estimateVolatilitySpotBeta

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export declare function estimateVolatilitySpotBeta(input: VolatilitySpotBetaInput): Computed<VolatilitySpotBeta, { measure: 'real-world-hedge'; basis: 'log' | 'level'; hacLags: number; }>;
Fields, parameters & returned members (10)
Name / typeMeaning & unitOptional / default
(input)
VolatilitySpotBetaInput

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).basis
'log' | 'level'
Regress IV changes on log-returns (`'log'`, default) or dollar spot changes (`'level'`).
unitless by name
Optional
No @default declared; consult the signature and description.
(input).hacLags
number
Newey–West HAC bandwidth for autocorrelation-robust errors. Default 0 uses classical standard errors (no HAC request).
unitless by name
Optional
No @default declared; consult the signature and description.
(input).impliedVolatility
number[]
The option's implied vol (decimal), aligned to `spot`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).referenceSpot
number
Reference spot to convert a log-basis slope to `∂σ/∂S` (default: the latest spot).
unitless by name
Optional
No @default declared; consult the signature and description.
(input).spot
number[]
Chronological spot prices.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions
Assumptions<{ measure: 'real-world-hedge'; basis: 'log' | 'level'; hacLags: number; }>
Every applied convention, echoed back.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.diagnostics
import('@insiderfinance/totalfinance/core').Diagnostics
How the value was computed, plus any warnings.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.provenance
import('@insiderfinance/totalfinance/core').Provenance
Optional data lineage when the inputs came from a provider.
unitless by name
Optional
No @default declared; consult the signature and description.
return.value
VolatilitySpotBeta
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
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.