# Why this quant stack

**Live:** https://lottery-wheat-three.vercel.app/

## What this is

A **descriptive pick workbench** for Australian lotteries:

| Game | Rules | Page |
|------|--------|------|
| Oz Lotto | 7 from 1–47 (Tue) | `index.html` |
| Powerball | 7 from 1–35 + independent Powerball 1–20 (Thu) | `powerball.html` |

It turns public draw history into **ranked numbers, structure targets, and diverse ticket candidates**.

It is **not** a claim that any factor raises P(match the next draw).

## What problem it solves

People who play already want:

1. A fast board of “what’s interesting tonight” (skips, heat, structure).
2. Tickets that are **internally coherent** (sum band, odd count, decade mix, not clones of each other).
3. A way to **tinker** (weights, strategies) without a spreadsheet.

That is product design for research / entertainment — not alpha research for a casino edge.

## Why the factors look “quant-y”

| Layer | Role |
|--------|------|
| Frequency / EWMA / W10–W50 | Describe *where the sample has been*, not where it “must” go |
| Overdue hazard | “How long vs own gap history” — good for **narrative + diversity**, not destiny |
| Streaks / Markov on structure | Soft priors for **ticket shape** (odds, sum side, highs) |
| Pair lift (smoothed) | Mild co-occurrence flavour; shrink so rare pairs don’t dominate |
| Ensemble + repair | Sample → score → hill-climb toward fuzzy targets |
| Walk-forward TopK | Honest self-check: hit rate ≈ random baseline |

If the backtest edge is ~0, **the stack is working as designed**. A tool that printed “+edge guaranteed” would be the bug.

## What it deliberately does *not* do

- Predict the next 7 balls.
- Treat multi-testing fishing as discovery.
- Claim a free lunch against 1/C(47,7).
- Hide uncertainty: UI and backtest are meant to keep the “fair draw” reality visible.

## Powerball dual-track (why not “Oz + one extra ball”)

Australian Powerball uses **two independent drums**. Treating PB as an 8th main number is a category error.

- **Main track (7/35):** denser hits than Oz (p≈0.20 vs ≈0.15); four decade bands (31–35 has only five numbers); same ensemble + structure repair as Oz.
- **PB track (1–20):** single-ball geometry (E[gap]≈20); own overdue / EWMA / high-low streak; sampled independently when building tickets.
- **Independence audit on the page:** P(PB ∈ mains) ≈ 20% and sum↔PB correlation ≈ 0 under a fair draw — shown so we don’t invent coupling “signals”.
- **Backtest reports both tracks** against analytic random baselines. Edge ≈ 0 is success (honesty), not failure.

Div1 odds: C(35,7)×20 = 134,490,400.

## Stack shape (why static HTML + JS)

- Zero backend: history is a JSON snapshot; Vercel = CDN static.
- Engines (`quant.js`, `pb-quant.js`) are pure and testable in Node.
- UI is thin: render, weights, tickets, language.
- Weekly update: refresh CSV → `build_draws.py` / `build_pb_draws.py` → redeploy.

## How to judge it fairly

Ask:

1. Does data load and match Lotterywest modern era?
2. Are tickets diverse and scorable?
3. Does the tool admit “no hit-rate edge”?
4. Can a human use it in &lt;2 minutes before Tuesday night?

Do **not** ask it to beat 1/C(47,7). Nothing honest will.

## One-liner

> Structure and story for picks on a fair draw — with math that knows it can’t buy a free lunch.
