The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

Public API / @insiderfinance/totalfinance

@insiderfinance/totalfinance/options/black-scholes

import from '@insiderfinance/totalfinance/options/black-scholes'

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

Jump to an export (16)

BlackScholesEvaluateFacade · BlackScholesEvaluateInput · BlackScholesEvaluation · BlackScholesImpliedVolatilityKernelInput · BlackScholesImpliedVolatilityOptions · BlackScholesImpliedVolatilityResult · BlackScholesKernelInput · BlackScholesOutput · BlackScholesOutputSelection · BlackScholesPriceBoundsInput · blackScholes · blackScholesExtendedGreeks · blackScholesGreeks · blackScholesImpliedVolatility · blackScholesPrice · blackScholesPriceBounds

interface

BlackScholesEvaluateFacade

`blackScholes.evaluate` — a selected calculation with its `.explain` companion. An empty selection is refused at run time (`input.out_of_range`).

/**
 * `blackScholes.evaluate` — a selected calculation with its `.explain` companion. An empty
 * selection is refused at run time (`input.out_of_range`).
 */
export interface BlackScholesEvaluateFacade {
    <const O extends BlackScholesOutputSelection>(input: BlackScholesEvaluateInput<O>): BlackScholesEvaluation<O>;
    explain<const O extends BlackScholesOutputSelection>(input: BlackScholesEvaluateInput<O>): Computed<BlackScholesEvaluation<O>>;
}
Fields, parameters & returned members (23)
Name / typeMeaning & unitOptional / default
(input)
BlackScholesEvaluateInput<O>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).dividendYield
number
Continuous dividend yield (decimal, default `0`).
decimal rate (0.05 = 5%)
Optional
No @default declared; consult the signature and description.
(input).outputs
O
The outputs to compute, e.g. `['price', 'delta', 'gamma']`. Only these appear in the result.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).riskFreeRate
number
Continuously-compounded risk-free rate (decimal, e.g. `0.045`).
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).spot
number
Spot price of the underlying.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).strike
number
Strike price.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).timeToExpiryYears
number
Time to expiry in years.
years (decimal)
Required / declared member
No @default declared; consult the signature and description.
(input).type
import('@insiderfinance/totalfinance/core').OptionType

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).volatility
number
Volatility (decimal, e.g. `0.22`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
explain
<const O extends BlackScholesOutputSelection>(input: BlackScholesEvaluateInput<O>) => Computed<BlackScholesEvaluation<O>>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
explain().return.assumptions
Assumptions<Record<never, never>>
Every applied convention, echoed back.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
explain().return.diagnostics
Diagnostics
How the value was computed, plus any warnings.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
explain().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.
explain().return.value
BlackScholesEvaluation<O>
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.
explain(input)
BlackScholesEvaluateInput<O>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
explain(input).dividendYield
number
Continuous dividend yield (decimal, default `0`).
decimal rate (0.05 = 5%)
Optional
No @default declared; consult the signature and description.
explain(input).outputs
O
The outputs to compute, e.g. `['price', 'delta', 'gamma']`. Only these appear in the result.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
explain(input).riskFreeRate
number
Continuously-compounded risk-free rate (decimal, e.g. `0.045`).
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
explain(input).spot
number
Spot price of the underlying.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
explain(input).strike
number
Strike price.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
explain(input).timeToExpiryYears
number
Time to expiry in years.
years (decimal)
Required / declared member
No @default declared; consult the signature and description.
explain(input).type
import('@insiderfinance/totalfinance/core').OptionType

unitless by name
Required / declared member
No @default declared; consult the signature and description.
explain(input).volatility
number
Volatility (decimal, e.g. `0.22`).
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

BlackScholesEvaluateInput

Input for {@link blackScholes}.evaluate: the typed Black–Scholes input plus the outputs to compute. `outputs` is required, nonempty, dense and duplicate-free.

/**
 * Input for {@link blackScholes}.evaluate: the typed Black–Scholes input plus the outputs to compute.
 * `outputs` is required, nonempty, dense and duplicate-free.
 */
export interface BlackScholesEvaluateInput<O extends BlackScholesOutputSelection = BlackScholesOutputSelection> extends BlackScholesTypedInput {
    /** The outputs to compute, e.g. `['price', 'delta', 'gamma']`. Only these appear in the result. */
    outputs: O;
}
Fields, parameters & returned members (8)
Name / typeMeaning & unitOptional / default
dividendYield
number
Continuous dividend yield (decimal, default `0`).
decimal rate (0.05 = 5%)
Optional
No @default declared; consult the signature and description.
outputs
O
The outputs to compute, e.g. `['price', 'delta', 'gamma']`. Only these appear in the result.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
riskFreeRate
number
Continuously-compounded risk-free rate (decimal, e.g. `0.045`).
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
spot
number
Spot price of the underlying.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
strike
number
Strike price.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
timeToExpiryYears
number
Time to expiry in years.
years (decimal)
Required / declared member
No @default declared; consult the signature and description.
type
import('@insiderfinance/totalfinance/core').OptionType

unitless by name
Required / declared member
No @default declared; consult the signature and description.
volatility
number
Volatility (decimal, e.g. `0.22`).
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.

type

BlackScholesEvaluation

The result of a selected evaluation. The outputs the selection is certain to contain are required numbers; any other output it might contain is optional ({@link GuaranteedSelection}). So a literal `['price', 'gamma']` gives exactly those two required, while a dynamic selection (`BlackScholesOutput[]`), a conditional (`c ? ['gamma'] : ['delta']`) or a union-valued element gives optional properties: the type never claims a value exists that was not requested.

/**
 * The result of a selected evaluation. The outputs the selection is certain to contain are required
 * numbers; any other output it might contain is optional ({@link GuaranteedSelection}). So a
 * literal `['price', 'gamma']` gives exactly those two required, while a dynamic selection
 * (`BlackScholesOutput[]`), a conditional (`c ? ['gamma'] : ['delta']`) or a union-valued element
 * gives optional properties: the type never claims a value exists that was not requested.
 */
export type BlackScholesEvaluation<O extends BlackScholesOutputSelection> = {
    [K in GuaranteedSelection<O>]: number;
} & {
    [K in Exclude<O[number], GuaranteedSelection<O>>]?: number;
};
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

BlackScholesImpliedVolatilityKernelInput

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

export interface BlackScholesImpliedVolatilityKernelInput extends BlackScholesPriceBoundsInput, BlackScholesImpliedVolatilityOptions {
    price: number;
}
Fields, parameters & returned members (9)
Name / typeMeaning & unitOptional / default
dividendYield
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
lowerVolatilityBound
number
Lower σ bracket (default `1e-7`).
unitless by name
Optional
No @default declared; consult the signature and description.
price
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
spot
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
strike
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
timeToExpiryYears
number

years (decimal)
Required / declared member
No @default declared; consult the signature and description.
type
OptionType

unitless by name
Required / declared member
No @default declared; consult the signature and description.
upperVolatilityBound
number
Upper σ bracket before expansion (default `5`).
unitless by name
Optional
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

BlackScholesImpliedVolatilityOptions

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

export interface BlackScholesImpliedVolatilityOptions {
    /** Lower σ bracket (default `1e-7`). */
    lowerVolatilityBound?: number;
    /** Upper σ bracket before expansion (default `5`). */
    upperVolatilityBound?: number;
}
Fields, parameters & returned members (2)
Name / typeMeaning & unitOptional / default
lowerVolatilityBound
number
Lower σ bracket (default `1e-7`).
unitless by name
Optional
No @default declared; consult the signature and description.
upperVolatilityBound
number
Upper σ bracket before expansion (default `5`).
unitless by name
Optional
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

BlackScholesImpliedVolatilityResult

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

export interface BlackScholesImpliedVolatilityResult {
    value: number;
    converged: boolean;
    iterations: number;
    error?: number;
    reason?: ImpliedVolatilityReason;
    /** Explanatory detail when a usable numeric pricing bracket cannot be established. */
    message?: string;
}
Fields, parameters & returned members (6)
Name / typeMeaning & unitOptional / default
converged
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
error
number

unitless by name
Optional
No @default declared; consult the signature and description.
iterations
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
message
string
Explanatory detail when a usable numeric pricing bracket cannot be established.
unitless by name
Optional
No @default declared; consult the signature and description.
reason
ImpliedVolatilityReason

unitless by name
Optional
No @default declared; consult the signature and description.
value
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.

interface

BlackScholesKernelInput

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

export interface BlackScholesKernelInput extends BlackScholesPriceBoundsInput {
    volatility: number;
}
Fields, parameters & returned members (7)
Name / typeMeaning & unitOptional / default
dividendYield
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
spot
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
strike
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
timeToExpiryYears
number

years (decimal)
Required / declared member
No @default declared; consult the signature and description.
type
OptionType

unitless by name
Required / declared member
No @default declared; consult the signature and description.
volatility
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.

type

BlackScholesOutput

A Black–Scholes output a selective call can request. First-order Greeks use the library's display units (theta per calendar day, vega and rho per 1%); higher-order Greeks use the raw units documented on `blackScholesExtendedGreeks`.

/**
 * A Black–Scholes output a selective call can request. First-order Greeks use the library's display
 * units (theta per calendar day, vega and rho per 1%); higher-order Greeks use the raw units
 * documented on `blackScholesExtendedGreeks`.
 */
export type BlackScholesOutput = (typeof BLACK_SCHOLES_OUTPUTS)[number];
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.

type

BlackScholesOutputSelection

A selection of outputs, as an array or (inferred from a literal) a tuple.

/** A selection of outputs, as an array or (inferred from a literal) a tuple. */
export type BlackScholesOutputSelection = readonly BlackScholesOutput[];
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

BlackScholesPriceBoundsInput

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

export interface BlackScholesPriceBoundsInput {
    type: OptionType;
    spot: number;
    strike: number;
    timeToExpiryYears: number;
    riskFreeRate: number;
    dividendYield: number;
}
Fields, parameters & returned members (6)
Name / typeMeaning & unitOptional / default
dividendYield
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
spot
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
strike
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
timeToExpiryYears
number

years (decimal)
Required / declared member
No @default declared; consult the signature and description.
type
OptionType

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.

value

blackScholes

The Black–Scholes facade namespace. Flat object arguments in, plain values out; `.explain()` on each function returns the assumptions/diagnostics envelope.

export declare const blackScholes: { call: Facade<BlackScholesInput, number>; put: Facade<BlackScholesInput, number>; price: Facade<BlackScholesTypedInput, number>; delta: Facade<BlackScholesTypedInput, number>; gamma: Facade<BlackScholesTypedInput, number>; theta: Facade<BlackScholesTypedInput, number>; vega: Facade<BlackScholesTypedInput, number>; rho: Facade<BlackScholesTypedInput, number>; greeks: Facade<BlackScholesTypedInput, Greeks>; extendedGreeks: Facade<BlackScholesTypedInput, ExtendedGreeks>; evaluate: BlackScholesEvaluateFacade; impliedVolatility: Facade<BlackScholesImpliedVolatilityInput, number, Record<never, never>, number | null>; };
Fields, parameters & returned members (283)

This large namespace is split into complete field pages. No fields are omitted.

Source example 1

import { blackScholes } from '@insiderfinance/totalfinance/options';

blackScholes.price({ spot: 100, strike: 105, timeToExpiryYears: 30 / 365, riskFreeRate: 0.045, volatility: 0.22, type: 'call' });
// → 0.898…  (plain number)

const { value, assumptions, diagnostics } = blackScholes.greeks.explain({
  spot: 100, strike: 105, timeToExpiryYears: 30 / 365, riskFreeRate: 0.045, volatility: 0.22, type: 'call',
});
// value.delta, value.theta (per day), … — with every assumption disclosed
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

blackScholesExtendedGreeks

Higher-order Greeks under BSM (spec §9.4), analytic and exact. First-order fields (`delta`…`rho`) carry the same default units as {@link blackScholesGreeks}; the second/third-order fields are in raw units: - `vanna` = ∂Δ/∂σ = ∂²V/∂S∂σ (per 1.00 σ, per $), - `vomma` = ∂(vega)/∂σ = ∂²V/∂σ² (per 1.00 σ²; vega here is per 1.00 σ), - `charm` = ∂Δ/∂T (delta drift per added year of time-to-expiry), - `speed` = ∂Γ/∂S = ∂³V/∂S³, - `color` = ∂Γ/∂T (gamma drift per added year of time-to-expiry), - `phi` = ε = ∂V/∂q (dividend rho, per 1% dividend yield — scaled like rho), - `zomma` = ∂Γ/∂σ = ∂³V/∂S²∂σ, - `veta` = ∂vega/∂T (per year of time-to-expiry; the ∂/∂T sibling of vega), - `vera` = ∂rho/∂σ = ∂²V/∂r∂σ, - `ultima`= ∂vomma/∂σ = ∂³V/∂σ³, - `lambda`= Δ·S/V (elasticity / effective leverage, dimensionless). All are validated against finite differences of the first-order Greeks / the price.

export declare function blackScholesExtendedGreeks(input: BlackScholesKernelInput): ExtendedGreeks;
Fields, parameters & returned members (24)
Name / typeMeaning & unitOptional / default
(input)
BlackScholesKernelInput

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).dividendYield
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).spot
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).strike
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).timeToExpiryYears
number

