Refine QuantLab with focused Apple-inspired layout, typography and navigation
Browse filesFiles changed (8)
- APPLE-REFERENCES.mdAdded+22
- DESIGN.md+10-11
- README.md+2
- VERIFICATION.md+10
- app.js+4-3
- index.html+16-18
- style.css+25-25
- test_app_state.cjs+6-2
12345678910111213141516171819202122# QuantLab Apple-inspired design pass
The brief was to strengthen Apple-like polish while keeping the beginner-friendly flow and honest probability explanations. The implementation borrows design principles, not branding or assets.
## Sources reviewed
- https://www.apple.com/ — short product stories and distinct calls to action.- https://www.apple.com/iphone/ — strong type hierarchy and spacious product presentation; visually inspected in browser.- https://www.apple.com/os/ios/ — capability-first product language and OS presentation.- https://www.apple.com/macbook-air/ — focused product headline and progressive detail.- https://developer.apple.com/design/human-interface-guidelines/typography — readable hierarchy and limited typefaces.- https://developer.apple.com/design/human-interface-guidelines/layout — aligned groups, adaptable layouts and progressive disclosure.- https://developer.apple.com/design/human-interface-guidelines/materials — navigation/control materials separated from content.- https://www.apple.com/newsroom/2017/01/behind-apples-new-campaign-one-night-on-iphone-7/ — historical product demonstration through the work people make with it.
Primary Apple pages were accessed directly through web/browser tools. The HIG text endpoint failed; browser rendering provided the source. No local crawler was needed for these known URLs. This is a bounded reference study, not a claim to have reviewed every Apple product or campaign.
## Applied decisions
One centered workspace replaces the sidebar. The three model probabilities are the visual focus. A compact sticky navigation layer is the only translucent surface. Type size, whitespace and weight create hierarchy; exact technical content remains optional. No Apple logo, proprietary font, marketing image or copied slogan was added.
Navigation now moves to the start of the selected page, and invalid settings open their enclosing disclosures before native error focus. Calculations and evaluation limits remain unchanged.12345678910111213141516171819# QuantLab interfaceApple-inspired analytical workspace, requested 26 October 2026. Use the platform system font, a cool neutral canvas (#f5f5f7), white working surfaces, near-black text (#1d1d1f), secondary text (#626268), and functional blue (#0071e3). Main surfaces use 16px radii; controls use 9–10px. Desktop spacing 48px, mobile 20px. Controls are at least 44px tall; mobile inputs are 16px.Forecast is the default task. Data choice precedes one update action. Synthetic settings, model explanations, benchmark access, scores and machine-readable audits use native disclosure controls. CSV fields appear only for CSV mode. Keep status and data provenance visible. Plain-language chart titles explain their purpose; exact units and scoring definitions stay adjacent. Calculators explain outcomes before numerical solver details.Four views: Forecast, Calculators, Scenarios, How it works. Preserve keyboard focus, labeled inputs, live result announcements, reduced motion, browser-local data handling, and the distinction between scenario assumptions and calibrated estimates. No imagery or decorative glass is needed. No paid services or external font dependencies.Polish: keep calculator explanations in proportional type; disclose numerical solver diagnostics separately. Distinguish edited settings from the last completed report. Lock forecast inputs while fitting, and move focus to results only after an explicit run. Keep the mobile results shortcut and textual three-outcome probabilities.Data quality is a disclosure next to forecast evidence. Warning counts appear in its summary. Cleaning changes and retained anomalies are auditable. The sidebar explains the bounded temporary cache and provides Clear forecast data. Preserve strict input validation and explicit cache-hit labels.Validation uses a single white evidence surface within Forecast, with a neutral conclusion and paired baseline table. Main uncertainty is accompanied by its block length and replicate count; detailed folds, stage event counts and sensitivity are disclosures. Strict is the browser UI default, classic is explicitly selectable; minimum-history errors never silently change protocol. Show that the latest strict forecast retains the evaluated fit, while classic scores describe historical selection. Sidebar controls scroll within the viewport on desktop; mobile remains ordinary document flow.## Beginner navigation and languageThe default path is Price explorer → choose prices → Show my guess → three outcome chances → Did the guesses help? Use everyday language and explain percentages as chances out of 100. Made-up data stays clearly labeled. Preserve exact cutoff definitions under What counts as a big fall. Three top outcomes replace technical score/count metrics; exact scores remain available under checking/technical disclosures.Number games, What if? and Help name the other destinations. Help starts with three steps and a short glossary. Keep model names, statistical assumptions, JSON audits and saved Python tooling available on request. Preserve numerical behavior, privacy, error recovery and the existing Apple-inspired visual system. Avoid claiming this has been tested with children.123456789101112131415161718# QuantLab interfaceApple-inspired learning workspace. Preserve plain language, the actual three outcome probabilities, transparent made-up data labels and uncertainty. Brand remains QuantLab; no Apple marks, proprietary fonts or product assets are used.## Visual systemUse the platform system font with optical sizing. Canvas #f5f5f7, opaque content #fff, ink #1d1d1f, secondary #626268, functional blue #0066cc. One thin sticky navigation layer may be translucent; reduced-transparency and higher-contrast preferences make it solid. Keep charts and results opaque. No decorative gradients, glass cards, stock imagery or external font dependencies.Navigation names Price explorer, Number games, What if? and Help. Intro gives one short idea; primary price selector and action precede a centered result surface. The three exact percentages are the focal point. An additional chart representation is optional. Outcome color is emphasis, not an investment recommendation.Use 16px surface radii, small rounded form fields, capsule action buttons and responsive whitespace. Desktop result figures scale up to 60px. Phone figures stack beside labels. Body text remains comfortable; captions remain readable and secondary colors meet contrast against their surfaces.## InteractionSettings are optional; file selection appears directly when needed. Hidden invalid fields reveal all ancestor disclosures before native validation focuses them. Navigation moves focus and scroll to the start of the selected view. Run focuses results after completion; cache hits stay labeled. Clear removes derived results and history. Native disclosures retain exact cutoffs, detailed validation, models and audits. Preserve export, file bounds, operation invalidation and chronological model behavior.Use brief press feedback and a subtle view appearance only when reduced motion is not requested. Never delay input for animation. Respect reduced motion, reduced transparency and increased contrast.## Reference studyReviewed official Apple homepage, iPhone and iOS pages, MacBook Air presentation, Human Interface Guidelines for typography/layout/materials and the One Night on iPhone campaign. Applied hierarchy, purposeful spacing, product-first presentation and controlled disclosure. This is an adaptation for a web learning tool, not Apple certification or an exhaustive study of every product. See APPLE-REFERENCES.md for sources and review scope.
51 unmodified lines52535451 unmodified linesThe interface starts with plain-language Price explorer, Number games, What if? and Help. Main results show three chances and a short explanation; exact scores, checking methods and audit reports remain available in optional details. This changes presentation, not the forecasting models or the strength of their evidence.51 unmodified lines525354555651 unmodified linesThe interface starts with plain-language Price explorer, Number games, What if? and Help. Main results show three chances and a short explanation; exact scores, checking methods and audit reports remain available in optional details. This changes presentation, not the forecasting models or the strength of their evidence.The Apple-inspired refinement centers the actual outcome chances, consolidates optional controls, and uses an opaque result surface beneath lightweight navigation. See APPLE-REFERENCES.md for the bounded design study.
34 unmodified lines35363734 unmodified linesSimplified navigation, main result labels and explanations; placed checking controls, detailed evidence, extra charts and technical audits behind native disclosures. Main figures are the three existing outcome probabilities; models and split logic were not changed. The checks link explicitly opens its containing disclosure. Existing export/state regression remains passing. Phone preview at 390px had document width 390px, and all four views were inspected. This is developer usability review, not child user testing. Mechanical copy/layout detector raised two cramped-padding warnings on inherited statistic separators; rendered spacing was inspected.All eleven existing verification suites passed for this release, including export/state and multi-fold causality. Browser checked the missing-file recovery message, checks-link disclosure opening, and save disable after clearing. Independent source review prompted rounding and growth-parameter wording corrections. No formal accessibility certification or child user study was performed.34 unmodified lines3536373839404142434445464734 unmodified linesSimplified navigation, main result labels and explanations; placed checking controls, detailed evidence, extra charts and technical audits behind native disclosures. Main figures are the three existing outcome probabilities; models and split logic were not changed. The checks link explicitly opens its containing disclosure. Existing export/state regression remains passing. Phone preview at 390px had document width 390px, and all four views were inspected. This is developer usability review, not child user testing. Mechanical copy/layout detector raised two cramped-padding warnings on inherited statistic separators; rendered spacing was inspected.All eleven existing verification suites passed for this release, including export/state and multi-fold causality. Browser checked the missing-file recovery message, checks-link disclosure opening, and save disable after clearing. Independent source review prompted rounding and growth-parameter wording corrections. No formal accessibility certification or child user study was performed.## Apple-inspired refinement — 27 October 2026Replaced accumulated styling overrides with one coherent stylesheet. Centered workspace, compact navigation, consolidated controls, primary probability figures and optional chart representation. Existing element IDs retained with no duplicates. No model or scenario calculation changed.Added regression coverage for moving to the start of a selected view and revealing nested invalid settings. Browser verified invalid seed -1 with closed settings: both disclosures reopened and seed received focus. Cache repeat, checks-link opening, Help and Number games navigation inspected. Phone width390 matched scrollWidth390. Independent visual/source review inspected desktop and phone captures; stale Help copy was corrected. Browser research read official Apple references; no assets downloaded. No child usability study, Apple certification or comprehensive accessibility certification was performed.Mechanical detector found a skipped heading, corrected to h2, and two inherited separator-padding warnings. Desktop and mobile probability separators were visually inspected with sufficient spacing.All eleven regression suites passed. At 768px tablet width, scrollWidth also equaled768px. Reduced motion/transparency and increased-contrast alternatives were reviewed in source; preference emulation was not run.
20 unmodified lines2122232425262781 unmodified lines1091101111121131141151161 unmodified line11811912012112212312420 unmodified linescurrentReport.experiment_manifest={schema_version:1,view,inputs:identity||{sha256:null,reason:'Original normalized input series unavailable for this historical artifact.'},provenance:{source_metadata:source,source:source.name||'Saved Python benchmark',adjustments:source.synthetic?'Synthetic generator; no market adjustments.':'Unknown. Dates and closing prices alone do not establish vendor, corporate-action adjustment or point-in-time availability.'},configuration:{model_revision:currentReport.execution.model_revision,protocol:report.validation_protocol,target:report.target,threshold:report.threshold,model_details:report.model_details},split_boundaries:report.folds,inspection_history:inspectionJournal.snapshot(),limitations:'Fingerprint is computed from normalized dates and prices, not original file bytes. History is tab-local, bounded and resettable; it does not prove independent evaluation or prevent research overfitting.'};const q=report.latest_forecast.probabilities;$('stats').replaceChildren();for(const [label,value]of [['Big fall',percent(q[0])],['Small fall or no change',percent(q[1])],['Rise',percent(q[2])]]){const div=document.createElement('div'),span=document.createElement('span'),strong=document.createElement('strong');span.textContent=label;strong.textContent=value;div.append(span,strong);$('stats').append(div);}$('plain-explanation').textContent=`These are three possible outcomes for the next price. A ${percent(q[2])} chance of a rise means the model gives that outcome about ${Math.round(q[2]*100)} chances out of 100. It can still be wrong.`;const kind=report.precomputed?'Saved example':source.synthetic?'Made-up prices for learning':'Your price file';$('status').textContent=`${kind} · ${source.rows.toLocaleString()} prices. ${report.precomputed?'You are viewing a saved result.':'Your prices stay in this browser.'}`;if(cacheHit)$('status').textContent+=' Same settings: reused the earlier calculation.';81 unmodified linesconst key=JSON.stringify([MODEL_REVISION,protocol,dates,closes]);const cached=runCache.get(key);if(cached){render(cached.report,source,dates,cached.diagnostics,true,identity);return;}if(worker)worker.terminate();worker=new Worker('worker.js?v=20261026validation4');worker.onmessage=event=>{if(token!==operation)return;if(event.data.error){fail(event.data.error);return;}const report=event.data.report;report.predictions.forEach(r=>{r.feature_date=dates[r.feature_index];r.target_date=dates[r.target_index];});report.latest_forecast.feature_date=dates.at(-1);runCache.set(key,{report,diagnostics:event.data.diagnostics});render(report,source,dates,event.data.diagnostics,false,identity);worker.terminate();worker=null;};worker.onerror=()=>{if(token!==operation)return;fail('Browser calculation could not finish. Try fewer observations or download the Python project.');};worker.postMessage({closes,protocol});}catch(error){if(token===operation)fail(error.message);}}$('experiment').addEventListener('submit',event=>{event.preventDefault();focusResults=true;run();});function syncSource(){const csv=$('data-source').value==='csv';$('csv-controls').hidden=!csv;$('demo-settings').hidden=csv;$('observations').required=!csv;$('seed').required=!csv;$('observations').disabled=busy||csv;$('seed').disabled=busy||csv;$('csv-file').disabled=busy||!csv;$('observations').min=$('validation-protocol').value==='strict'?'1064':'850';if(!csv&&Number($('observations').value)<Number($('observations').min))$('demo-settings').open=true;$('protocol-help').textContent=$('validation-protocol').value==='strict'?'Learn, adjust, choose, then check on 200 later outcomes. Each step uses a separate set of prices. Needs at least 1,064 prices.':'Run several checks as more prices become available. Adjusting and choosing share the same examples, so this is easier to overfit. Files need 714 prices; made-up examples need 850.';}$('data-source').addEventListener('change',syncSource);$('validation-protocol').addEventListener('change',syncSource);$('experiment').addEventListener('input',()=>{$('setup-note').hidden=false;});$('experiment').addEventListener('change',()=>{$('setup-note').hidden=false;});1 unmodified line$('benchmark').addEventListener('click',async()=>{if(busy)return;const token=++operation;setBusy(true,'Opening a saved example. No new models are running…');try{const response=await fetch('benchmark.json',{cache:'no-cache'});if(token!==operation)return;if(!response.ok)throw Error('The benchmark file could not be loaded.');const report=await response.json();if(token!==operation)return;render(report,report.source,null,report.diagnostics);}catch(error){if(token===operation)fail(error.message);}});$('validation-link').addEventListener('click',()=>{$('check-details').open=true;});$('download').addEventListener('click',()=>{if(!currentReport)return;const blob=new Blob([JSON.stringify(currentReport,null,2)],{type:'application/json'}),url=URL.createObjectURL(blob),a=document.createElement('a');a.href=url;a.download='quantlab-report.json';a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);});document.querySelectorAll('[data-view]').forEach(button=>button.addEventListener('click',()=>{document.querySelectorAll('[data-view]').forEach(b=>{const active=b===button;b.classList.toggle('active',active);b.setAttribute('aria-pressed',String(active));});document.querySelectorAll('.view').forEach(section=>section.hidden=section.id!==button.dataset.view);}));function updateGame(){try{const g=QuantLabs.game($('game').value);$('game-output').textContent=g.mixed?'Keep your choice a surprise\n\nEach player picks heads or tails with a 50% chance. One wins what the other loses. If both choose at random this way, neither can do better by changing only their own plan. This is called a mixed-strategy balance.':'A choice that hurts the team\n\nEach player can cooperate or act selfishly. Acting selfishly gives more points whatever the other person does. But if both do it, they get only 1 point each. If both cooperate, they get 3 each. The best choice for one person can leave everyone worse off.';}catch(error){$('game-output').textContent=error.message;}}$('game').addEventListener('change',updateGame);function updateRisk(){try{const data=new FormData($('risk-form')),value=name=>Number(data.get(name));const price=QuantLabs.blackScholes(value('spot'),value('strike'),value('years'),.03,value('vol'));$('risk-output').textContent=`Right to buy · estimated price ${price.call.toFixed(4)}\nRight to sell · estimated price ${price.put.toFixed(4)}\n\nSmall-bet example · fraction of a pretend pot ${percent(QuantLabs.kelly(value('probability'),value('odds')))}\n\nThese are separate math examples. Option prices use the same money units as the starting price. The bet rule assumes only a win or a loss with fixed payouts; it is not a rule for buying shares.`;}catch(error){$('risk-output').textContent=error.message;}}20 unmodified lines2122232425262781 unmodified lines1091101111121131141151161171 unmodified line11912012112212312412520 unmodified linescurrentReport.experiment_manifest={schema_version:1,view,inputs:identity||{sha256:null,reason:'Original normalized input series unavailable for this historical artifact.'},provenance:{source_metadata:source,source:source.name||'Saved Python benchmark',adjustments:source.synthetic?'Synthetic generator; no market adjustments.':'Unknown. Dates and closing prices alone do not establish vendor, corporate-action adjustment or point-in-time availability.'},configuration:{model_revision:currentReport.execution.model_revision,protocol:report.validation_protocol,target:report.target,threshold:report.threshold,model_details:report.model_details},split_boundaries:report.folds,inspection_history:inspectionJournal.snapshot(),limitations:'Fingerprint is computed from normalized dates and prices, not original file bytes. History is tab-local, bounded and resettable; it does not prove independent evaluation or prevent research overfitting.'};const q=report.latest_forecast.probabilities;$('stats').replaceChildren();for(const [label,value]of [['Big fall',percent(q[0])],['Small fall or no change',percent(q[1])],['Rise',percent(q[2])]]){const div=document.createElement('div'),span=document.createElement('span'),strong=document.createElement('strong');span.textContent=label;strong.textContent=value;div.append(span,strong);$('stats').append(div);}$('plain-explanation').textContent=`A ${percent(q[2])} chance of a rise means about ${Math.round(q[2]*100)} out of 100 similar next steps, according to this model. It is a guess, not a promise.`;const kind=report.precomputed?'Saved example':source.synthetic?'Made-up prices for learning':'Your price file';$('status').textContent=`${kind} · ${source.rows.toLocaleString()} prices. ${report.precomputed?'You are viewing a saved result.':'Your prices stay in this browser.'}`;if(cacheHit)$('status').textContent+=' Same settings: reused the earlier calculation.';81 unmodified linesconst key=JSON.stringify([MODEL_REVISION,protocol,dates,closes]);const cached=runCache.get(key);if(cached){render(cached.report,source,dates,cached.diagnostics,true,identity);return;}if(worker)worker.terminate();worker=new Worker('worker.js?v=20261026validation4');worker.onmessage=event=>{if(token!==operation)return;if(event.data.error){fail(event.data.error);return;}const report=event.data.report;report.predictions.forEach(r=>{r.feature_date=dates[r.feature_index];r.target_date=dates[r.target_index];});report.latest_forecast.feature_date=dates.at(-1);runCache.set(key,{report,diagnostics:event.data.diagnostics});render(report,source,dates,event.data.diagnostics,false,identity);worker.terminate();worker=null;};worker.onerror=()=>{if(token!==operation)return;fail('Browser calculation could not finish. Try fewer observations or download the Python project.');};worker.postMessage({closes,protocol});}catch(error){if(token===operation)fail(error.message);}}$('experiment').addEventListener('invalid',event=>{for(let parent=event.target.parentElement;parent;parent=parent.parentElement){if(parent.tagName==='DETAILS')parent.open=true;}},true);$('experiment').addEventListener('submit',event=>{event.preventDefault();focusResults=true;run();});function syncSource(){const csv=$('data-source').value==='csv';$('csv-controls').hidden=!csv;$('demo-settings').hidden=csv;$('observations').required=!csv;$('seed').required=!csv;$('observations').disabled=busy||csv;$('seed').disabled=busy||csv;$('csv-file').disabled=busy||!csv;$('observations').min=$('validation-protocol').value==='strict'?'1064':'850';if(!csv&&Number($('observations').value)<Number($('observations').min)){$('demo-settings').open=true;$('setup-options').open=true;}$('protocol-help').textContent=$('validation-protocol').value==='strict'?'Learn, adjust, choose, then check on 200 later outcomes. Each step uses a separate set of prices. Needs at least 1,064 prices.':'Run several checks as more prices become available. Adjusting and choosing share the same examples, so this is easier to overfit. Files need 714 prices; made-up examples need 850.';}$('data-source').addEventListener('change',syncSource);$('validation-protocol').addEventListener('change',syncSource);$('experiment').addEventListener('input',()=>{$('setup-note').hidden=false;});$('experiment').addEventListener('change',()=>{$('setup-note').hidden=false;});1 unmodified line$('benchmark').addEventListener('click',async()=>{if(busy)return;const token=++operation;setBusy(true,'Opening a saved example. No new models are running…');try{const response=await fetch('benchmark.json',{cache:'no-cache'});if(token!==operation)return;if(!response.ok)throw Error('The benchmark file could not be loaded.');const report=await response.json();if(token!==operation)return;render(report,report.source,null,report.diagnostics);}catch(error){if(token===operation)fail(error.message);}});$('validation-link').addEventListener('click',()=>{$('check-details').open=true;});$('download').addEventListener('click',()=>{if(!currentReport)return;const blob=new Blob([JSON.stringify(currentReport,null,2)],{type:'application/json'}),url=URL.createObjectURL(blob),a=document.createElement('a');a.href=url;a.download='quantlab-report.json';a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);});document.querySelectorAll('[data-view]').forEach(button=>button.addEventListener('click',()=>{document.querySelectorAll('[data-view]').forEach(b=>{const active=b===button;b.classList.toggle('active',active);b.setAttribute('aria-pressed',String(active));});document.querySelectorAll('.view').forEach(section=>section.hidden=section.id!==button.dataset.view);const destination=$(button.dataset.view);destination.setAttribute('tabindex','-1');destination.focus({preventScroll:true});destination.scrollIntoView({block:'start'});}));function updateGame(){try{const g=QuantLabs.game($('game').value);$('game-output').textContent=g.mixed?'Keep your choice a surprise\n\nEach player picks heads or tails with a 50% chance. One wins what the other loses. If both choose at random this way, neither can do better by changing only their own plan. This is called a mixed-strategy balance.':'A choice that hurts the team\n\nEach player can cooperate or act selfishly. Acting selfishly gives more points whatever the other person does. But if both do it, they get only 1 point each. If both cooperate, they get 3 each. The best choice for one person can leave everyone worse off.';}catch(error){$('game-output').textContent=error.message;}}$('game').addEventListener('change',updateGame);function updateRisk(){try{const data=new FormData($('risk-form')),value=name=>Number(data.get(name));const price=QuantLabs.blackScholes(value('spot'),value('strike'),value('years'),.03,value('vol'));$('risk-output').textContent=`Right to buy · estimated price ${price.call.toFixed(4)}\nRight to sell · estimated price ${price.put.toFixed(4)}\n\nSmall-bet example · fraction of a pretend pot ${percent(QuantLabs.kelly(value('probability'),value('odds')))}\n\nThese are separate math examples. Option prices use the same money units as the starting price. The bet rule assumes only a win or a loss with fixed payouts; it is not a rule for buying shares.`;}catch(error){$('risk-output').textContent=error.message;}}
1 unmodified line234567891011121314151617181920212223242526272829303132336 unmodified lines404142434445462 unmodified lines495051525354551 unmodified line<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="theme-color" content="#f5f5f7"><meta name="description" content="Browser-local probability research with chronological validation and a reproducible Python benchmark."><meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'; worker-src 'self'; connect-src 'self'; img-src 'self' data:; object-src 'none'; base-uri 'none'"><title>QuantLab · probability research</title><link rel="stylesheet" href="style.css?v=20261027simple1"><script src="labs.js?v=20261026validation4" defer></script><script src="cache.js?v=20261026validation4" defer></script><script src="scenarios.js" defer></script><script src="provenance.js?v=20261026provenance1" defer></script><script src="app.js?v=20261027simple1" defer></script></head><body><a class="skip" href="#results">Skip to results</a><header><div><h1>QuantLab<span>What might happen next?</span></h1><p>Try made-up prices. See three guesses about the next recorded price, then learn how we checked them.</p></div></header><nav aria-label="Research views"><button class="tab active" data-view="workbench" aria-pressed="true">Price explorer</button><button class="tab" data-view="mathematics" aria-pressed="false">Number games</button><button class="tab" data-view="distributions" aria-pressed="false">What if?</button><button class="tab" data-view="methods" aria-pressed="false">Help</button></nav><main><section id="workbench" class="view"><aside><form id="experiment"><h2>Start here.</h2><p class="small">Press the blue button to try made-up prices. You can also use your own price file. The calculations happen in this browser.</p><label for="data-source">Choose your prices</label><select id="data-source"><option value="synthetic">Made-up prices</option><option value="csv">My price file</option></select><button id="run" class="primary" type="submit">Show my guess</button><details><summary>How we check the guesses</summary><label for="validation-protocol">Checking method</label><select id="validation-protocol" aria-describedby="protocol-help"><option value="strict">Separate practice and check</option><option value="classic">Repeated checks over time</option></select><p class="hint" id="protocol-help">The first method saves the last 200 answers for checking. It needs at least 1,064 prices. The other method checks several periods in order.</p></details><div id="csv-controls" hidden><label for="csv-file">Choose a CSV file · date,close</label><input id="csv-file" type="file" accept=".csv,text/csv"><p class="hint">Use a CSV text file with date and close columns, oldest date first (for example 2026-01-01). It needs 1,064–2,500 prices with the usual checking method, or at least 714 with repeated checks. Maximum file size: 2 MiB. Use prices adjusted for splits and dividends. Missing prices and dates are not filled in.</p></div><details id="demo-settings"><summary>Change the example</summary><label for="observations">Number of made-up prices</label><input id="observations" type="number" min="850" max="2500" step="1" value="1200" required><label for="seed">Example number</label><input id="seed" type="number" min="0" max="100000" step="1" value="42" required><p class="hint">The same example number makes the same pretend prices. Change it to try a different story.</p></details><details class="model-list"><summary>Meet the guessing methods</summary><h3>Four ways to make a guess</h3><p>Count earlier outcomes<br>Look for price patterns<br>Watch changing wiggles<br>Learn three outcome chances</p><span class="hint">Each method learns from earlier prices. The checking method decides which later answers are saved to check it.</span></details><p id="setup-note" class="hint" role="status" hidden>Settings changed. Press Show my guess to use them.</p></form><a class="results-shortcut" href="#results">Go to my results</a><details class="benchmark-control"><summary>Try a saved research example</summary><p class="small">See a saved example made with extra Python tools. Opening it does not run those tools.</p><button id="benchmark" class="secondary">Open saved example</button><p class="hint">Made-up prices · 900 price steps.<br>This opens saved results, not a new calculation.</p></details><div class="data-controls"><p id="cache-note" class="hint">This tab remembers up to 3 calculations for 10 minutes so repeats are quicker. Reload to forget them.</p><button id="clear-data" class="secondary" type="button">Clear my results</button></div></aside><div id="results" tabindex="-1"><div class="results-heading"><h2>Your price guess.</h2><p>Which of these three things might happen at the next recorded closing price?</p></div><div id="status" role="status" aria-live="polite">Getting the made-up price example ready…</div><p id="plain-explanation" class="small"></p><div class="stats" id="stats"><div><span>Big fall</span><strong>—</strong></div><div><span>Small fall or no change</span><strong>—</strong></div><div><span>Rise</span><strong>—</strong></div></div><details><summary>What counts as a big fall?</summary><p class="hint">A big fall is a drop greater than about 1.98%. The exact cutoff is a log return below −0.02. The middle group includes both cutoff boundaries, and a rise means any positive return.</p></details><details class="quality-panel"><summary>Check my prices</summary><p id="quality-summary" class="small">A data-quality summary appears after a run.</p><ul id="quality-warnings"></ul><pre id="quality-audit"></pre></details><details><summary>More about this guess</summary><p class="small" id="volatility-note"></p><p id="forecast-context" class="small"></p></details><section class="validation-panel" aria-labelledby="validation-title"><div class="evidence-heading"><h2 id="validation-title">Did the guesses help?</h2><a id="validation-link" href="#check-details" hidden>See the checks</a></div><p id="validation-verdict" class="evidence-verdict">Make a guess to see how we checked it.</p><details id="check-details" hidden><summary>See how we checked</summary><div id="validation-content" hidden>6 unmodified lines<details><summary>Interval sensitivity & assumptions</summary><p class="small">¹ Paired moving-block percentile intervals use 400 deterministic resamples. These condition on the existing predictions, omit refitting uncertainty, assume sufficient stationarity, and do not adjust for repeated research or multiple comparisons. Block lengths are sensitivity checks, not independent confirmations.</p><div class="table-scroll"><table><caption class="sr-only">Block-length sensitivity for paired loss differences</caption><thead><tr><th scope="col">Baseline</th><th scope="col">Block length</th><th scope="col">95% interval</th></tr></thead><tbody id="validation-intervals"></tbody></table></div><p id="validation-interpretation" class="small"></p></details><details><summary>Validation audit · JSON</summary><pre id="validation-audit"></pre></details></div></details></section><div class="charts"><section class="plot"><h2>What could happen next?</h2><p>Each bar shows a chance out of 100. Together they cover every outcome. Rounding may put the total just above or below 100%.</p><div id="probability-chart" class="chart"></div><p id="outcome-summary" class="outcome-summary"></p></section></div><details><summary>Explore more charts</summary><div class="charts"><section class="plot"><h2>How the chance of a drop changed</h2><p>Earlier guesses about a drop, checked against later answers.</p><div id="timeline-chart" class="chart"></div></section><section class="plot"><h2>Did the chances match what happened?</h2><p>Closer to the dashed line is better. A few answers cannot tell us much.</p><div id="calibration-chart" class="chart"></div></section><section class="plot"><h2>Which guessing method did better?</h2><p>Guessing errors on check data. Lower is better.</p><div id="score-chart" class="chart"></div></section></div></details><details><summary>For curious explorers · technical details</summary><details class="scores"><summary>Compare the exact scores</summary><p id="score-note" class="small">Comparative test scores appear after a run.</p><div class="table-scroll"><table><caption class="sr-only">Candidate test scores</caption><thead><tr><th scope="col">Model</th><th scope="col">Scored rows</th><th scope="col">Log loss</th><th scope="col">Brier</th><th scope="col">Up Brier</th><th scope="col">Downside Brier</th></tr></thead><tbody id="scores-body"></tbody></table></div></details><div class="audit-grid"><details><summary>What happened in this run?</summary><pre id="audit">No completed run.</pre></details><details><summary>Extra number checks</summary><pre id="diagnostics">No completed run.</pre></details><details><summary>Saved Python example details</summary><pre id="explanations">Load the precomputed Python benchmark to inspect its tree explanation.</pre></details></div></details><button id="download" class="secondary" disabled>Save my results · JSON file</button>2 unmodified lines</section><section id="mathematics" class="view" hidden><h2>Play with numbers.</h2><p>Try a game or explore a pretend deal. These examples are separate from the price guesses and do not show how to make money.</p><div class="lab-grid"><section class="plot"><h3>What happens when two people choose?</h3><label for="game">Choose a game</label><select id="game"><option value="prisoner">Teamwork trap · prisoner’s dilemma</option><option value="matching">Coin guessing · matching pennies</option></select><div id="game-output" class="calculation-result" aria-live="polite"></div></section><section class="plot"><h3>A price deal and a two-outcome bet</h3><p>A pretend option gives you a right to buy or sell later at an agreed price. The bet example has only two answers: win or lose. It is a math example, not a suggestion to bet.</p><form id="risk-form"><div class="input-grid"><label>Price today<input name="spot" type="number" min="1" step="1" value="100" required></label><label>Agreed deal price<input name="strike" type="number" min="1" step="1" value="100" required></label><label>Time left · years<input name="years" type="number" min="0.01" max="10" step="0.01" value="1" required></label><label>Yearly wiggle size · 0.20 means 20%<input name="vol" type="number" min="0.01" max="3" step="0.01" value="0.2" required></label><label>Chance of winning · 0.55 means 55%<input name="probability" type="number" min="0" max="1" step="0.01" value="0.55" required></label><label>Profit per 1 unit bet · if you win<input name="odds" type="number" min="0.1" max="10" step="0.1" value="1" required></label></div><button class="secondary">Calculate</button></form><div id="risk-output" class="calculation-result" aria-live="polite"></div><details><summary>Rules behind these examples</summary><p class="hint">Black–Scholes assumes a European option, no dividends, constant volatility and a 3% interest rate. The separate Kelly example uses capped quarter-Kelly for a bet with fixed win and loss payoffs. It is not a stock allocation.</p></details></section></div><section class="plot iv-lab"><h3>What wiggle size fits this deal price?</h3><p>An option is a right to buy or sell later at an agreed price. This calculator finds the yearly wiggle size that fits its price, using the Black–Scholes formula. It is separate from the price explorer.</p><form id="iv-form"><div class="input-grid"><label>Price today<input name="spot" type="number" min="0.01" value="100" step="0.01" required></label><label>Agreed deal price<input name="strike" type="number" min="0.01" value="100" step="0.01" required></label><label>Time left · years<input name="years" type="number" min="0.001" max="10" value="1" step="0.001" required></label><label>Yearly interest rate · 0.03 means 3%<input name="rate" type="number" min="-1" max="1" value="0.03" step="0.01" required></label><label>Option price · same units as price today<input name="premium" type="number" min="0" value="9.4134" step="0.0001" required></label><label>Kind of deal<select name="type"><option value="call">Right to buy · call</option><option value="put">Right to sell · put</option></select></label></div><button class="secondary">Find the wiggle size</button></form><div id="iv-output" class="calculation-result" aria-live="polite"></div><details><summary>How the answer was found</summary><pre id="iv-details"></pre></details></section></section><section id="distributions" class="view" hidden><h2>What if prices took surprise jumps?</h2><p class="scenario-note">Make a pretend world: prices wiggle and sometimes jump. You choose all the settings. This does not learn from your price file or predict real markets.</p><div class="scenario-layout"><form id="jump-form"><h3>Build a pretend year</h3><label>Yearly growth setting · 0.06 is about 6%<input name="mu" type="number" min="-1" max="1" step="0.01" value="0.06" required></label><label>Yearly wiggle size · 0.20 means 20%<input name="sigma" type="number" min="0.01" max="2" step="0.01" value="0.2" required></label><label>Average surprise jumps per year<input name="intensity" type="number" min="0" max="50" step="0.5" value="2" required></label><label>Average jump · log units<input name="jumpMean" type="number" min="-1" max="1" step="0.01" value="-0.08" required></label><label>How much jumps vary · log units<input name="jumpStd" type="number" min="0" max="1" step="0.01" value="0.1" required></label><label>How many price steps ahead?<input name="horizon" type="number" min="1" max="252" step="1" value="21" required></label><label>Drop cutoff · log units<input name="threshold" type="number" min="-2" max="2" step="0.01" value="-0.02" required></label><button class="primary">Show this pretend world</button><p class="hint">This pretend year has 252 equal price steps. For the log inputs, −0.02 is about a 1.98% drop and −0.08 is about a 7.69% drop. The growth setting includes the jumps. Over one year the average price change is exp(growth setting) − 1; 0.06 gives about 6.18%.</p></form><div><div id="jump-status" role="status" aria-live="polite"></div><div class="stats" id="jump-stats"></div><div class="charts"><section class="plot"><h3>Where might the price change land?</h3><p>Taller parts show where changes cluster. The area under a part of the curve gives its chance. Technical name: probability density (PDF).</p><div id="jump-pdf" class="chart"></div></section><section class="plot"><h3>What is the chance of this change or less?</h3><p>Read the blue curve for the world with jumps. Gray is a smooth bell-shaped comparison with the same mean and variance. Technical name: cumulative probability (CDF).</p><div id="jump-cdf" class="chart"></div></section></div><details><summary>Rules and calculation checks</summary><pre id="jump-audit"></pre></details></div></div></section><section id="methods" class="view prose" hidden><h2>A quick guide.</h2><p>QuantLab is a learning tool. It makes uncertain guesses about the next price, then checks earlier guesses against answers.</p><h3>Try it in three steps</h3><ol><li>Open <b>Price explorer</b>. Keep <b>Made-up prices</b> selected.</li><li>Press <b>Show my guess</b>. The three bars show the chances of all three outcomes.</li><li>Read <b>Did the guesses help?</b> A clever method is only useful if it beats a simple comparison.</li></ol><h3>What do the words mean?</h3><p><b>Chance:</b> how often something might happen in many similar situations. A 20% chance means about 20 out of 100, not a promise about one outcome.</p><p><b>Guessing method:</b> a set of rules that learns from earlier prices. Researchers call it a model.</p><p><b>Practice and check:</b> learn from earlier answers, then check on later answers that were kept apart. Looking at the check answers again and again can still make the test unfair.</p><p><b>Made-up prices:</b> a repeatable example, not real market data. Doing well on it does not show that a method works in real markets.</p><h3>Find your way around</h3><p><b>Price explorer</b> makes the three guesses. <b>Number games</b> has separate calculators. <b>What if?</b> lets you invent a world with surprise price jumps. The arrows beside extra details open them when you want to learn more.</p><h3>Your file stays in this browser</h3><p>Your CSV is read here and is not sent to a modeling server. A few recent calculations are kept temporarily in this tab. Use <b>Clear my results</b> or reload to remove the app’s saved data. The browser controls when memory is actually reclaimed.</p><p>These guesses can be wrong. They are not instructions to buy, sell or place a bet. This app has not shown that its guesses can make money.</p><details><summary>More detail · methods, privacy and limits</summary><h3>Data cleaning & privacy</h3><p>CSV parsing is bounded to 2 MiB, 2,500 price rows, 64 columns and 16,384 characters per field. We normalize header case, trim surrounding date/price whitespace and accept an initial byte-order mark. Every change is counted in the report. Duplicate dates, missing values and invalid prices are rejected with row numbers. Large moves, unchanged prices and calendar gaps are flagged and retained. We cannot verify whether prices are adjusted from two columns alone.</p><h3>Temporary caching</h3><p>Identical validated dates, prices, validation approach and model revision can reuse one of up to three fitted runs in this tab for ten minutes from computation. Cache hits are labeled. No uploaded prices or reports are written to localStorage, IndexedDB or a service-worker cache. Reloading or Clear my results removes application-held data; browser and operating-system memory reclamation is outside the app’s control. Public app assets may be cached by your browser or Hugging Face. The saved Python benchmark is fetched with revalidation.</p><h3>Validation contract</h3><p>At close t, returns, momentum, realized volatility and drawdown use only observations through t. Strict mode fits at least 500 training rows, temperatures on 150 later rows, and model choice on another 150 rows. A one-row embargo separates each boundary, followed by a reserved final 200-outcome evaluation. The coefficients, temperatures and model choice remain frozen for the latest forecast; features and EWMA state advance causally. Classic mode uses expanding training, a shared 150-row calibration/selection block and test blocks of up to 200. Repeatedly inspecting a reserved evaluation can still overfit it. This is not a permanently sealed holdout. Never tune using the test charts.</p><p>The target is the next observed close’s log return. Downside is below −0.02 log return, approximately −1.98% simple return; the middle event includes both boundaries, and the final event is a positive return. Probabilities sum to one.</p><h3>EWMA challenger</h3><p>The ridge mean stays frozen within each fold. Residual variance updates online with a fixed 20-observation half-life, using only outcomes already known before each forecast. Its own target never updates its own variance. The audit records volatility and timing; annualization assumes 252 equal-length observations and is only illustrative for gapped CSVs.</p><h3>Two distinct execution modes</h3><p><b>Browser experiment:</b> empirical frequencies, ridge with Gaussian residual probabilities, EWMA residual-volatility probabilities, and multinomial logistic regression are fitted to the selected data. Synthetic JavaScript draws differ from Python even with the same seed.</p><p><b>Precomputed Python benchmark:</b> a saved 900-observation synthetic run actually fitted scikit-learn, XGBoost and LightGBM, completed three training-only Optuna trials, computed SHAP and recorded MLflow metrics. Loading it does not execute those libraries. Download the full Python/Gradio project to run them locally.</p><h3>Implementation limits</h3><p>Classic calibration reuses data for temperatures and model choice. Strict mode separates these stages but cannot prevent repeated human inspection. Financial tails and nonstationarity can invalidate normal residual assumptions. Tiny test samples and sparse reliability bins are especially unreliable. The validation panel shows matched untuned and calibrated empirical baselines, fold populations, support warnings and descriptive paired uncertainty. It shows rolling loss, Brier score, entropy and event counts; it does not implement feature-drift testing or an automatic fallback strategy. The saved Python benchmark predates this panel and does not have row-matched baseline probabilities, so its new comparisons remain unavailable. SHAP explains uncalibrated raw class margins, not causal effects. Close-based information does not imply executable same-close fills. No costs, live trading or economic backtest is included.</p><p>TFT, DeepSurv, PPO, calibrated rough-volatility models, SPDE solvers and quantum algorithms remain unimplemented. Qiskit has no defined task here; TensorFlow would duplicate the optional PyTorch backend. The downloadable project records all requested books and access limits; full books were not read.</p><p>The implied-volatility solver and jump-mixture PDF/CDF explorer are independently implemented standard methods inspired by <a href="https://github.com/quantmind/quantflow">Quantflow</a>. No upstream source is copied and the Python package is not installed in this static host.</p><p><a href="METHODS.md">Detailed method & provenance notes</a> · <a href="CACHING.md">Caching design</a> · <a href="SECURITY-REVIEW.md">Data & cache security review</a> · <a href="python-project.zip" download>Full Python source and tests</a></p></details></section></main><footer><span>QuantLab · explore, ask, check.</span><span>Runs in your browser · free to use</span></footer></body></html>1 unmodified line234567891011121314151617181920212223242526272829306 unmodified lines37383940414243442 unmodified lines474849505152531 unmodified line<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="theme-color" content="#f5f5f7"><meta name="description" content="Explore price possibilities with simple examples and clear checks. Runs in your browser."><meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'; worker-src 'self'; connect-src 'self'; img-src 'self' data:; object-src 'none'; base-uri 'none'"><title>QuantLab · probability research</title><link rel="stylesheet" href="style.css?v=20261027apple1"><script src="labs.js?v=20261026validation4" defer></script><script src="cache.js?v=20261026validation4" defer></script><script src="scenarios.js" defer></script><script src="provenance.js?v=20261026provenance1" defer></script><script src="app.js?v=20261027apple1" defer></script></head><body><a class="skip" href="#results">Skip to results</a><header class="masthead"><div class="masthead-inner"><a class="wordmark" href="index.html" aria-label="QuantLab home">QuantLab</a><nav aria-label="Research views"><button class="tab active" data-view="workbench" aria-pressed="true">Price explorer</button><button class="tab" data-view="mathematics" aria-pressed="false">Number games</button><button class="tab" data-view="distributions" aria-pressed="false">What if?</button><button class="tab" data-view="methods" aria-pressed="false">Help</button></nav></div></header><main><div class="introduction"><h1>Make sense of chance.</h1><p>Explore three possibilities for the next price.</p></div><section id="workbench" class="view"><aside class="experiment-tools" aria-label="Price choices"><form id="experiment"><div class="experiment-row"><div class="price-picker"><label for="data-source">Choose your prices</label><select id="data-source"><option value="synthetic">Made-up prices</option><option value="csv">My price file</option></select></div><button id="run" class="primary" type="submit">Show my guess</button></div><div id="csv-controls" hidden><label for="csv-file">Choose a CSV file · date,close</label><input id="csv-file" type="file" accept=".csv,text/csv"><p class="hint">Use a CSV text file with date and close columns, oldest date first (for example 2026-01-01). It needs 1,064–2,500 prices with the usual checking method, or at least 714 with repeated checks. Maximum file size: 2 MiB. Use prices adjusted for splits and dividends. Missing prices and dates are not filled in.</p></div><details class="setup-options" id="setup-options"><summary>Change the example or checking method</summary><div class="settings-grid"><details id="demo-settings"><summary>Change the example</summary><label for="observations">Number of made-up prices</label><input id="observations" type="number" min="850" max="2500" step="1" value="1200" required><label for="seed">Example number</label><input id="seed" type="number" min="0" max="100000" step="1" value="42" required><p class="hint">The same example number makes the same pretend prices. Change it to try a different story.</p></details><details><summary>How we check the guesses</summary><label for="validation-protocol">Checking method</label><select id="validation-protocol" aria-describedby="protocol-help"><option value="strict">Separate practice and check</option><option value="classic">Repeated checks over time</option></select><p class="hint" id="protocol-help">The first method saves the last 200 answers for checking. It needs at least 1,064 prices. The other method checks several periods in order.</p></details><details class="model-list"><summary>Meet the guessing methods</summary><h2>Four ways to make a guess</h2><p>Count earlier outcomes<br>Look for price patterns<br>Watch changing wiggles<br>Learn three outcome chances</p><span class="hint">Each method learns from earlier prices. The checking method decides which later answers are saved to check it.</span></details></div></details><p id="setup-note" class="hint" role="status" hidden>Settings changed. Press Show my guess to use them.</p></form><details class="session-options"><summary>Saved examples & privacy</summary><details class="benchmark-control"><summary>Try a saved research example</summary><p class="small">See a saved example made with extra Python tools. Opening it does not run those tools.</p><button id="benchmark" class="secondary">Open saved example</button><p class="hint">Made-up prices · 900 price steps.<br>This opens saved results, not a new calculation.</p></details><div class="data-controls"><p id="cache-note" class="hint">This tab remembers up to 3 calculations for 10 minutes so repeats are quicker. Reload to forget them.</p><button id="clear-data" class="secondary" type="button">Clear my results</button></div></details></aside><div id="results" tabindex="-1"><div class="results-heading"><h2>Three ways it could go.</h2><p>Chances for the next recorded price. Each outcome is uncertain.</p></div><div class="stats" id="stats"><div><span>Big fall</span><strong>—</strong></div><div><span>Small fall or no change</span><strong>—</strong></div><div><span>Rise</span><strong>—</strong></div></div><div id="status" role="status" aria-live="polite">Getting the made-up price example ready…</div><p id="plain-explanation" class="small"></p><section class="validation-panel" aria-labelledby="validation-title"><div class="evidence-heading"><h2 id="validation-title">Did the guesses help?</h2><a id="validation-link" href="#check-details" hidden>See the checks</a></div><p id="validation-verdict" class="evidence-verdict">Make a guess to see how we checked it.</p><details id="check-details" hidden><summary>See how we checked</summary><div id="validation-content" hidden>6 unmodified lines<details><summary>Interval sensitivity & assumptions</summary><p class="small">¹ Paired moving-block percentile intervals use 400 deterministic resamples. These condition on the existing predictions, omit refitting uncertainty, assume sufficient stationarity, and do not adjust for repeated research or multiple comparisons. Block lengths are sensitivity checks, not independent confirmations.</p><div class="table-scroll"><table><caption class="sr-only">Block-length sensitivity for paired loss differences</caption><thead><tr><th scope="col">Baseline</th><th scope="col">Block length</th><th scope="col">95% interval</th></tr></thead><tbody id="validation-intervals"></tbody></table></div><p id="validation-interpretation" class="small"></p></details><details><summary>Validation audit · JSON</summary><pre id="validation-audit"></pre></details></div></details></section><details><summary>What counts as a big fall?</summary><p class="hint">A big fall is a drop greater than about 1.98%. The exact cutoff is a log return below −0.02. The middle group includes both cutoff boundaries, and a rise means any positive return.</p></details><details class="quality-panel"><summary>Check my prices</summary><p id="quality-summary" class="small">A data-quality summary appears after a run.</p><ul id="quality-warnings"></ul><pre id="quality-audit"></pre></details><details><summary>More about this guess</summary><p class="small" id="volatility-note"></p><p id="forecast-context" class="small"></p></details><details class="probability-detail"><summary>See the chances as a chart</summary><div class="charts"><section class="plot"><h2>What could happen next?</h2><p>Each bar shows a chance out of 100. Together they cover every outcome. Rounding may put the total just above or below 100%.</p><div id="probability-chart" class="chart"></div><p id="outcome-summary" class="outcome-summary"></p></section></div></details><details><summary>Explore more charts</summary><div class="charts"><section class="plot"><h2>How the chance of a drop changed</h2><p>Earlier guesses about a drop, checked against later answers.</p><div id="timeline-chart" class="chart"></div></section><section class="plot"><h2>Did the chances match what happened?</h2><p>Closer to the dashed line is better. A few answers cannot tell us much.</p><div id="calibration-chart" class="chart"></div></section><section class="plot"><h2>Which guessing method did better?</h2><p>Guessing errors on check data. Lower is better.</p><div id="score-chart" class="chart"></div></section></div></details><details><summary>For curious explorers · technical details</summary><details class="scores"><summary>Compare the exact scores</summary><p id="score-note" class="small">Comparative test scores appear after a run.</p><div class="table-scroll"><table><caption class="sr-only">Candidate test scores</caption><thead><tr><th scope="col">Model</th><th scope="col">Scored rows</th><th scope="col">Log loss</th><th scope="col">Brier</th><th scope="col">Up Brier</th><th scope="col">Downside Brier</th></tr></thead><tbody id="scores-body"></tbody></table></div></details><div class="audit-grid"><details><summary>What happened in this run?</summary><pre id="audit">No completed run.</pre></details><details><summary>Extra number checks</summary><pre id="diagnostics">No completed run.</pre></details><details><summary>Saved Python example details</summary><pre id="explanations">Load the precomputed Python benchmark to inspect its tree explanation.</pre></details></div></details><button id="download" class="secondary" disabled>Save my results · JSON file</button>2 unmodified lines</section><section id="mathematics" class="view" hidden><h2>Play with numbers.</h2><p>Try a game or explore a pretend deal. These examples are separate from the price guesses and do not show how to make money.</p><div class="lab-grid"><section class="plot"><h3>What happens when two people choose?</h3><label for="game">Choose a game</label><select id="game"><option value="prisoner">Teamwork trap · prisoner’s dilemma</option><option value="matching">Coin guessing · matching pennies</option></select><div id="game-output" class="calculation-result" aria-live="polite"></div></section><section class="plot"><h3>A price deal and a two-outcome bet</h3><p>A pretend option gives you a right to buy or sell later at an agreed price. The bet example has only two answers: win or lose. It is a math example, not a suggestion to bet.</p><form id="risk-form"><div class="input-grid"><label>Price today<input name="spot" type="number" min="1" step="1" value="100" required></label><label>Agreed deal price<input name="strike" type="number" min="1" step="1" value="100" required></label><label>Time left · years<input name="years" type="number" min="0.01" max="10" step="0.01" value="1" required></label><label>Yearly wiggle size · 0.20 means 20%<input name="vol" type="number" min="0.01" max="3" step="0.01" value="0.2" required></label><label>Chance of winning · 0.55 means 55%<input name="probability" type="number" min="0" max="1" step="0.01" value="0.55" required></label><label>Profit per 1 unit bet · if you win<input name="odds" type="number" min="0.1" max="10" step="0.1" value="1" required></label></div><button class="secondary">Calculate</button></form><div id="risk-output" class="calculation-result" aria-live="polite"></div><details><summary>Rules behind these examples</summary><p class="hint">Black–Scholes assumes a European option, no dividends, constant volatility and a 3% interest rate. The separate Kelly example uses capped quarter-Kelly for a bet with fixed win and loss payoffs. It is not a stock allocation.</p></details></section></div><section class="plot iv-lab"><h3>What wiggle size fits this deal price?</h3><p>An option is a right to buy or sell later at an agreed price. This calculator finds the yearly wiggle size that fits its price, using the Black–Scholes formula. It is separate from the price explorer.</p><form id="iv-form"><div class="input-grid"><label>Price today<input name="spot" type="number" min="0.01" value="100" step="0.01" required></label><label>Agreed deal price<input name="strike" type="number" min="0.01" value="100" step="0.01" required></label><label>Time left · years<input name="years" type="number" min="0.001" max="10" value="1" step="0.001" required></label><label>Yearly interest rate · 0.03 means 3%<input name="rate" type="number" min="-1" max="1" value="0.03" step="0.01" required></label><label>Option price · same units as price today<input name="premium" type="number" min="0" value="9.4134" step="0.0001" required></label><label>Kind of deal<select name="type"><option value="call">Right to buy · call</option><option value="put">Right to sell · put</option></select></label></div><button class="secondary">Find the wiggle size</button></form><div id="iv-output" class="calculation-result" aria-live="polite"></div><details><summary>How the answer was found</summary><pre id="iv-details"></pre></details></section></section><section id="distributions" class="view" hidden><h2>What if prices took surprise jumps?</h2><p class="scenario-note">Make a pretend world: prices wiggle and sometimes jump. You choose all the settings. This does not learn from your price file or predict real markets.</p><div class="scenario-layout"><form id="jump-form"><h3>Build a pretend year</h3><label>Yearly growth setting · 0.06 is about 6%<input name="mu" type="number" min="-1" max="1" step="0.01" value="0.06" required></label><label>Yearly wiggle size · 0.20 means 20%<input name="sigma" type="number" min="0.01" max="2" step="0.01" value="0.2" required></label><label>Average surprise jumps per year<input name="intensity" type="number" min="0" max="50" step="0.5" value="2" required></label><label>Average jump · log units<input name="jumpMean" type="number" min="-1" max="1" step="0.01" value="-0.08" required></label><label>How much jumps vary · log units<input name="jumpStd" type="number" min="0" max="1" step="0.01" value="0.1" required></label><label>How many price steps ahead?<input name="horizon" type="number" min="1" max="252" step="1" value="21" required></label><label>Drop cutoff · log units<input name="threshold" type="number" min="-2" max="2" step="0.01" value="-0.02" required></label><button class="primary">Show this pretend world</button><p class="hint">This pretend year has 252 equal price steps. For the log inputs, −0.02 is about a 1.98% drop and −0.08 is about a 7.69% drop. The growth setting includes the jumps. Over one year the average price change is exp(growth setting) − 1; 0.06 gives about 6.18%.</p></form><div><div id="jump-status" role="status" aria-live="polite"></div><div class="stats" id="jump-stats"></div><div class="charts"><section class="plot"><h3>Where might the price change land?</h3><p>Taller parts show where changes cluster. The area under a part of the curve gives its chance. Technical name: probability density (PDF).</p><div id="jump-pdf" class="chart"></div></section><section class="plot"><h3>What is the chance of this change or less?</h3><p>Read the blue curve for the world with jumps. Gray is a smooth bell-shaped comparison with the same mean and variance. Technical name: cumulative probability (CDF).</p><div id="jump-cdf" class="chart"></div></section></div><details><summary>Rules and calculation checks</summary><pre id="jump-audit"></pre></details></div></div></section><section id="methods" class="view prose" hidden><h2>A quick guide.</h2><p>QuantLab is a learning tool. It makes uncertain guesses about the next price, then checks earlier guesses against answers.</p><h3>Try it in three steps</h3><ol><li>Open <b>Price explorer</b>. Keep <b>Made-up prices</b> selected.</li><li>Press <b>Show my guess</b>. The three numbers show the chances of all three outcomes.</li><li>Read <b>Did the guesses help?</b> A clever method is only useful if it beats a simple comparison.</li></ol><h3>What do the words mean?</h3><p><b>Chance:</b> how often something might happen in many similar situations. A 20% chance means about 20 out of 100, not a promise about one outcome.</p><p><b>Guessing method:</b> a set of rules that learns from earlier prices. Researchers call it a model.</p><p><b>Practice and check:</b> learn from earlier answers, then check on later answers that were kept apart. Looking at the check answers again and again can still make the test unfair.</p><p><b>Made-up prices:</b> a repeatable example, not real market data. Doing well on it does not show that a method works in real markets.</p><h3>Find your way around</h3><p><b>Price explorer</b> makes the three guesses. <b>Number games</b> has separate calculators. <b>What if?</b> lets you invent a world with surprise price jumps. The arrows beside extra details open them when you want to learn more.</p><h3>Your file stays in this browser</h3><p>Your CSV is read here and is not sent to a modeling server. A few recent calculations are kept temporarily in this tab. Use <b>Clear my results</b> or reload to remove the app’s saved data. The browser controls when memory is actually reclaimed.</p><p>These guesses can be wrong. They are not instructions to buy, sell or place a bet. This app has not shown that its guesses can make money.</p><details><summary>More detail · methods, privacy and limits</summary><h3>Data cleaning & privacy</h3><p>CSV parsing is bounded to 2 MiB, 2,500 price rows, 64 columns and 16,384 characters per field. We normalize header case, trim surrounding date/price whitespace and accept an initial byte-order mark. Every change is counted in the report. Duplicate dates, missing values and invalid prices are rejected with row numbers. Large moves, unchanged prices and calendar gaps are flagged and retained. We cannot verify whether prices are adjusted from two columns alone.</p><h3>Temporary caching</h3><p>Identical validated dates, prices, validation approach and model revision can reuse one of up to three fitted runs in this tab for ten minutes from computation. Cache hits are labeled. No uploaded prices or reports are written to localStorage, IndexedDB or a service-worker cache. Reloading or Clear my results removes application-held data; browser and operating-system memory reclamation is outside the app’s control. Public app assets may be cached by your browser or Hugging Face. The saved Python benchmark is fetched with revalidation.</p><h3>Validation contract</h3><p>At close t, returns, momentum, realized volatility and drawdown use only observations through t. Strict mode fits at least 500 training rows, temperatures on 150 later rows, and model choice on another 150 rows. A one-row embargo separates each boundary, followed by a reserved final 200-outcome evaluation. The coefficients, temperatures and model choice remain frozen for the latest forecast; features and EWMA state advance causally. Classic mode uses expanding training, a shared 150-row calibration/selection block and test blocks of up to 200. Repeatedly inspecting a reserved evaluation can still overfit it. This is not a permanently sealed holdout. Never tune using the test charts.</p><p>The target is the next observed close’s log return. Downside is below −0.02 log return, approximately −1.98% simple return; the middle event includes both boundaries, and the final event is a positive return. Probabilities sum to one.</p><h3>EWMA challenger</h3><p>The ridge mean stays frozen within each fold. Residual variance updates online with a fixed 20-observation half-life, using only outcomes already known before each forecast. Its own target never updates its own variance. The audit records volatility and timing; annualization assumes 252 equal-length observations and is only illustrative for gapped CSVs.</p><h3>Two distinct execution modes</h3><p><b>Browser experiment:</b> empirical frequencies, ridge with Gaussian residual probabilities, EWMA residual-volatility probabilities, and multinomial logistic regression are fitted to the selected data. Synthetic JavaScript draws differ from Python even with the same seed.</p><p><b>Precomputed Python benchmark:</b> a saved 900-observation synthetic run actually fitted scikit-learn, XGBoost and LightGBM, completed three training-only Optuna trials, computed SHAP and recorded MLflow metrics. Loading it does not execute those libraries. Download the full Python/Gradio project to run them locally.</p><h3>Implementation limits</h3><p>Classic calibration reuses data for temperatures and model choice. Strict mode separates these stages but cannot prevent repeated human inspection. Financial tails and nonstationarity can invalidate normal residual assumptions. Tiny test samples and sparse reliability bins are especially unreliable. The validation panel shows matched untuned and calibrated empirical baselines, fold populations, support warnings and descriptive paired uncertainty. It shows rolling loss, Brier score, entropy and event counts; it does not implement feature-drift testing or an automatic fallback strategy. The saved Python benchmark predates this panel and does not have row-matched baseline probabilities, so its new comparisons remain unavailable. SHAP explains uncalibrated raw class margins, not causal effects. Close-based information does not imply executable same-close fills. No costs, live trading or economic backtest is included.</p><p>TFT, DeepSurv, PPO, calibrated rough-volatility models, SPDE solvers and quantum algorithms remain unimplemented. Qiskit has no defined task here; TensorFlow would duplicate the optional PyTorch backend. The downloadable project records all requested books and access limits; full books were not read.</p><p>The implied-volatility solver and jump-mixture PDF/CDF explorer are independently implemented standard methods inspired by <a href="https://github.com/quantmind/quantflow">Quantflow</a>. No upstream source is copied and the Python package is not installed in this static host.</p><p><a href="METHODS.md">Detailed method & provenance notes</a> · <a href="CACHING.md">Caching design</a> · <a href="SECURITY-REVIEW.md">Data & cache security review</a> · <a href="python-project.zip" download>Full Python source and tests</a></p></details></section></main><footer><span>QuantLab · explore, ask, check.</span><span>Runs in your browser · free to use</span></footer></body></html>
1234567891011121314151617181920212223242526:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1d1d1f;background:#f5f5f7;font-synthesis:none;font-size:15px;line-height:1.5;--blue:#0066cc;--secondary:#626268;--line:#dedee3}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button,summary{cursor:pointer}a{color:var(--blue);text-underline-offset:4px}a:hover{text-decoration:underline}::selection{background:#cde5ff;color:#1d1d1f}:focus-visible{outline:3px solid #0071e3;outline-offset:4px}header{max-width:1440px;margin:auto;padding:48px 48px 32px;display:flex;align-items:flex-start;justify-content:space-between;gap:24px}h1{font-size:24px;line-height:1.1;letter-spacing:-.035em;margin:0;font-weight:650}h1 span{display:block;font-size:40px;line-height:1.15;letter-spacing:-.035em;margin-top:14px}header p{color:var(--secondary);margin:16px 0 0;max-width:65ch;font-size:17px}.source-link{font-size:13px;white-space:nowrap;margin-top:5px;text-decoration:none}nav{display:flex;gap:4px;padding:5px;background:#e8e8ed;border-radius:12px;width:max-content;max-width:calc(100% - 48px);margin:0 auto 36px}.tab{border:0;background:transparent;color:#515158;padding:10px 28px;border-radius:8px;font-size:14px;font-weight:550;min-height:42px}.tab.active{background:#fff;color:#1d1d1f;box-shadow:0 2px 5px #0000000d}.tab:hover:not(.active){background:#ddddE3}main{max-width:1440px;margin:auto;padding:0 48px 60px}.view[hidden],[hidden]{display:none!important}#workbench{display:grid;grid-template-columns:260px minmax(0,1fr);gap:36px;align-items:start}aside{background:#fff;border-radius:16px;padding:24px;position:sticky;top:24px}h2,h3,p{margin-top:0}h2{font-size:22px;letter-spacing:-.025em;line-height:1.2;font-weight:650;margin-bottom:10px}h3{font-size:17px;line-height:1.3;margin-bottom:12px;font-weight:600}p{margin-bottom:16px}label{display:block;font-size:13px;font-weight:550;margin:20px 0 7px}input,select{width:100%;min-height:44px;border:1px solid #b8b8bf;border-radius:9px;background:#fff;color:#1d1d1f;padding:10px 12px;caret-color:var(--blue)}input[type=file]{font-size:12px;padding:9px;overflow:hidden}input::file-selector-button{border:0;background:#eeeef2;border-radius:5px;padding:5px;color:#1d1d1f;margin-right:5px}.small,.hint,.plot>p,.scenario-note{color:var(--secondary);font-size:13px;line-height:1.55}.hint{font-size:12px;margin-top:10px}.primary,.secondary{min-height:44px;border:0;border-radius:10px;padding:11px 16px;font-weight:550;font-size:14px}.primary{background:#0071e3;color:white;width:100%;margin-top:24px}.primary:hover{background:#0066cc}.secondary{background:#e8e8ed;color:#1d1d1f}.secondary:hover{background:#dddde3}button:disabled{opacity:.5;cursor:wait}.benchmark-control{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}details{border-top:1px solid var(--line);padding:17px 0}summary{font-weight:550;font-size:14px;line-height:1.5}details[open]>summary{margin-bottom:16px}#demo-settings{margin-top:24px}.model-list{margin-top:0}.model-list p{font-size:13px}.benchmark-control .secondary{width:100%}.results-heading{margin:5px 0 20px}.results-heading h2{font-size:30px;margin-bottom:5px}.results-heading p{color:var(--secondary);margin-bottom:0}#status,#jump-status{font-size:13px;line-height:1.6;color:#53535a;background:#ececf1;border-radius:10px;padding:13px 16px;margin-bottom:24px}.error,.lab-error{color:#a11b1b!important;background:#fff0f0!important}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:24px 0 8px}.stats>div{padding:0 16px;border-right:1px solid var(--line)}.stats>div:first-child{padding-left:0}.stats>div:last-child{border:0}.stats span{font-size:12px;color:var(--secondary);display:block}.stats strong{display:block;font-size:30px;font-weight:600;letter-spacing:-.035em;line-height:1.6;font-variant-numeric:tabular-nums}#volatility-note{margin:16px 0 28px}.charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.plot{background:#fff;border-radius:16px;padding:24px;min-width:0}.plot h2{font-size:18px;margin-bottom:6px}.plot p{margin-bottom:12px}.chart{width:100%;min-height:160px}.chart svg{width:100%;display:block;overflow:visible}.chart text{font-family:inherit;font-size:11px;fill:#626268;font-variant-numeric:tabular-nums}.chart .grid{stroke:#e9e9ed;stroke-width:1}.chart rect{rx:3}.scores{margin-top:28px}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:right;font-size:13px;font-variant-numeric:tabular-nums}th,td{padding:13px 10px;border-bottom:1px solid var(--line);white-space:nowrap}th{font-weight:550;color:var(--secondary)}th:first-child,td:first-child{text-align:left}.audit-grid{margin-bottom:20px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.7;background:#eaeaf0;border-radius:10px;padding:20px;max-height:400px;overflow:auto;tab-size:2}.lab-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:32px}.input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.input-grid label{margin-top:12px}.input-grid input,.input-grid select{margin-top:7px}.input-grid+button{margin-top:22px}.iv-lab{margin-top:24px}.scenario-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:32px;margin-top:28px}.scenario-layout>form{background:#fff;border-radius:16px;padding:24px}.scenario-layout .stats{grid-template-columns:repeat(3,minmax(0,1fr))}.scenario-layout .stats strong{font-size:26px}.scenario-layout .charts{margin:24px 0}.prose{max-width:760px;margin:auto}.prose h3{margin-top:32px}.prose p{line-height:1.8;color:#515158}.view>h2{font-size:32px;letter-spacing:-.035em}.view>p{max-width:75ch;color:var(--secondary)}footer{max-width:1440px;margin:auto;padding:24px 48px;display:flex;justify-content:space-between;gap:20px;font-size:12px;color:var(--secondary);border-top:1px solid var(--line)}.sr-only,.skip:not(:focus){position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.skip:focus{display:block;padding:16px}*{scrollbar-color:#b8b8c0 #f5f5f7;scrollbar-width:thin}@media(min-width:1100px){#probability-chart{min-height:200px}}@media(max-width:1000px){header,main{padding-left:28px;padding-right:28px}#workbench{grid-template-columns:230px minmax(0,1fr);gap:24px}.charts{grid-template-columns:1fr}.stats{grid-template-columns:1fr 1fr;row-gap:16px}.stats>div:nth-child(3){padding-left:0}.stats>div:nth-child(2){border:0}.scenario-layout{grid-template-columns:230px minmax(0,1fr)}.scenario-layout .stats{grid-template-columns:1fr}.scenario-layout .stats>div{padding:0;border:0}}@media(max-width:700px){header{padding:28px 20px 24px;display:block}h1{font-size:21px}h1 span{font-size:32px}header p{font-size:15px}.source-link{display:inline-block;margin-top:18px}nav{margin-bottom:24px;max-width:calc(100% - 40px);width:calc(100% - 40px);gap:2px}.tab{padding:9px 6px;font-size:12px;flex:1}main{padding:0 20px 36px}#workbench,.scenario-layout,.lab-grid{grid-template-columns:1fr;gap:24px}aside{position:static;padding:24px}aside h2{font-size:22px}.primary{margin-top:20px}.results-heading h2{font-size:28px}.stats strong{font-size:30px}.plot{padding:20px}.input-grid{gap:0 12px}input,select{font-size:16px}.view>h2{font-size:28px}.scenario-layout .stats{grid-template-columns:1fr 1fr;gap:16px}.scenario-layout .stats>div:last-child{grid-column:1/-1}.scenario-layout .stats strong{font-size:25px}footer{padding:24px 20px;display:block}footer span{display:block;margin-bottom:6px}}@media(prefers-reduced-motion:no-preference){.tab{transition:background .18s ease-out,box-shadow .18s ease-out}button{transition:background .18s ease-out}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}/* Finishing details shared across the research views. */.results-shortcut{display:block;font-size:13px;text-align:center;margin-top:14px;text-decoration:none;min-height:28px;padding:4px}.calculation-result{white-space:pre-line;line-height:1.75;background:#f5f5f7;border-radius:12px;padding:20px;margin:24px 0 16px;color:#34343a;font-size:14px;font-variant-numeric:tabular-nums}.outcome-summary{border-top:1px solid var(--line);padding-top:14px;margin:12px 0 0!important;font-size:12px!important;color:#515158!important;font-variant-numeric:tabular-nums}#setup-note{color:#805600;background:#fff7df;padding:10px 12px;border-radius:8px}#results{scroll-margin-top:24px}#results:focus{outline:none}#results:focus-visible .results-heading{outline:3px solid #0071e3;outline-offset:6px;border-radius:4px}summary{min-height:32px;padding:4px 0}summary:hover{color:var(--blue)}button:active:not(:disabled){filter:brightness(.95)}.lab-grid{align-items:start}.plot>form+.calculation-result{margin-top:24px}#iv-details{margin-bottom:0}input:disabled,select:disabled{background:#f5f5f7;color:#626268;cursor:wait}.tab{min-height:44px}.chart text{font-size:12px}@media(max-width:700px){header{padding-top:24px;padding-bottom:20px}h1 span{font-size:30px;margin-top:10px}header p{margin-top:12px}nav{margin-bottom:20px}.tab{white-space:nowrap;font-size:11px}aside{padding:20px}aside details{padding:10px 0}aside .small{margin-bottom:12px}aside label{margin-top:14px}#demo-settings{margin-top:16px}.benchmark-control{margin-top:16px;padding-top:14px}aside .primary{margin-top:14px}.results-shortcut{margin-top:8px}.calculation-result{padding:16px}.chart{min-height:0}.chart text{font-size:13px}.stats span{font-size:12px;line-height:1.5}.stats strong{font-size:29px}.results-heading{margin-top:0}}.data-controls{border-top:1px solid var(--line);margin-top:20px;padding-top:8px}.data-controls button{width:100%;font-size:12px}.quality-panel{margin:20px 0 0}.quality-panel.has-warnings>summary{color:#805600}.quality-panel ul{padding-left:20px;font-size:13px;color:#805600;line-height:1.65}.quality-panel li+li{margin-top:8px}.quality-panel pre:empty{display:none}.quality-panel .small{margin-bottom:12px}.validation-panel{background:#fff;border-radius:16px;padding:24px;margin:24px 0}.evidence-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.evidence-heading h2{font-size:22px}.evidence-heading a{font-size:12px;white-space:nowrap}.evidence-verdict{font-size:21px;font-weight:600;letter-spacing:-.025em;margin:8px 0 12px;line-height:1.3}.validation-panel details{padding:14px 0}.validation-panel details:last-child{padding-bottom:0}.validation-panel table{font-size:12px}.validation-panel table caption{text-align:left}.validation-panel .chart{max-width:820px}.evidence-warnings{font-size:12px;line-height:1.7;color:#805600;padding-left:20px}.evidence-warnings li+li{margin-top:7px}#validation-scope{max-width:75ch}#forecast-context{margin-bottom:20px}#validation-details{scroll-margin-top:24px}@media(max-width:700px){.validation-panel{padding:20px}.evidence-heading{display:block}.evidence-heading a{display:inline-block;min-height:32px}.evidence-verdict{font-size:21px}.validation-panel table{font-size:12px}}@media(min-width:701px){aside{max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);overflow-y:auto}}#results,.validation-panel{min-width:0}@media(max-width:700px){#workbench{grid-template-columns:minmax(0,1fr)}#validation-baseline-table{table-layout:fixed;width:100%;font-size:11px}#validation-baseline-table th,#validation-baseline-table td{white-space:normal;overflow-wrap:anywhere;padding:12px 5px;vertical-align:top}#validation-baseline-table th:first-child{width:29%}#validation-baseline-table th:nth-child(2){width:18%}#validation-baseline-table th:nth-child(3){width:23%}#validation-baseline-table th:nth-child(4){width:30%}}/* Beginner reading path: outcomes first, methods on request. */#plain-explanation{font-size:17px;line-height:1.65;max-width:64ch;margin:12px 0 24px;color:var(--ink,#1d1d1f)}#stats{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:20px}#stats span{font-size:14px;line-height:1.5}#stats strong{font-size:32px}#results>details,.beginner-details{margin:18px 0}#results>.charts{margin:24px 0}.charts>.plot:only-child{grid-column:1/-1}#results>details .charts{margin-top:20px}#results summary{font-size:15px;min-height:44px;display:list-item;padding:10px 0}#results .validation-panel .evidence-verdict{font-size:20px;line-height:1.45;max-width:50ch}.prose li{margin:12px 0;line-height:1.7}.prose ol,.prose ul{padding-left:24px}@media(max-width:700px){#stats{grid-template-columns:1fr;gap:12px}#stats>div{border:0;border-bottom:1px solid var(--line);padding:0 0 12px;display:flex;justify-content:space-between;align-items:center;gap:20px}#stats>div:last-child{border:0}#stats strong{font-size:28px}#plain-explanation{font-size:16px}.tab{font-size:12px;white-space:normal}#status{margin-bottom:16px}}h1,h2,h3{text-wrap:balance}button,a,summary{touch-action:manipulation}1234567891011121314151617181920212223242526:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-optical-sizing:auto;font-synthesis:none;color:#1d1d1f;background:#f5f5f7;font-size:16px;line-height:1.5;--blue:#0066cc;--secondary:#626268;--line:#dedee3;--surface:#fff;--radius:16px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button,a,summary{touch-action:manipulation}button,summary{cursor:pointer}a{color:var(--blue);text-underline-offset:4px}a:hover{text-decoration:underline}::selection{background:#cde5ff;color:#1d1d1f}:focus-visible{outline:3px solid #0071e3;outline-offset:4px}[hidden],.view[hidden]{display:none!important}.sr-only,.skip:not(:focus){position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.skip:focus{display:block;padding:16px;background:white}h1,h2,h3,p{margin-top:0}h1,h2,h3{text-wrap:balance}h2{font-size:28px;font-weight:650;line-height:1.15;letter-spacing:-.025em;margin-bottom:16px}h3{font-size:20px;font-weight:600;line-height:1.3;letter-spacing:-.015em;margin-bottom:12px}p{margin-bottom:20px}.small,.hint,.plot>p,.scenario-note{color:var(--secondary);font-size:14px;line-height:1.6}.hint{font-size:13px;margin-top:12px}.small{max-width:72ch}/* Navigation is a separate, lightweight layer. Results stay opaque. */.masthead{position:sticky;top:0;z-index:10;background:rgba(250,250,252,.93);border-bottom:1px solid #dedee3;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}.masthead-inner{max-width:1100px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:32px;padding:12px 40px}.wordmark{font-size:23px;font-weight:650;letter-spacing:-.04em;color:#1d1d1f;text-decoration:none}.wordmark:hover{text-decoration:none}nav{display:flex;align-items:center;gap:8px}.tab{border:0;background:transparent;color:#626268;padding:11px 14px;min-height:44px;border-radius:8px;font-size:13px;font-weight:500}.tab.active{color:#1d1d1f;background:#e9e9ee}.tab:hover:not(.active){color:#1d1d1f;background:#eeeef2}main{max-width:1100px;margin:auto;padding:0 40px 80px}.introduction{text-align:center;padding:34px 0 28px}.introduction h1{font-size:clamp(36px,5vw,54px);line-height:1.06;font-weight:650;letter-spacing:-.04em;margin:0 0 14px}.introduction p{font-size:20px;line-height:1.45;color:var(--secondary);margin-bottom:0}body:has(#workbench[hidden]) .introduction{display:none}.view>h2{font-size:40px;letter-spacing:-.035em;margin-top:48px}.view>p{max-width:72ch;color:var(--secondary)}.view{scroll-margin-top:90px}#workbench{display:flex;flex-direction:column;gap:28px}aside{width:100%;min-width:0}.experiment-tools{padding:0 4px}.experiment-row{display:flex;align-items:end;justify-content:center;gap:12px}.price-picker{width:min(100%,310px)}label{display:block;font-size:13px;font-weight:550;margin:18px 0 8px}input,select{width:100%;min-height:48px;border:1px solid #b8b8bf;border-radius:10px;background:#fff;color:#1d1d1f;padding:11px 14px;caret-color:var(--blue)}.price-picker label{margin-top:0}input[type=file]{font-size:14px;padding:9px;overflow:hidden}input::file-selector-button{border:0;background:#eeeef2;border-radius:6px;padding:6px;color:#1d1d1f;margin-right:8px}.primary,.secondary{min-height:48px;border:0;border-radius:24px;padding:12px 24px;font-size:14px;font-weight:550}.primary{background:#0071e3;color:#fff;white-space:nowrap}.primary:hover{background:#0066cc}.secondary{background:#e8e8ed;color:#1d1d1f}.secondary:hover{background:#dddde3}button:disabled{opacity:.5;cursor:wait}input:disabled,select:disabled{background:#f5f5f7;color:#626268;cursor:wait}button:active:not(:disabled){transform:scale(.98)}.setup-options,.session-options{border:0;padding:8px 0 0;text-align:center}.setup-options>summary,.session-options>summary{display:list-item;list-style-position:inside;color:var(--blue);font-size:13px;min-height:36px;padding:8px}.setup-options[open],.session-options[open]{text-align:left}.setup-options[open]>summary,.session-options[open]>summary{display:list-item}.settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;background:white;border-radius:var(--radius);padding:24px;margin-top:8px}.settings-grid>details{border:0;padding:0;min-width:0}.model-list p{font-size:14px}.benchmark-control{margin-top:16px}.data-controls{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:16px 0}.data-controls p{margin:0}.data-controls button{flex-shrink:0}#csv-controls{max-width:640px;margin:16px auto}#setup-note{color:#805600;background:#fff7df;padding:12px 16px;border-radius:10px;margin:12px 0 0}/* The actual probabilities are the product's focal point. */#results{width:100%;min-width:0;background:var(--surface);border-radius:var(--radius);padding:36px 48px;scroll-margin-top:88px}#results:focus{outline:none}#results:focus-visible{outline:3px solid #0071e3;outline-offset:5px}.results-heading{text-align:center;max-width:650px;margin:0 auto 24px}.results-heading h2{font-size:30px;letter-spacing:-.03em;line-height:1.1;margin-bottom:12px}.results-heading p{font-size:16px;line-height:1.5;color:var(--secondary);max-width:54ch;margin:auto}#status,#jump-status{font-size:13px;line-height:1.65;color:#626268;margin:16px auto;max-width:75ch}#status{text-align:center}#plain-explanation{max-width:60ch;margin:20px auto 24px;text-align:center;font-size:16px;line-height:1.65;color:#515158}.error,.lab-error{color:#a11b1b!important;background:#fff0f0!important;padding:12px 16px;border-radius:10px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));font-variant-numeric:tabular-nums;margin:28px 0;gap:24px}.stats>div{min-width:0}.stats span{font-size:13px;line-height:1.5;color:var(--secondary);display:block}.stats strong{display:block;font-size:36px;font-weight:600;letter-spacing:-.04em;line-height:1.2;margin-top:8px}#stats{text-align:center;margin:28px 0 32px;gap:0}#stats>div{padding:0 20px;border-right:1px solid var(--line)}#stats>div:last-child{border:0}#stats span{font-size:14px}#stats strong{font-size:clamp(36px,5vw,54px);font-weight:600;line-height:1.1;margin-top:12px}#stats>div:last-child strong{color:var(--blue)}.validation-panel{min-width:0;background:#f5f5f7;border-radius:12px;padding:24px 28px;margin:28px 0}.evidence-heading{display:flex;align-items:baseline;justify-content:space-between;gap:20px}.evidence-heading h2{font-size:18px;letter-spacing:-.015em;margin-bottom:12px}.evidence-heading a{font-size:13px;min-height:32px;white-space:nowrap}.evidence-verdict{font-size:20px;font-weight:550;line-height:1.4;letter-spacing:-.02em;margin:0;max-width:50ch}.validation-panel table{font-size:12px}.validation-panel .chart{max-width:820px}.evidence-warnings{font-size:13px;line-height:1.7;color:#805600;padding-left:20px}.evidence-warnings li+li{margin-top:8px}#validation-scope{max-width:75ch}#check-details{margin-top:18px}#check-details,#validation-details{scroll-margin-top:90px}details{border-top:1px solid var(--line);padding:14px 0}summary{min-height:44px;padding:10px 0;font-weight:550;font-size:14px;line-height:1.5}summary:hover{color:var(--blue)}details[open]>summary{margin-bottom:14px}details details{margin-top:12px}.quality-panel ul{padding-left:20px;font-size:14px;color:#805600;line-height:1.65}.quality-panel.has-warnings>summary{color:#805600}.quality-panel li+li{margin-top:8px}.quality-panel pre:empty{display:none}#download{margin-top:24px}.audit-grid{margin-bottom:16px}.scores{margin-top:12px}.charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:20px 0}.plot{background:var(--surface);border-radius:var(--radius);padding:28px;min-width:0}.plot h2{font-size:22px;margin-bottom:10px}.plot p{margin-bottom:16px}.charts>.plot:only-child{grid-column:1/-1}.probability-detail .plot{padding:8px 0}.chart{width:100%;min-height:160px}.chart svg{width:100%;display:block;overflow:visible}.chart text{font-family:inherit;font-size:12px;fill:#626268;font-variant-numeric:tabular-nums}.chart .grid{stroke:#e9e9ed;stroke-width:1}.chart rect{rx:3}.outcome-summary{border-top:1px solid var(--line);padding-top:16px;margin:16px 0 0!important;font-size:13px!important;color:#515158!important;font-variant-numeric:tabular-nums}.table-scroll{overflow-x:auto;max-width:100%}table{width:100%;border-collapse:collapse;text-align:right;font-size:13px;font-variant-numeric:tabular-nums}th,td{padding:14px 10px;border-bottom:1px solid var(--line);white-space:nowrap}th{font-weight:550;color:var(--secondary)}th:first-child,td:first-child{text-align:left}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.7;background:#eaeaf0;border-radius:10px;padding:20px;max-height:400px;overflow:auto;tab-size:2}.lab-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:32px;align-items:start}.input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.input-grid label{margin-top:14px}.input-grid input,.input-grid select{margin-top:8px}.input-grid+button{margin-top:24px}.iv-lab{margin-top:24px}.calculation-result{white-space:pre-line;line-height:1.75;background:#f5f5f7;border-radius:12px;padding:20px;margin:24px 0 16px;color:#34343a;font-size:14px;font-variant-numeric:tabular-nums}#iv-details{margin-bottom:0}.scenario-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:28px;margin-top:32px}.scenario-layout>form{background:#fff;border-radius:var(--radius);padding:28px}.scenario-layout .stats strong{font-size:26px}.scenario-layout .charts{grid-template-columns:1fr}.scenario-layout .primary{margin-top:24px;white-space:normal}.prose{max-width:760px;margin:auto}.prose h3{margin-top:32px}.prose p,.prose li{line-height:1.8;color:#515158}.prose li{margin:12px 0}.prose ol,.prose ul{padding-left:24px}footer{max-width:1020px;margin:auto;padding:28px 0;display:flex;justify-content:space-between;gap:24px;font-size:12px;color:var(--secondary);border-top:1px solid var(--line)}*{scrollbar-color:#b8b8c0 #f5f5f7;scrollbar-width:thin}@media(max-width:850px){.masthead-inner{padding:10px 24px;gap:16px}.tab{padding:10px;font-size:12px}main{padding:0 24px 48px}.introduction{padding:44px 0 30px}.introduction h1{font-size:44px}.introduction p{font-size:18px}#results{padding:36px}.results-heading h2{font-size:34px}.settings-grid{grid-template-columns:1fr}.charts,.lab-grid{grid-template-columns:1fr}.scenario-layout{grid-template-columns:240px minmax(0,1fr)}.scenario-layout .stats{grid-template-columns:1fr}.scenario-layout .stats strong{font-size:30px}footer{margin:0 24px}}@media(max-width:600px){.view{scroll-margin-top:120px}.masthead-inner{padding:10px 20px 6px;flex-wrap:wrap;gap:4px}.wordmark{font-size:21px}nav{width:100%;gap:0;justify-content:space-between}.tab{font-size:12px;padding:10px 12px}.introduction{padding:34px 0 26px}.introduction h1{font-size:38px;max-width:10ch;margin:0 auto 16px}.introduction p{font-size:17px}main{padding:0 16px 40px}#workbench{gap:24px}.experiment-tools{padding:0 4px}.experiment-row{gap:10px;align-items:end}.price-picker{min-width:0;flex:1}.price-picker label{font-size:12px}input,select{font-size:16px;min-height:48px}.experiment-row .primary{font-size:13px;padding:12px 18px;flex-shrink:0}.setup-options>summary,.session-options>summary{font-size:12px}.settings-grid{padding:20px;gap:16px}.data-controls{display:block}.data-controls button{margin-top:16px}.results-heading h2{font-size:30px}.results-heading p{font-size:15px}#results{padding:28px 20px;scroll-margin-top:120px}.results-heading{margin-bottom:20px}#status{font-size:12px;text-align:left}#plain-explanation{font-size:15px;text-align:left;margin:20px 0 28px}#stats{grid-template-columns:1fr;text-align:left;margin:28px 0;gap:0}#stats>div{padding:16px 0;border:0;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px}#stats strong{font-size:40px;margin-top:0}#stats span{font-size:13px;max-width:15ch}.validation-panel{padding:20px;margin:24px 0}.evidence-heading{display:block}.evidence-heading a{display:inline-block;margin-bottom:8px}.evidence-verdict{font-size:18px}.validation-panel table{font-size:11px}#validation-baseline-table{table-layout:fixed;width:100%}#validation-baseline-table th,#validation-baseline-table td{white-space:normal;overflow-wrap:anywhere;padding:12px 5px;vertical-align:top}#validation-baseline-table th:first-child{width:29%}#validation-baseline-table th:nth-child(2){width:18%}#validation-baseline-table th:nth-child(3){width:23%}#validation-baseline-table th:nth-child(4){width:30%}.plot{padding:24px}.chart{min-height:0}.chart text{font-size:13px}.input-grid{gap:0 12px}.scenario-layout,.lab-grid{grid-template-columns:minmax(0,1fr);gap:24px}.scenario-layout .stats{grid-template-columns:1fr}.view>h2{font-size:32px;margin-top:32px}.prose p,.prose li{font-size:15px}footer{display:block;margin:0 20px;padding:24px 0}footer span{display:block;margin-bottom:8px}#check-details,#validation-details{scroll-margin-top:120px}}@media(prefers-reduced-motion:no-preference){.tab,.primary,.secondary{transition:background .18s ease-out,color .18s ease-out,transform .12s ease-out}.view:not([hidden]){animation:appear .22s ease-out}@keyframes appear{from{opacity:.85;transform:translateY(4px)}to{opacity:1;transform:none}}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}@media(prefers-reduced-transparency:reduce){.masthead{background:#fafafc;backdrop-filter:none;-webkit-backdrop-filter:none}}@media(prefers-contrast:more){:root{--secondary:#414145;--line:#8b8b91}.masthead{background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none}.hint,.small{color:#414145}}.settings-grid h2{font-size:18px;line-height:1.3;letter-spacing:-.015em}
12345678910115 unmodified lines1718192021223 unmodified lines262728293031const assert=require('node:assert/strict'),vm=require('node:vm'),fs=require('node:fs');const {createRunCache}=require('./cache.js');const nodes=new Map();function node(id){if(!nodes.has(id))nodes.set(id,{id,value:id==='validation-protocol'?'strict':id==='data-source'?'synthetic':id==='observations'?'1200':'42',files:[],textContent:'',hidden:false,disabled:false,listeners:{},classList:{remove(){},add(){},toggle(){}},addEventListener(type,fn){this.listeners[type]=fn;},setAttribute(){},replaceChildren(){this.textContent='';},append(){},focus(){},click(){downloadClicks++;}});return nodes.get(id);}let workerCount=0,parseCount=0,cacheWrites=0,exportedBlob=null,downloadClicks=0;const deferred=()=>{let resolve;const promise=new Promise(r=>resolve=r);return{promise,resolve};};let network=deferred();const sandbox={URL:{createObjectURL(blob){exportedBlob=blob;return 'blob:fixture';},revokeObjectURL(){}},console,TextEncoder,TextDecoder,structuredClone,setTimeout,clearTimeout,Date,JSON,Math,Number,Blob,document:{getElementById:node,querySelectorAll:()=>[],querySelector:()=>node('quality-panel'),createElement:()=>node('created')},QuantProvenance:{...require('./provenance.js'),fingerprint:async()=> 'fixture-hash'},QuantCache:{createRunCache(){const cache=createRunCache();return{...cache,set(...args){cacheWrites++;cache.set(...args);}};}},QuantModel:{synthetic:()=>Array(1200).fill(100)},5 unmodified linesconst source=fs.readFileSync(require.resolve('./app.js'),'utf8').replace(/import\('\.\/model\.js[^']*'\)/,"Promise.resolve({})");vm.createContext(sandbox);vm.runInContext(source,sandbox);(async()=>{for(const id of ['validation-policy','movement-note','validation-audit'])node(id).textContent='private derived fixture';node('clear-data').listeners.click();assert.equal(node('validation-policy').textContent,'');assert.equal(node('movement-note').textContent,'');assert.match(node('validation-audit').textContent,/No validation/);await Promise.resolve();assert.equal(workerCount,0,'Clearing pending module load must prevent worker creation');const file=deferred();node('data-source').value='csv';node('csv-file').files=[{size:100,arrayBuffer:()=>file.promise}];3 unmodified linesnetwork=deferred();const json=deferred();const loading=node('benchmark').listeners.click();network.resolve({ok:true,json:()=>json.promise});await Promise.resolve();node('clear-data').listeners.click();json.resolve({});await loading;assert.match(node('status').textContent,/cleared/);node('data-source').value='synthetic';await vm.runInContext('run()',sandbox);assert.equal(workerCount,1,'A fresh run after clearing must still work');node('clear-data').listeners.click();assert.equal(vm.runInContext('currentReport',sandbox),null);assert.equal(vm.runInContext('runCache.size()',sandbox),0);const digest=deferred();sandbox.QuantProvenance.fingerprint=()=>digest.promise;const beforeDigest=workerCount;const hashing=vm.runInContext('run()',sandbox);await Promise.resolve();node('clear-data').listeners.click();digest.resolve('stale-hash');await hashing;assert.equal(workerCount,beforeDigest,'Clearing a pending digest must prevent worker creation');const Q=require('./model.js'),V=require('./validation.js');const report=Q.run(Q.synthetic(1200,42),{protocol:'strict'});report.validation=V.analyze(report);sandbox.fixtureReport=report;vm.runInContext("render(fixtureReport,{synthetic:true,rows:1200,name:'Fixture'},null,{},false,{sha256:'fixture-hash'})",sandbox);1234567891011125 unmodified lines18192021222324253 unmodified lines29303132333435const assert=require('node:assert/strict'),vm=require('node:vm'),fs=require('node:fs');const {createRunCache}=require('./cache.js');const nodes=new Map();function node(id){if(!nodes.has(id))nodes.set(id,{id,value:id==='validation-protocol'?'strict':id==='data-source'?'synthetic':id==='observations'?'1200':'42',files:[],textContent:'',hidden:false,disabled:false,listeners:{},classList:{remove(){},add(){},toggle(){}},addEventListener(type,fn){this.listeners[type]=fn;},setAttribute(){},replaceChildren(){this.textContent='';},append(){},focus(){this.focused=true;},scrollIntoView(){this.scrolled=true;},click(){downloadClicks++;}});return nodes.get(id);}const tabs=[node('forecast-tab'),node('help-tab')];tabs[0].dataset={view:'workbench'};tabs[1].dataset={view:'methods'};let workerCount=0,parseCount=0,cacheWrites=0,exportedBlob=null,downloadClicks=0;const deferred=()=>{let resolve;const promise=new Promise(r=>resolve=r);return{promise,resolve};};let network=deferred();const sandbox={URL:{createObjectURL(blob){exportedBlob=blob;return 'blob:fixture';},revokeObjectURL(){}},console,TextEncoder,TextDecoder,structuredClone,setTimeout,clearTimeout,Date,JSON,Math,Number,Blob,document:{getElementById:node,querySelectorAll:selector=>selector==='[data-view]'?tabs:selector==='.view'?[node('workbench'),node('methods')]:[],querySelector:()=>node('quality-panel'),createElement:()=>node('created')},QuantProvenance:{...require('./provenance.js'),fingerprint:async()=> 'fixture-hash'},QuantCache:{createRunCache(){const cache=createRunCache();return{...cache,set(...args){cacheWrites++;cache.set(...args);}};}},QuantModel:{synthetic:()=>Array(1200).fill(100)},5 unmodified linesconst source=fs.readFileSync(require.resolve('./app.js'),'utf8').replace(/import\('\.\/model\.js[^']*'\)/,"Promise.resolve({})");vm.createContext(sandbox);vm.runInContext(source,sandbox);(async()=>{tabs[1].listeners.click();assert.equal(node('workbench').hidden,true);assert.equal(node('methods').hidden,false);assert.equal(node('methods').scrolled,true,'Navigation must show the start of the newly selected view');tabs[0].listeners.click();const outer={tagName:'DETAILS',open:false,parentElement:null},inner={tagName:'DETAILS',open:false,parentElement:outer};node('experiment').listeners.invalid({target:{parentElement:inner}});assert(inner.open&&outer.open,'Native validation must reveal closed ancestor details');for(const id of ['validation-policy','movement-note','validation-audit'])node(id).textContent='private derived fixture';node('clear-data').listeners.click();assert.equal(node('validation-policy').textContent,'');assert.equal(node('movement-note').textContent,'');assert.match(node('validation-audit').textContent,/No validation/);await Promise.resolve();assert.equal(workerCount,0,'Clearing pending module load must prevent worker creation');const file=deferred();node('data-source').value='csv';node('csv-file').files=[{size:100,arrayBuffer:()=>file.promise}];3 unmodified linesnetwork=deferred();const json=deferred();const loading=node('benchmark').listeners.click();network.resolve({ok:true,json:()=>json.promise});await Promise.resolve();node('clear-data').listeners.click();json.resolve({});await loading;assert.match(node('status').textContent,/cleared/);node('data-source').value='synthetic';await vm.runInContext('run()',sandbox);assert.equal(workerCount,1,'A fresh run after clearing must still work');node('clear-data').listeners.click();assert.equal(vm.runInContext('currentReport',sandbox),null);assert.equal(vm.runInContext('runCache.size()',sandbox),0);node('observations').value='850';vm.runInContext('syncSource()',sandbox);assert.equal(node('setup-options').open,true,'Invalid hidden example settings must be revealed');assert.equal(node('demo-settings').open,true);node('observations').value='1200';const digest=deferred();sandbox.QuantProvenance.fingerprint=()=>digest.promise;const beforeDigest=workerCount;const hashing=vm.runInContext('run()',sandbox);await Promise.resolve();node('clear-data').listeners.click();digest.resolve('stale-hash');await hashing;assert.equal(workerCount,beforeDigest,'Clearing a pending digest must prevent worker creation');const Q=require('./model.js'),V=require('./validation.js');const report=Q.run(Q.synthetic(1200,42),{protocol:'strict'});report.validation=V.analyze(report);sandbox.fixtureReport=report;vm.runInContext("render(fixtureReport,{synthetic:true,rows:1200,name:'Fixture'},null,{},false,{sha256:'fixture-hash'})",sandbox);
APPLE-REFERENCES.mdAdded+22
DESIGN.md+10-11
README.md+2
VERIFICATION.md+10
app.js+4-3
index.html+16-18
style.css+25-25
test_app_state.cjs+6-2