feat(anomaly): suspension-freeze detector
- Add SuspensionFreezeDetector via the IAnomalyDetector seam: a suspension gap with the favourite unchanged and a negligible (< threshold) price move — the mirror of the flip. Score = how completely the line froze. Reuses MatchWinEvidence so UI + evaluator handle it unchanged. 6 tests. - Add AnomalyKind.SuspensionFreeze + localized card/detail label, SuspensionFreezeThreshold option, and fan it into DetectAnomaliesUseCase.
This commit is contained in:
@@ -44,4 +44,11 @@ public sealed class AnomalyOptions
|
||||
/// to flag a steam move. Must be in (0, 1). Default: 0.20 (20 percentage points).
|
||||
/// </summary>
|
||||
public decimal SteamMoveDriftThreshold { get; init; } = 0.20m;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum normalised implied-probability change across a suspension for it to count
|
||||
/// as a "freeze" (line resumed essentially unchanged). Must be in (0, 1).
|
||||
/// Default: 0.05 (5 percentage points).
|
||||
/// </summary>
|
||||
public decimal SuspensionFreezeThreshold { get; init; } = 0.05m;
|
||||
}
|
||||
|
||||
@@ -70,6 +70,10 @@ public sealed class DetectAnomaliesUseCase
|
||||
_options.SteamMoveDriftThreshold,
|
||||
_options.MinSnapshotCount,
|
||||
_options.SuspensionGapSeconds),
|
||||
new SuspensionFreezeDetector(
|
||||
_options.SuspensionGapSeconds,
|
||||
_options.SuspensionFreezeThreshold,
|
||||
_options.MinSnapshotCount),
|
||||
};
|
||||
|
||||
var events = await _eventRepo.ListAsync(ct);
|
||||
|
||||
Reference in New Issue
Block a user