Table of Contents

Namespace Virtufin.Base.Behavior

Classes

Returns

Return indicators composed purely from Combine<TLeft, TRight, TSample, TL, TR, TResult>(IIndicator<TLeft, TSample, TL>, IIndicator<TRight, TSample, TR>, Func<TL, TR, TResult>) and Lag<TSelf, TSample, TValue>(IIndicator<TSelf, TSample, TValue>, int) — no bespoke wrapper types needed, since Combine already returns a concrete CombinedIndicator<TLeft, TRight, TSample, TL, TR, TResult>.

ShannonEntropyIndicators

Running Shannon entropy over a source indicator's values — the two variants (fixed sample count, fixed time window) mirror SimpleMovingAverage<TTime, TValue>'s own two variants, but composed from the general Take/TimeWindow combinators rather than a specialized O(1) fold: entropy has no cheap incremental update the way a sum does (evicting one sample from a frequency table doesn't cheaply update -Σp·log(p)), so both variants materialize the window on every Value read (O(window size)).

SimpleMovingAverage<TTime, TValue>

Time-windowed simple moving average. "Simple" describes the averaging method (uniformly-weighted mean), not the implementation — count-based windowing is the special case where samples happen to arrive at a regular cadence, so this is windowed by time in general.

WindowAlgorithms

Pure, LINQ-based algorithms over a materialized window — the f in indicator.Take(n).Map(f) / indicator.TimeWindow(...).Map(f). Not a new abstraction: ordinary LINQ (.Average(), .Sum(), a custom .Aggregate(...)) already works directly on those combinators' ImmutableArray<T> results, since it implements IEnumerable<T>. This class only adds the named, reusable, non-trivial ones.