years (decimal)
Required / declared member
No @default declared; consult the signature and description.
(input).type
OptionType

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).volatility
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.charm
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.color
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.delta
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.gamma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.lambda
number | null
Elasticity / effective leverage `Λ = Δ·S / V` (dimensionless). `null` when the price underflows to zero (deep-OTM): elasticity is undefined at V = 0 and is disclosed as null with a `greeks.lambda_undefined` warning on explained paths — never NaN/Infinity (Law 7).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.phi
number
Dividend rho (epsilon) `ε = ∂V/∂q`, per 1% dividend yield (scaled like `rho`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.rho
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.speed
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.theta
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.ultima
number
`∂vomma/∂σ = ∂³V/∂σ³` (raw).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.vanna
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.vega
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.vera
number
`∂rho/∂σ = ∂²V/∂r∂σ` (raw, per 1.00 σ; rho here is per 1.00 rate).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.veta
number
`∂vega/∂T` (raw, per year of time-to-expiry; vega here is per 1.00 σ) — the ∂/∂T sibling of vega.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.vomma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.zomma
number
`∂Γ/∂σ = ∂³V/∂S²∂σ` (raw, per 1.00 σ).
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

blackScholesGreeks

First-order Greeks in TotalFinance default units (theta/day, vega/1%, rho/1%).

export declare function blackScholesGreeks(input: BlackScholesKernelInput): Greeks;
Fields, parameters & returned members (13)
Name / typeMeaning & unitOptional / default
(input)
BlackScholesKernelInput

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).dividendYield
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).spot
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).strike
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).timeToExpiryYears
number

