Quantitative research & execution engineering · September 2026
When does a weather signal become a tradable edge?
WeatherPred connects original weather data, probability models and market prices to a trading research loop and a paper-execution ledger. The difficult part is finding out whether an apparent edge survives the trade.
Python · NumPy / SciPy · SQLite · Public market APIs · Chronological validation
The project in one minute
research checkpointI built a system to follow an idea from its original data through a hypothetical order and back to the evidence behind its result. It preserves source versions and timestamps, fits interpretable distributions, tests trading rules, and simulates fees, delays, partial fills and locked cash.
Profitability remains unproven. The latest statistical campaign rejects both learned strategies: probability calibration leaves $194.26 and return prediction leaves $188.70 from separate $200 accounts under the costed assumptions. Cash remains the stronger baseline. These are conditional historical simulations, not investment returns.
The project demonstrates quantitative modeling, experiment design, data engineering and execution accounting. Every headline number links to a dated evidence snapshot. Alternative policies reuse events and are not independent samples.
A repeatable statistical trading laboratory
four candidates / six monthly fitsThe research loop now fits different statistical targets and sends their saved decisions through one common simulator. One model learns a correction to settlement probabilities; another learns net dollars from an order attempt, including known limit rejections. Both share fifteen quote/calendar features, cash limits and execution rules.
| Strategy | Costed ending cash | Stress ending cash |
|---|---|---|
| Cash | $200.00 | $200.00 |
| Market-price baseline | $200.00 | $200.00 |
| Learned settlement probability | $194.26 | $196.17 |
| Learned net return per attempt | $188.70 | $190.82 |
The batch completes in 49.96 seconds. Every month uses earlier released training labels, and its predictions enter the archive before the next month's training. The account reserves whole-contract costs before later fills and never resets between model changes. All four trials and both cost scenarios remain in the result.
The probability model makes 20 costed fills; the return model makes 101. Both lose before their recorded fees as well as afterward. The return model wins 67.3% of filled trades yet loses money: hit rate alone is a poor trading objective. Unknown entry endpoints remain visible and motivate a separate data-quality diagnosis.
The 365-day account holds cash before March 2026. Supported source windows run January 1–August 13; later contracts remain excluded. Historical depth and contemporaneous receipts are missing, so these fills are conditional. Accounts requiring verified historical receipts stay at $200. This is not an optimal full-year return.
Adversarial tests change future prices, outcomes and not-yet-open contracts and require earlier decisions to remain unchanged. The final preflight records 680 passing tests; independent account arithmetic is checked inside every run. New model families use declared batches under the same referee.
Execution, wider markets and a small transformer
September 6 / new evidenceThe current rain pair exposes a practical limit to compounding: under quarter depth and two cents additional slippage per leg, the later capacity screen supports just six matched pairs, for $0.1892 conditional surplus. Selling the existing positions at the observed bids would instead lose about $2.10–$2.37 per alternative account. A bigger bankroll does not create better liquidity.
A broader screen examines 446 fresh books and 541 contract implications. None offers a positive floor after fees. Weekly heat-streak trades also fail a one-cent slippage test, while four already-crossed monthly rainfall thresholds have no YES asks. A useful data discovery adds 5,443 hourly observations across 37 stations, with source and target differences retained.
A real training experiment, with its failures retained
Chronos-2-small has 27.9 million parameters and runs locally. One fixed supervised fit completed 100 optimizer steps in 22.55 seconds. On eight reused development days, its overall temperature error is worse than persistence. The five-minute subgroup improves by about 16%, suggesting a specialist worth testing on new days.
| Development comparison | Persistence RMSE | Fine-tuned RMSE |
|---|---|---|
| All three horizons | 0.7504°F | 0.8010°F |
| Five-minute subgroup | 0.5375°F | 0.4512°F |
RMSE is a measure of temperature error; lower is better. These are 93 forecasts on 31 hourly targets, not 93 independent days. Saved-checkpoint replay caught dropout remaining active in the first evaluation. The same weights were rescored without retraining and now reproduce exactly. Both score versions remain in the evidence; no forecasting or trading breakthrough is claimed.
A new bounded research runner executes registered candidates against a fixed evaluator, stops processes at their deadline and preserves failed attempts. Reinforcement learning for order placement remains a proposed next stage; the trained forecast uses supervised learning.
The expanded verification records 135 passing tests, alongside independent raw-source replays. Engineering checks establish reproducibility; profitable execution still needs new evidence.
Physical forecasts and a small transformer
twelve forecasts / 28 development daysA separate experiment compares eight models on the same 6,599 forecasts across 20 weather stations. The small transformer reduces average absolute temperature error by 12.23% relative to the strongest tested regression. Most of that gain comes from the pretrained checkpoint; one fixed 200-step supervised adaptation adds only 1.05%.
The stronger benchmark is NOAA's operational hourly guidance. It slightly outperforms the standalone transformer. Three fixed combinations then improve both sources: the equal-weight combination has the lowest observed error, 1.6023°F. The weights were specified before the NOAA benchmark was scored; every combination and comparison remains in the report.
| Forecast | Average absolute error |
|---|---|
| Strongest tested regression | 2.1501°F |
| Pretrained transformer | 1.9072°F |
| Transformer after one fixed fit | 1.8872°F |
| NOAA hourly guidance | 1.8345°F |
| 75% NOAA / 25% pretrained transformer | 1.6608°F |
| 50% NOAA / 50% pretrained transformer | 1.6023°F |
| 25% NOAA / 75% pretrained transformer | 1.6866°F |
Lower error is better. Each UTC day receives equal weight. Training ends before July 6, a separate calibration period ends before July 20, and development scoring covers July 20–August 16. The separate hybrid audit reconstructs every raw combination exactly, all twelve forecasts' scores and all twelve uncertainty comparisons. It does not rerun the neural model.
The follow-up diagnosis retains every station and horizon: the adapted model improves on the strongest regression at 19 of 20 stations and all three horizons. Its extra gain over the pretrained model is less convincing; the exploratory uncertainty interval includes no improvement.
All three combinations improve the calibrated distribution score as well. Each is compared with NOAA, both transformer versions and regression: twelve comparisons share the same day-block uncertainty calculation. All twelve descriptive intervals favor the combinations. The 50/50 weight is the best observed member of this small development family, not a validated production choice.
The current repository verification records 543 passing tests and 153,375 verified archive records. A separate model-package preflight retains twelve additional checks. These engineering checks support reproducibility, not profitability.
This is a forecasting lead, with trading benefit still unproven. Historical publication and revision assumptions remain, and individual station temperatures differ from the hourly settlement index. The new benchmark includes all 498 original NOAA forecast files and the same cases. Twenty stations do not turn 28 days into thousands of independent trials; new forward validation is still required.
What happens to a $200 account?
4,608 simulated accounts / September 6A new bankroll replay combines 576 trading policies with four integer position budgets and two execution-cost assumptions. It reserves cash before orders fill, charges quantity-dependent fees, keeps capital locked until release and limits correlated weather exposure. It does not scale the old one-contract profits.
| Question | Measured answer |
|---|---|
| Best-looking earlier training balance | $341.87, with insufficient statistical evidence |
| Policy chosen by the fixed earlier-data rule | Hold cash; zero qualifying policy-and-size pairs |
| Cash-only annual benchmark | $200, with no interest or external cash flows |
| Separate restricted annual replay | $200 ending cash; 13,824 training accounts, no qualifying strategy at any of three selection dates, and zero selected trades. Separate audit reproduces all 13,824 account ledgers and all three cash selections. |
| Optimal full-year trading balance | Not established; the new policy mandates 298 cash days and allows at most 67 active days |
The independent audit reproduces all 4,608 accounts, 198,778 hypothetical entries and releases, and 2,145,475 journal records. Accounting consistency does not establish historical fills. A new download covers all 1,736 daily events across seven cities for January–September 2026; missing months and the sealed 2025 test quarter remain explicit.
The live paper evidence also remains mixed. After four hourly settlements, three of the original 32 alternatives are positive. The separately selected forecast model loses on its first settled event. One underlying weather day cannot establish a durable edge.
From data to an order
six connected stagesAn append-only SQLite archive links each decision to its raw sources. A hash chain detects accidental changes, while independent replays reconstruct calculations. It is not a notarized timestamp: the limits of the provenance evidence are documented as carefully as the equations.
The strategies
forecasting and trading are different tasksWeather distributions and forecast combinations
Daily models use NOAA guidance with global or station-specific bias correction, empirical errors, or a regression whose variance depends on forecast spread. Hourly models compare persistence with extrapolated trends. A constrained logarithmic pool combines weather and market probabilities while keeping bracket probabilities coherent.
Updated weather forecasts improve several baselines, yet still trail the market's probability scores. A small gain from forecast pooling also disappears when the selected trades include fees and slippage. That prompted a broader search over trading behavior.
A later registered experiment adds daily temperature patterns, shrinks unstable coefficients, and allows heavier-tailed errors. Its August-only selection is reproducible from raw data; the chosen model is frozen before new forward paper decisions. The model card publishes the parameters, candidate results and limits of that development comparison.
A separate rain experiment compares daily and weekend contracts after an officially dry Saturday. It tests whether a price gap survives two independent orders, partial fills, fees and locked cash. All 19 eligible cities are registered before the new decisions. The strategy guide and mathematics explain both its conditional payout and the loss possible if a leg fails or settlement sources disagree.
At the first rain-pair decision, NYC's two legs received simulated fills under all three execution assumptions. The independently audited conditional gains are $0.41, $0.29 and $0.17 per alternative account after fees. Settlement is still pending: this is an initial execution result on one weekend, with source risk and cash lock remaining.
Momentum, reversal, favorites and longshots
Six families test whether prices continue moving, reverse after a sharp move, or misprice high- and low-probability outcomes. Entries use earlier information and a price limit; exits occur at a fixed later time or settlement. A grid of 576 policies under three cost assumptions yields 1,728 comparisons.
Thirty costed policies have positive development P&L. None survives the statistical adjustment for searching many alternatives. The separate monthly selector evaluates whether earlier apparent performance would have led to a useful next-month decision; it loses $4.45.
Observed temperatures and bracket consistency
Another 108 comparisons test whether a preliminary daily high makes lower temperature brackets implausible. The model learns an error allowance from earlier days. The apparent cheap trade turns out to be one losing Chicago event: preliminary 79°F, final exchange value 77°F. A preliminary observation is not an infallible bound.
A separate basket scanner checks whether the total cost of a complete set of brackets is below its minimum settlement payout. It found no positive conditional surplus across 149 fully quoted scenarios.
Paired passive quotes and inventory
New forward experiments offer to buy both YES and NO below their combined $1 payout. They compare joining the best bids, improving by one cent, and shifting prices to reduce an accumulated position. Each side needs its own later fill evidence. Matched spread income is tracked alongside the potential losses on unmatched positions; the newer accounting model returns cash when opposite positions in the same contract offset.
Work through the economics
one contract, two cash flowsA YES contract pays $1 if its condition holds. If your probability estimate is p and the total purchase cost is c, expected profit is p − c. Selling early is a different calculation: later bid minus exit fee minus purchase cost.
Early-exit profit = later bid − exit fee − ask − entry fee
Buying at 40¢ and selling at 60¢ looks like a 20¢ gain. Under the illustrated cent-rounded fee schedule it costs 42¢ and returns 58¢: a 16¢ gain. The Python ledger additionally handles fee accumulation across partial fills.
Change the assumptions
This is an arithmetic illustration using an entered belief, not a validated trading signal. It shows one contract, a 0.07 × price × (1 − price) fee rounded to cents, and the paper model's three-point probability haircut.
The full mathematics guide derives Gaussian bracket probabilities, weighted residual calibration, positive variance regression, logarithmic pooling, the observation error allowance, maker queues, Kelly sizing and the bootstrap search adjustment. It includes implementation links and states where the assumptions stop being justified.
Paper fills, not midpoint fills
execution has to be observedThe forward experiment compares eight frozen hourly models under four execution assumptions in 32 alternative $100 paper accounts. Taker orders wait for a future order book, walk available depth and cancel the unfilled remainder. Maker orders wait behind displayed volume and count only eligible, deduplicated trade prints strictly through the limit price.
At the published checkpoint, the audit reproduces 64 taker and 22 maker fill records, with no settlements. These records concern one underlying event. They establish that the simulator can account for prospective fills; they do not establish a profitable trading strategy.
September 6, 15:12 UTC update: that first event has now settled. All 32 alternative accounts lost between $0.48 and $4.16 on it; the audit reproduced 57 settled positions against the final 84.56°F value. This is one event, not enough to estimate long-run returns. The original published snapshot remains dated and unchanged.
16:12 UTC update: a second hourly event finalized at 87.80°F. Across both events, 31 alternatives have cumulative realized losses and one is up $0.6371, with further positions still open. The two-event record retains the account-level results; two hours on one day are not independent long-run evidence.
17:15 UTC audit: the third hourly event finalized at 89.60°F. All 32 alternatives now have cumulative realized losses, ranging from $0.7276 to $11.4723, with further positions unsettled. The audit reproduces 146 settled positions. The three-event record keeps these losses visible; the three hours still share one weather day.
A separately registered experiment now tests paired passive quotes: join the best bids, improve by one cent, or adjust prices as inventory builds. Each rule has three queue and delay assumptions. It reports matched-pair spread separately from unmatched risk. The first version stresses capital by keeping both legs funded; a new cohort implements Kalshi's same-contract offsetting and returns matched cash early. Read the registered mechanisms and their limits.
An open order reserves cash for its unfilled quantity. Filled cash becomes a position cost; the newer cohort returns the matched dollar payout when opposite positions offset. Unmatched positions remain exposed until exit or settlement. Unfinalized closed positions are carried at cost, so interim account equity is not a guaranteed liquidation value. The hourly model's fixed probability haircut and quarter-Kelly sizing are explicit research assumptions.
What a reviewer can verify
code, evidence and limitsThe independent historical audit reconstructs 253,227 hypothetical entries, 100,170 quoted exits and 153,057 settlement payouts across alternative policies. The maximum numerical discrepancy is 1.11 × 10−16. The public repository includes all compact policy results, unit tests and the dated audit summaries. A later forward checkpoint adds the first settled losses, paired-maker fills and same-contract offsets, alongside 95 passing tests.
A clean clone runs the engineering tests without credentials. Full empirical replay requires the original raw archive, which is stored separately. Historical quote depth and original publication are not manufactured from hourly candles. October–December 2025 remains a sealed final holdout, and adequate forward validation remains outstanding.
Developed with AI coding assistance. The contribution is the implemented research process and the evidence behind its claims, including negative findings. Paired maker quotes are now a registered paper experiment; faster observation-reaction strategies remain a research direction. Neither is a validated live trading capability.