Skip to content

@livefolio/sdk / ComputeFn

Type Alias: ComputeFn

ComputeFn = (series, spec) => Series

Defined in: features/spec.ts:52

A pure function that computes a feature Series from an input price Series and the typed FeatureSpec describing the indicator's parameters. Implementations must be deterministic and side-effect free — the SDK uses the function as a content-addressed dispatch token via getFeatureCompute and as the registration target for defineFeature.

Parameters

ParameterTypeDescription
seriesSeriesInput price series (typically the asset's close prices).
specFeatureSpecTyped indicator spec carrying the parameters relevant to kind.

Returns

Series

The computed feature series, aligned to series on t.

Released under the MIT License.