Class TimestampedSample<TTime, TValue>
A single observation at a point in time, generic over both the time axis
and the value type. This is the sample shape IIndicator
implementations consume — kept in Virtufin.Core.Events rather than
Virtufin.Core.Behaviour because it's a general timestamped-event
shape, not indicator-specific.
public sealed record TimestampedSample<TTime, TValue> : IEvent<TTime>, IEquatable<IEvent<TTime>>, IEquatable<TimestampedSample<TTime, TValue>> where TTime : IComparable<TTime>
Type Parameters
TTimeThe time type (e.g. DateTimeOffset for real candles, or a synthetic tick counter for deterministic replay).
TValueThe observed value's type.
- Inheritance
-
TimestampedSample<TTime, TValue>
- Implements
-
IEvent<TTime>IEquatable<IEvent<TTime>>IEquatable<TimestampedSample<TTime, TValue>>
- Inherited Members
Constructors
TimestampedSample(TTime, TValue)
A single observation at a point in time, generic over both the time axis
and the value type. This is the sample shape IIndicator
implementations consume — kept in Virtufin.Core.Events rather than
Virtufin.Core.Behaviour because it's a general timestamped-event
shape, not indicator-specific.
public TimestampedSample(TTime Time, TValue Value)
Parameters
TimeTTimeThe time of the observation.
ValueTValueThe observed value.
Properties
Time
The time of the observation.
public TTime Time { get; init; }
Property Value
- TTime
Value
The observed value.
public TValue Value { get; init; }
Property Value
- TValue