years (decimal)
Required / declared member
No @default declared; consult the signature and description.
(input).type
OptionType

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).volatility
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.delta
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.gamma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.rho
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.theta
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.vega
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.

function

blackScholesImpliedVolatility

Solve implied volatility from a price using Brent with no-arbitrage bound checks. Returns `converged: false` with a machine-readable `reason` on failure — never a fabricated value (design law #4). Three ways there is no answer, reported apart: the price violates the intrinsic floor (`below_intrinsic`), it sits at or above the upper no-arbitrage bound, which is a SUPREMUM attained only as σ→∞ (`above_max_bound`), or it is below the model price at the lowest σ in the bracket (`price_below_resolvable`).

export declare function blackScholesImpliedVolatility(input: BlackScholesImpliedVolatilityKernelInput): BlackScholesImpliedVolatilityResult;
Fields, parameters & returned members (16)
Name / typeMeaning & unitOptional / default
(input)
BlackScholesImpliedVolatilityKernelInput

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).dividendYield
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).lowerVolatilityBound
number
Lower σ bracket (default `1e-7`).
unitless by name
Optional
No @default declared; consult the signature and description.
(input).price
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).spot
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).strike
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).timeToExpiryYears
number

years (decimal)
Required / declared member
No @default declared; consult the signature and description.
(input).type
OptionType

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).upperVolatilityBound
number
Upper σ bracket before expansion (default `5`).
unitless by name
Optional
No @default declared; consult the signature and description.
return.converged
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.error
number

