Table of Contents

Struct LagIndicator<TInner, TSample, TValue>

Namespace
Virtufin.Core.Behavior
Assembly
Virtufin.Core.dll

Result of Lag<TSelf, TSample, TValue>(IIndicator<TSelf, TSample, TValue>, int). Exposes the wrapped indicator's value from N samples back.

public readonly struct LagIndicator<TInner, TSample, TValue> : IIndicator<LagIndicator<TInner, TSample, TValue>, TSample, TValue>, ISignal<TValue> where TInner : IIndicator<TInner, TSample, TValue>

Type Parameters

TInner

The wrapped indicator's concrete type.

TSample

The sample type consumed on each observation.

TValue

The wrapped indicator's value type.

Implements
IIndicator<LagIndicator<TInner, TSample, TValue>, TSample, TValue>
ISignal<TValue>
Inherited Members
Extension Methods

Properties

Value

The current signal value.

public TValue Value { get; }

Property Value

TValue

Exceptions

InvalidOperationException

Fewer than n + 1 samples have been added yet.

Methods

Add(TSample)

Fold one more sample in, returning the updated indicator.

public LagIndicator<TInner, TSample, TValue> Add(TSample sample)

Parameters

sample TSample

The new observation.

Returns

LagIndicator<TInner, TSample, TValue>

A new indicator instance reflecting sample.