Skip to content

@livefolio/sdk / RunLiveOptions

Type Alias: RunLiveOptions<F, S>

RunLiveOptions<F, S> = object

Defined in: strategy/run-live.ts:60

Required inputs to runLive.

Type Parameters

Type ParameterDefault type
F extends FeaturesFeatures
Sunknown

Properties

calendar

calendar: Calendar

Defined in: strategy/run-live.ts:76

Calendar that resolves a tick's wall-clock time into its session date.


dataFeed

dataFeed: StreamingDataFeed

Defined in: strategy/run-live.ts:72

Source of streaming ticks.


executor

executor: Executor

Defined in: strategy/run-live.ts:74

Order router used at session boundaries to settle the just-closed bar.


history

history: BacktestResult<S>

Defined in: strategy/run-live.ts:70

Result of a prior runBacktest call. Provides the seed portfolio, state, and bars map for the streaming runtime.


strategy

strategy: Strategy<F, S>

Defined in: strategy/run-live.ts:65

The strategy to drive. If its features method depends on a captured FeatureRuntime (e.g. tactical strategies built via fromSpec), pass the same runtime instance via RunLiveOptions.streamingRuntime so the live bar buffer stays in sync with what the strategy reads.


streamingRuntime?

optional streamingRuntime?: FeatureRuntime

Defined in: strategy/run-live.ts:85

Optional streaming FeatureRuntime. Provide this to share the runtime with the strategy — tactical strategies built via fromSpec capture a runtime in their features closure, so passing the same instance here keeps the live bar buffer in sync with what the strategy reads. When omitted, runLive constructs its own streaming runtime seeded from history.bars.

Released under the MIT License.