unitless by name
Optional
No @default declared; consult the signature and description.
return.iterations
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.message
string
Explanatory detail when a usable numeric pricing bracket cannot be established.
unitless by name
Optional
No @default declared; consult the signature and description.
return.reason
ImpliedVolatilityReason

unitless by name
Optional
No @default declared; consult the signature and description.
return.value
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.

function

blackScholesPrice

Black–Scholes–Merton price for a European call/put with continuous dividend yield `q`. This is the seed defect Phase 3B was opened on. It validated the object and the `type` enum, then destructured six numeric fields and checked none of them: omitting `volatility` made `sigma` `undefined`, `d1` `NaN`, and the returned PRICE `NaN` — handed back as a success, through a declaration that said the field was required. A pricing function that answers `NaN` is worse than one that throws, because every layer above it treats the answer as a number.

export declare function blackScholesPrice(input: BlackScholesKernelInput): number;
Fields, parameters & returned members (8)
Name / typeMeaning & unitOptional / default
(input)
BlackScholesKernelInput

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).dividendYield
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).spot
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).strike
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).timeToExpiryYears
number

years (decimal)
Required / declared member
No @default declared; consult the signature and description.
(input).type
OptionType

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).volatility
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.

function

blackScholesPriceBounds

No-arbitrage price bounds for a vanilla under BSM (forward intrinsic ≤ price ≤ discounted spot/strike).

export declare function blackScholesPriceBounds(input: BlackScholesPriceBoundsInput): { lower: number; upper: number; };
Fields, parameters & returned members (9)
Name / typeMeaning & unitOptional / default
(input)
BlackScholesPriceBoundsInput

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).dividendYield
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(input).spot
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).strike
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).timeToExpiryYears
number

years (decimal)
Required / declared member
No @default declared; consult the signature and description.
(input).type
OptionType

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.lower
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.upper
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.