feat(backtest): optional date-range window

- RunBacktestUseCase gains an ExecuteAsync(strategy, DateRange?, ct) overload that
  pushes the date filter to SQL via IAnomalyRepository.ListByDateRangeAsync; the
  existing no-range overload is preserved. +1 use-case test.
- BacktestForm carries optional From/To (Moscow dates) with From<=To validation and
  a ToDateRange() helper; BacktestService threads it through. Backtest page gains two
  clearable date pickers (empty = all anomalies).
- Localization (en+ru) for the backtest date fields and the settings-validation keys
  (shared resx).
This commit is contained in:
2026-05-29 00:50:43 +03:00
parent d9d92ea8fd
commit e5cd2ab30c
7 changed files with 98 additions and 5 deletions
@@ -46,6 +46,25 @@
data-test="backtest-bankroll" />
</div>
<div class="m-backtest__form-field">
<label class="m-backtest__form-label">@L["Backtest.Field.From"]</label>
<MudDatePicker @bind-Date="_form.From"
DateFormat="yyyy-MM-dd"
Clearable="true"
Variant="Variant.Outlined"
data-test="backtest-from" />
</div>
<div class="m-backtest__form-field">
<label class="m-backtest__form-label">@L["Backtest.Field.To"]</label>
<MudDatePicker @bind-Date="_form.To"
DateFormat="yyyy-MM-dd"
Clearable="true"
Variant="Variant.Outlined"
data-test="backtest-to" />
<span class="m-backtest__form-hint">@L["Backtest.Field.DateRange.Hint"]</span>
</div>
<div class="m-backtest__form-field">
<label class="m-backtest__form-label">@L["Backtest.Field.MinScore"]</label>
<MudNumericField T="decimal"