Fix what the independent review of Phase 8 found and close the phase
ci / test (postgres) (push) Successful in 6m37s
ci / test (sqlite) (push) Successful in 7m51s
ci / test (postgres) (pull_request) Successful in 5m40s
ci / test (sqlite) (pull_request) Successful in 7m31s
ci / image (push) Successful in 2m29s
ci / image (pull_request) Successful in 59s

Two reviewers with a clean context read the engine and the screens. The
isotonic calibration took its floor from the first step, even of two cases, so
with few winners it flattened every estimate: the first model is rebuilt with
the fix. Learning failures no longer forget the multiplier an operation was
born with, nor stop a decision or the nightly check; recovered decisions read
the outside world as it was when due; models estimate only the strategies they
studied; a newer history does not repeat what was lived. The screens count
examples instead of verifications, show the next threshold and never round an
alarm to 50%; two forms now check the antiforgery token.

Each defect has its test, on both engines. ADR 0018 point 17 has the list.

refs #67

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-12-01 13:36:26 +01:00
1 parent f69943f70a
commit 0b0f4a5e75
33 files changed
+659 -145

No files matched your search

+1 -1
View File
@@ -1 +1 @@
{"Through":"2026-10-31","BaseRates":{"crypto_trend":0.18329718004338394},"Model":{"Clues":["strength","stop_distance","volatility","volatility_ratio","volume","market_trend","market_volatility","breadth","weekday_sin","weekday_cos"],"Learned":{"Learner":"logistic","Linear":{"Intercept":-1.5574604345197345,"Weights":[0.1590340105154227,0.11908779476819635,-0.162432512465705,-0.08003982796993969,-0.19132480071600444,0.3022103731539277,0.10780995530583182,-0.23941305842109442,-0.22326128923555164,-0.15096635705365147],"Means":[0.19601108548807236,0.050460482868763604,0.8833982208676783,0.9192900882537972,0.9662490365618214,0.0835851831670285,0.5876342481616039,0.476247288508679,0.08773042725596508,-0.05221374460412148],"Scales":[0.165485155045225,0.04067752287292153,0.4848501513845519,0.310638619072209,1.0200137514523773,0.33648118132548555,0.2603576946488006,0.34682317518394806,0.7017578634342959,0.70506240583181]},"Trees":null},"Calibration":{"Kind":"isotonic","Slope":1,"Offset":0,"Scores":[-3.950815298593455,-2.295424845384458,-1.9151100659396874,-1.7663451007315563,-1.7294273092893189,-1.6834534361695037,-1.6486334946177699,-1.2851328574592205,-0.12266591732662607,0.08702724987460952],"Values":[0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.6666666666666667]},"Ranges":{"strength":{"Low":0.11111111,"High":1,"Cases":1844},"stop_distance":{"Low":0.00554256,"High":0.2,"Cases":1844},"volatility":{"Low":0.22509683,"High":2.6730656,"Cases":1844},"volatility_ratio":{"Low":0.33680145,"High":1.81238384,"Cases":1844},"volume":{"Low":0.31563245,"High":3.85783042,"Cases":1844},"market_trend":{"Low":-0.42829195,"High":1.23482451,"Cases":1844},"market_volatility":{"Low":0.25961056,"High":1.79265636,"Cases":1844},"breadth":{"Low":0,"High":1,"Cases":1844},"weekday_sin":{"Low":-0.97492791,"High":0.97492791,"Cases":1844},"weekday_cos":{"Low":-0.90096887,"High":1,"Cases":1844}},"Strategies":["crypto_trend"]},"Report":{"Examples":1844,"Live":0,"ByStrategy":{"crypto_trend":1844},"BaseRates":{"crypto_trend":0.18329718004338394},"FirstDay":"2019-01-01","LastDay":"2026-10-28","Attempts":[{"Learner":"boosting","Forward":{"Cases":1107,"LogLoss":0.5039820727635489,"BaseLogLoss":0.47884194965218496,"Brier":0.15907636401310338,"Precision":0.49573711063372716,"GainWithout":1.7619015934416593,"GainWith":1.3671192662708858,"Improvement":-0.39478232717077355,"CalibrationError":0.08995233818515404,"Bands":[{"From":0.05,"To":0.1,"Cases":27,"Estimated":0.08513321633688159,"Observed":0.33327967159013155},{"From":0.1,"To":0.15,"Cases":76,"Estimated":0.1205846499171033,"Observed":0.2692438228736069},{"From":0.15,"To":0.2,"Cases":240,"Estimated":0.17557548247994598,"Observed":0.15444000663544563},{"From":0.2,"To":0.25,"Cases":180,"Estimated":0.2232734796319761,"Observed":0.12922452472685167},{"From":0.25,"To":0.3,"Cases":291,"Estimated":0.25353021765415845,"Observed":0.1822752256443538},{"From":0.3,"To":0.35,"Cases":260,"Estimated":0.33272092703111206,"Observed":0.1947431154393129},{"From":0.35,"To":0.4,"Cases":16,"Estimated":0.37353561368298727,"Observed":0.35049852907302864},{"From":0.4,"To":0.45,"Cases":12,"Estimated":0.42519433372299786,"Observed":0.283533030708765},{"From":0.45,"To":0.5,"Cases":5,"Estimated":0.4714069044078384,"Observed":0}]},"Combined":{"Cases":9220,"LogLoss":0.49132446909272104,"BaseLogLoss":0.4806696575091626,"Brier":0.15507682960514105,"Precision":0.5230360608846665,"GainWithout":1.6880808292523108,"GainWith":1.6479770415699562,"Improvement":-0.040103787682354675,"CalibrationError":0.043970436437853075,"Bands":[{"From":0.05,"To":0.1,"Cases":189,"Estimated":0.08358931699861316,"Observed":0.15873015873015872},{"From":0.1,"To":0.15,"Cases":1511,"Estimated":0.13511708396610708,"Observed":0.19324950363997354},{"From":0.15,"To":0.2,"Cases":3905,"Estimated":0.1754909013303589,"Observed":0.18053777208706787},{"From":0.2,"To":0.25,"Cases":1563,"Estimated":0.2136126207759515,"Observed":0.19897632757517594},{"From":0.25,"To":0.3,"Cases":1051,"Estimated":0.26208823479755566,"Observed":0.16079923882017128},{"From":0.3,"To":0.35,"Cases":788,"Estimated":0.3288561548679041,"Observed":0.1700507614213198},{"From":0.35,"To":0.4,"Cases":102,"Estimated":0.3735783374752225,"Observed":0.22549019607843138},{"From":0.4,"To":0.45,"Cases":48,"Estimated":0.42372393439600436,"Observed":0.2916666666666667},{"From":0.45,"To":0.5,"Cases":28,"Estimated":0.47168117170804486,"Observed":0.25},{"From":0.5,"To":0.55,"Cases":15,"Estimated":0.5189195543992838,"Observed":0.13333333333333333},{"From":0.55,"To":0.6,"Cases":8,"Estimated":0.574330374974163,"Observed":0.125},{"From":0.6,"To":0.65,"Cases":3,"Estimated":0.6261332225482069,"Observed":0},{"From":0.65,"To":0.7,"Cases":9,"Estimated":0.6659045693196883,"Observed":0.2222222222222222}]},"Chosen":false},{"Learner":"logistic","Forward":{"Cases":1107,"LogLoss":0.49501524768221683,"BaseLogLoss":0.47884194965218496,"Brier":0.15713196527346796,"Precision":0.5181989063568011,"GainWithout":1.7619015934416593,"GainWLine truncated
{"Through":"2026-10-31","BaseRates":{"crypto_trend":0.18329718004338394},"Model":{"Clues":["strength","stop_distance","volatility","volatility_ratio","volume","market_trend","market_volatility","breadth","weekday_sin","weekday_cos"],"Learned":{"Learner":"logistic","Linear":{"Intercept":-1.5574604345197345,"Weights":[0.1590340105154227,0.11908779476819635,-0.162432512465705,-0.08003982796993969,-0.19132480071600444,0.3022103731539277,0.10780995530583182,-0.23941305842109442,-0.22326128923555164,-0.15096635705365147],"Means":[0.19601108548807236,0.050460482868763604,0.8833982208676783,0.9192900882537972,0.9662490365618214,0.0835851831670285,0.5876342481616039,0.476247288508679,0.08773042725596508,-0.05221374460412148],"Scales":[0.165485155045225,0.04067752287292153,0.4848501513845519,0.310638619072209,1.0200137514523773,0.33648118132548555,0.2603576946488006,0.34682317518394806,0.7017578634342959,0.70506240583181]},"Trees":null},"Calibration":{"Kind":"isotonic","Slope":1,"Offset":0,"Scores":[-2.31013942719076,-1.9151100659396874,-1.7663451007315563,-1.7294273092893189,-1.6834534361695037,-1.279712934228674],"Values":[0.11555555555555555,0.125,0.14736842105263157,0.15384615384615385,0.16393442622950818,0.23052959501557632]},"Ranges":{"strength":{"Low":0.11111111,"High":1,"Cases":1844},"stop_distance":{"Low":0.00554256,"High":0.2,"Cases":1844},"volatility":{"Low":0.22509683,"High":2.6730656,"Cases":1844},"volatility_ratio":{"Low":0.33680145,"High":1.81238384,"Cases":1844},"volume":{"Low":0.31563245,"High":3.85783042,"Cases":1844},"market_trend":{"Low":-0.42829195,"High":1.23482451,"Cases":1844},"market_volatility":{"Low":0.25961056,"High":1.79265636,"Cases":1844},"breadth":{"Low":0,"High":1,"Cases":1844},"weekday_sin":{"Low":-0.97492791,"High":0.97492791,"Cases":1844},"weekday_cos":{"Low":-0.90096887,"High":1,"Cases":1844}},"Strategies":["crypto_trend"]},"Report":{"Examples":1844,"Live":0,"ByStrategy":{"crypto_trend":1844},"BaseRates":{"crypto_trend":0.18329718004338394},"FirstDay":"2019-01-01","LastDay":"2026-10-28","Attempts":[{"Learner":"boosting","Forward":{"Cases":1107,"LogLoss":0.4901472349109493,"BaseLogLoss":0.47884194965218496,"Brier":0.15371685226409482,"Precision":0.507289937506103,"GainWithout":1.7619015934416593,"GainWith":1.4133353140068803,"Improvement":-0.348566279434779,"CalibrationError":0.045766180646463546,"Bands":[{"From":0.05,"To":0.1,"Cases":27,"Estimated":0.08513321633688159,"Observed":0.33327967159013155},{"From":0.1,"To":0.15,"Cases":76,"Estimated":0.1205846499171033,"Observed":0.2692438228736069},{"From":0.15,"To":0.2,"Cases":602,"Estimated":0.17613223786197266,"Observed":0.1707911333371173},{"From":0.2,"To":0.25,"Cases":261,"Estimated":0.2227211085612617,"Observed":0.14663644573512966},{"From":0.25,"To":0.3,"Cases":70,"Estimated":0.2646022340952087,"Observed":0.21307426019867914},{"From":0.3,"To":0.35,"Cases":38,"Estimated":0.3291545441015799,"Observed":0.21140647874817575},{"From":0.35,"To":0.4,"Cases":16,"Estimated":0.37353561368298727,"Observed":0.35049852907302864},{"From":0.4,"To":0.45,"Cases":12,"Estimated":0.42519433372299786,"Observed":0.283533030708765},{"From":0.45,"To":0.5,"Cases":5,"Estimated":0.4714069044078384,"Observed":0}]},"Combined":{"Cases":9220,"LogLoss":0.4837238568877384,"BaseLogLoss":0.4806696575091626,"Brier":0.15185458964467266,"Precision":0.5204232380144118,"GainWithout":1.6880808292523108,"GainWith":1.6364813104483271,"Improvement":-0.051599518803983724,"CalibrationError":0.03014685726947035,"Bands":[{"From":0,"To":0.05,"Cases":1,"Estimated":0.046564955701587085,"Observed":0.3333333333333333},{"From":0.05,"To":0.1,"Cases":46,"Estimated":0.07881756467240499,"Observed":0.15789473684210525},{"From":0.1,"To":0.15,"Cases":354,"Estimated":0.13721738144360052,"Observed":0.18972332015810275},{"From":0.15,"To":0.2,"Cases":887,"Estimated":0.17631601405250116,"Observed":0.18241262683201803},{"From":0.2,"To":0.25,"Cases":389,"Estimated":0.214237231909851,"Observed":0.19023136246786632},{"From":0.25,"To":0.3,"Cases":136,"Estimated":0.26749199949900143,"Observed":0.15905743740795286},{"From":0.3,"To":0.35,"Cases":31,"Estimated":0.30986280783768577,"Observed":0.1858974358974359},{"From":0.35,"To":0.4,"Cases":1,"Estimated":0.3668701553971652,"Observed":0.3333333333333333}]},"Chosen":false},{"Learner":"logistic","Forward":{"Cases":1107,"LogLoss":0.4735156194734787,"BaseLogLoss":0.47884194965218496,"Brier":0.14890023945017386,"Precision":0.5457932574943853,"GainWithout":1.7619015934416593,"GainWith":1.8120652589010067,"Improvement":0.05016366545934736,"CalibrationError":0.017426102268308204,"Bands":[{"From":0.05,"To":0.1,"Cases":2,"Estimated":0.0909525554691676,"Observed":0},{"From":0.1,"To":0.15,"Cases":101,"Estimated":0.140951208737604,"Observed":0.16040173361620094},{"From":0.15,"To":0.2,"Cases":520,"Estimated":0.1790306767513123,"Observed":0.1688945041903547},{"From":0.2,"To":0.25,"Cases":452,"Estimated":0.21795407082480758,"Observed":0.19599570984164852},{"From":0.25,"Line truncated
+21 -27
View File
@@ -24,28 +24,28 @@ Ogni numero viene da esempi che il modello non aveva studiato. «In avanti»: si
| Modello | Prova | Casi | Errore (log-loss) | Di chi risponde sempre la frequenza di base | Errore sulle probabilità (Brier) | Previsioni azzeccate | Guadagno medio per operazione proposta, senza filtro | con il filtro |
|---|---|---|---|---|---|---|---|---|
| Alberi potenziati | in avanti | 1107 | 0,5040 | 0,4788 | 0,1591 | 49,6% | +1,76 € | +1,37 € |
| Alberi potenziati | a combinazioni | 9220 | 0,4913 | 0,4807 | 0,1551 | 52,3% | +1,69 € | +1,65 € |
| Regressione logistica (scelto) | in avanti | 1107 | 0,4950 | 0,4788 | 0,1571 | 51,8% | +1,76 € | +1,78 € |
| Regressione logistica (scelto) | a combinazioni | 9220 | 0,4938 | 0,4807 | 0,1560 | 53,4% | +1,69 € | +1,76 € |
| Foresta casuale | in avanti | 1107 | 0,4960 | 0,4788 | 0,1569 | 50,2% | +1,76 € | +1,66 € |
| Foresta casuale | a combinazioni | 9220 | 0,4909 | 0,4807 | 0,1547 | 52,2% | +1,69 € | +1,63 € |
| Alberi potenziati | in avanti | 1107 | 0,4901 | 0,4788 | 0,1537 | 50,7% | +1,76 € | +1,41 € |
| Alberi potenziati | a combinazioni | 9220 | 0,4837 | 0,4807 | 0,1519 | 52,0% | +1,69 € | +1,64 € |
| Regressione logistica (scelto) | in avanti | 1107 | 0,4735 | 0,4788 | 0,1489 | 54,6% | +1,76 € | +1,81 € |
| Regressione logistica (scelto) | a combinazioni | 9220 | 0,4796 | 0,4807 | 0,1506 | 56,0% | +1,69 € | +1,76 € |
| Foresta casuale | in avanti | 1107 | 0,4819 | 0,4788 | 0,1512 | 50,7% | +1,76 € | +1,69 € |
| Foresta casuale | a combinazioni | 9220 | 0,4821 | 0,4807 | 0,1513 | 52,6% | +1,69 € | +1,64 € |
Il guadagno è calcolato sul capitale di riferimento (10.000 € in tutto, quote predefinite). Nelle combinazioni ogni caso è verificato più volte.
**Scelta.** Regressione logistica: il miglior guadagno medio per operazione proposta su esempi mai visti. La regola era fissata prima di guardare i numeri (ADR 0018).
**Lettura onesta.** Le stime non sono migliori di chi risponde sempre la frequenza di base: su questo storico il modello non ha trovato niente di solido. Con il filtro il guadagno medio per operazione proposta cambia di +0,07 € nelle combinazioni e di +0,02 € in avanti.
**Lettura onesta.** Le stime sono migliori di chi risponde sempre la frequenza di base in tutte e due le prove, ma di poco: errore più basso, 0,2% in meno nelle combinazioni e 1,1% in meno in avanti. Con il filtro il guadagno medio per operazione proposta cambia di +0,07 € nelle combinazioni e di +0,05 € in avanti.
## Cosa guarda di più
| Indizio | Peso su 100 |
|---|---|
| Forza della tendenza | 40 |
| Quota di titoli in salita | 20 |
| Giorno della settimana | 17 |
| Agitazione recente dei prezzi | 14 |
| Fase generale del mercato | 9 |
| Giorno della settimana | 34 |
| Forza della tendenza | 30 |
| Agitazione recente dei prezzi | 19 |
| Quota di titoli in salita | 12 |
| Fase generale del mercato | 5 |
| Distanza dallo stop | 0 |
| Volumi scambiati | 0 |
@@ -53,24 +53,18 @@ Il peso dice quanto peggiorano le stime se si mescolano i valori di quell'indizi
## Ci si può fidare delle probabilità?
Verifica a combinazioni, fasce da 5 punti. Contano le fasce con almeno 20 casi; errore medio 6,3 punti.
Verifica a combinazioni, fasce da 5 punti; un esempio verificato più volte conta come un caso. Contano le fasce con almeno 20 casi; errore medio 2,2 punti.
| Stima | Casi | Stimato in media | Andate bene |
|---|---|---|---|
| 0–5% | 13 | 3,6% | 30,8% |
| 5–10% | 213 | 7,5% | 17,8% |
| 10–15% | 1475 | 13,3% | 15,5% |
| 15–20% | 2986 | 17,5% | 20,7% |
| 20–25% | 793 | 22,1% | 19,7% |
| 25–30% | 2412 | 25,6% | 17,5% |
| 30–35% | 1275 | 33,3% | 16,5% |
| 35–40% | 17 | 37,5% | 23,5% |
| 40–45% | 9 | 42,3% | 33,3% |
| 45–50% | 10 | 47,5% | 20,0% |
| 50–55% | 9 | 50,5% | 22,2% |
| 60–65% | 1 | 61,5% | 0,0% |
| 65–70% | 1 | 66,7% | 100,0% |
| 75–80% | 6 | 75,0% | 33,3% |
| 0–5% | 12 | 4,6% | 19,0% |
| 5–10% | 38 | 8,1% | 16,9% |
| 10–15% | 377 | 13,3% | 14,6% |
| 15–20% | 837 | 17,7% | 19,1% |
| 20–25% | 395 | 21,7% | 20,6% |
| 25–30% | 167 | 26,9% | 17,7% |
| 30–35% | 13 | 31,8% | 18,2% |
| 35–40% | 5 | 35,9% | 26,9% |
## Cosa succede adesso