Spaces:
Running
Running
Download index.html from tickfloor/luck-check: direct link, hf CLI and curl.
- Browser
- Download file 3.35 kB
-
https://huggingface.co/spaces/tickfloor/luck-check/resolve/main/index.html
- Command line
-
hf download hf://spaces/tickfloor/luck-check/index.html
-
curl -L -o index.html https://huggingface.co/spaces/tickfloor/luck-check/resolve/main/index.html
3.35 kB
| <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"> | |
| <title>Luck check: 1,342 trading rules</title> | |
| <style> | |
| body{margin:0;background:#F4F5F7;color:#1b2430;font:16px/1.5 system-ui,sans-serif} | |
| main{max-width:760px;margin:0 auto;padding:24px 16px} | |
| h1{font-size:26px;margin:0 0 4px;color:#25446B} | |
| .big{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0} | |
| .big div{flex:1 1 140px;background:#fff;border:1px solid #d5d9e0;border-radius:8px;padding:10px 12px} | |
| .big b{display:block;font-size:26px;color:#25446B} | |
| canvas{width:100%;height:220px;background:#fff;border:1px solid #d5d9e0;border-radius:8px} | |
| label{display:block;margin:16px 0 4px}input[type=range]{width:100%} | |
| small{color:#4a5568}a{color:#25446B} | |
| </style></head><body><main> | |
| <h1>Do simple trading rules beat luck?</h1> | |
| <p>We tested 1,342 rules on stocks, ETFs and crypto, with trading costs. Move the slider to see how many look good on their own, and how many survive the luck check.</p> | |
| <div class="big"><div><b id="n">-</b>rules tested</div><div><b id="ahead">-</b>ahead of holding</div><div><b id="looks">-</b>look "real" alone</div><div><b id="pass">-</b>pass the luck check</div></div> | |
| <canvas id="c" width="760" height="220"></canvas> | |
| <label for="s">Show rules with p-value under <b id="sv">0.05</b> (a lower p means "less likely to be luck, on its own")</label> | |
| <input id="s" type="range" min="0.01" max="0.5" step="0.01" value="0.05"> | |
| <p id="msg"></p> | |
| <p><small>In-sample, not a promise. Rules were fit on data before 15 March 2025. "Luck check" = Benjamini-Hochberg q under 0.10, across 1,774 tests. Tickfloor sells a paid stock and crypto score tool, and this research also promotes it. Data CC BY 4.0. <a href="https://tickfloor.com/evidence?utm_source=huggingface&utm_medium=space&utm_campaign=push1031" target="_blank" rel="noopener">How each test was built</a>. General information, not personal advice.</small></p> | |
| </main> | |
| <script> | |
| fetch("https://tickfloor.com/research-registry.json").then(r=>r.json()).then(rows=>{ | |
| const $=id=>document.getElementById(id), N=rows.length; | |
| $("n").textContent=N.toLocaleString(); | |
| $("ahead").textContent=rows.filter(r=>r.excessAnnual>0).length; | |
| $("pass").textContent=rows.filter(r=>r.q<0.10).length; | |
| const ps=rows.map(r=>r.p).filter(p=>p<1); | |
| $("looks").textContent=rows.filter(r=>r.p<0.05).length; | |
| const cv=$("c"),g=cv.getContext("2d"),B=25; | |
| function draw(){ | |
| const cut=+$("s").value; $("sv").textContent=cut.toFixed(2); | |
| const bins=Array(B).fill(0); ps.forEach(p=>bins[Math.min(B-1,Math.floor(p*B))]++); | |
| const mx=Math.max(...bins),w=cv.width/B; g.clearRect(0,0,cv.width,cv.height); | |
| bins.forEach((v,i)=>{const h=v/mx*(cv.height-30);g.fillStyle=(i+1)/B<=cut?"#B42E2C":"#25446B";g.fillRect(i*w+2,cv.height-20-h,w-4,h);}); | |
| g.fillStyle="#4a5568";g.font="12px system-ui";g.fillText("p-value, 0 to 1 (rules with p = 1 left out)",8,cv.height-4); | |
| const k=rows.filter(r=>r.p<cut).length,pass=rows.filter(r=>r.p<cut&&r.q<0.10).length; | |
| $("msg").textContent=k+" rules have p under "+cut.toFixed(2)+" on their own. After correcting for running so many tests, "+pass+" of them pass."; | |
| } | |
| $("s").oninput=draw;draw(); | |
| }).catch(()=>{document.getElementById("msg").textContent="Could not load the results table. Try again."}); | |
| </script></body></html> | |