Files
Anubis/src/Anubis.Server/Components/ReviewReportView.razor
T
Alby96andClaude Opus 5.5 3543f29aba Judge the variant in use and count the shadow cases for what they are
The quarterly review judged the best variant of the grid instead of the one
that trades: the plan now fixes the variant in use and the protocol measures
that one, while the tries are still those of the grid. A failure while the
history is prepared is a reason in the report and no longer stops the review,
and a strategy whose protocol does not exist says so when its data are there.

The volatility improvement compared books of different days and stages: the
book keeps its stage and its previous day, and a case without a book valid on
its day is left out. Fewer than six months give no interval, the others use
the clustered error with the Student t.

The restriction balance counts a case in the period in which its outcome
became known, so no case is lost or counted twice between two reviews.

The contact given to the SEC travels only on the client that never follows a
redirect, so it cannot reach another site.

refs #75

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 22:26:06 +01:00

105 lines
4.7 KiB
Plaintext

@using Anubis.Backtest
@using Anubis.Learning
@using Anubis.Trading
@{
var r = Review.Report!;
var rates = ReviewView.Rates(r);
var restrictions = ReviewView.Restrictions(r);
}
<p class="hint">Dati fino al @LabText.Day(Review.Through).@(r.Missing is { } missing ? $" Le crypto non sono state riprovate: {missing}." : "")</p>
<div class="table-wrap">
<table class="table">
<caption class="sr-only">Esito della revisione per strategia</caption>
<thead><tr><th scope="col">Strategia</th><th scope="col">Stadio</th><th scope="col">Esito</th><th scope="col">Cosa cambia</th><th scope="col">Dal vivo</th></tr></thead>
<tbody>
@foreach (var line in r.Strategies)
{
<tr>
<td><strong>@StrategyNames.Label(line.Strategy, withMarket: true)</strong></td>
<td>@StrategyStages.Label(line.Stage)</td>
<td>
<span class="tag @ReviewView.VerdictClass(line)">@ReviewView.Verdict(line)</span>
@if (line.Verdict != ReviewVerdicts.Waiting || r.Missing is not null && line.Strategy == CryptoTrendProtocol.Strategy)
{
<br /><span class="note">@line.Text</span>
}
@foreach (var (id, i) in line.Trials.Select((id, i) => (id, i)))
{
<br /><a href="/laboratorio/@id">@(i == 0 ? "Test sull'universo ampio" : "Test su BTC, ETH e SOL")</a>
}
</td>
<td>
@ReviewView.Action(line)
@if (line.Chosen is { } chosen)
{
<br /><span class="note">Variante migliore: @LabText.Parameters(chosen.Parameters), Sharpe @LabText.Number(chosen.Sharpe), calo massimo @LabText.Percent(chosen.MaxDrawdown).</span>
}
@if (line.InUse is { } used)
{
<br /><span class="note">Variante in uso: @LabText.Parameters(used.Parameters), Sharpe @LabText.Number(used.Sharpe), calo massimo @LabText.Percent(used.MaxDrawdown).@(used.OutsideGrid ? " Non è nella griglia." : "") Non cambia da sola.</span>
}
</td>
<td>@foreach (var text in ReviewView.Live(line, r.RatesAfter ?? r.RatesBefore)) {<div>@text</div>}</td>
</tr>
}
</tbody>
</table>
</div>
<h3>Frequenze di base</h3>
@if (rates.Count == 0)
{
<p class="note">Nessuna frequenza misurata.</p>
}
else
{
<p class="hint">Quante operazioni su cento chiudono in guadagno nello storico: è il termine di paragone del modello.@(r.RatesAfter is null ? " Questa volta non sono state rimisurate." : "")</p>
<dl class="facts">
@foreach (var rate in rates)
{
<dt>@rate.Name</dt>
<dd>@(rate.Before == rate.After ? rate.After : $"da {rate.Before} a {rate.After}")</dd>
}
</dl>
}
<h3>Bilancio delle restrizioni</h3>
<p class="hint">Acquisti fermati da notizie e calendario e come sarebbero finiti, dal @LabText.Day(r.RestrictionsFrom) e da quando Anubis è in funzione. La riga delle trimestrali non è misurata: agisce dentro la strategia, prima del segnale.</p>
@if (restrictions.Count == 0)
{
<p class="note">Nessun acquisto fermato finora.</p>
}
else
{
<div class="table-wrap">
<table class="table">
<caption class="sr-only">Perdite evitate e guadagni persi per restrizione</caption>
<thead><tr><th scope="col">Restrizione</th><th scope="col">Periodo</th><th scope="col" class="num">Fermati</th><th scope="col" class="num">Perdite evitate</th><th scope="col" class="num">Guadagni persi</th><th scope="col">Senza esito</th></tr></thead>
<tbody>
@foreach (var x in restrictions)
{
foreach (var (label, line) in new[] { ("Dall'ultima revisione", x.Period), ("Da sempre", x.Ever) })
{
<tr>
<td>@x.Name</td>
<td>@label</td>
<td class="num">@(line?.Stopped ?? 0)</td>
<td class="num">@LabText.Money(line?.Avoided ?? 0m, "EUR")</td>
<td class="num">@LabText.Money(line?.GivenUp ?? 0m, "EUR")</td>
<td>@ReviewView.Rest(line)</td>
</tr>
}
}
</tbody>
</table>
</div>
}
@code {
[Parameter, EditorRequired]
public Review Review { get; set; } = null!;
}