Inspiration
If you're wealthy, someone watches every pound for you. A wealth manager checks your bills, plans for the bad months, makes sure nothing is wasted, and only then talks about investing.
So why doesn't the middle class get one?
The people who would benefit most are the ones who can't afford it. The FCA's Financial Lives survey found 12.9 million UK adults (1 in 4) have low financial resilience: one bad month away from real trouble. Policy in Practice estimates £24 billion of benefits and social tariffs go unclaimed every year. Ofcom found only about 1 in 12 households on Universal Credit use the cheap broadband they're entitled to.
We noticed something else. Almost every money tool looks decades ahead: pensions, retirement, "where will you be at 60?". But nobody goes overdrawn in 2050. They go overdrawn the week before payday.
So we built a wealth manager for the horizon that actually hurts: this month, and the next three.
What it does
Almanac is a one-stop optimiser for your money, built for payday to payday rather than decade to decade. It reads 90 days of bank transactions and acts like a private banker would.
- Financial resilience score (0–100). Overdraft risk, emergency fund, expensive debt, room to save and money leaking, in one number that moves as you act.
- Time machine. Your next 90 days, simulated 400 times. Press Play and watch your balance move day by day. Stress-test it: what if my bank shifts stop? what if the boiler breaks? Then switch to 10 years and compare two futures: "if nothing changes" vs "with the plan".
- Heads-ups before problems happen. A warning six days before a tight week, a note on payday saying what's safe to put away, an alert two days before a bill you're overpaying leaves your account.
- "Should I spend this?" Ask "I want to spend £100 tonight, should I?". Almanac re-runs your forecast with that spend added and answers with a verdict (go ahead, go carefully, hold off, or "it's a need, buy it"), a before-and-after chart, and the amount that would be safe.
- Savings and discounts from your own transactions. Out-of-contract phone and broadband prices, stacked subscriptions, missed loyalty prices, NHS staff discounts, Lifetime ISA bonus. Each one links to the transactions behind it.
- "Do it for me." The exact words to say on the phone, or the taps in the app, ready to copy. Text PAC to 65075 for a SIM-only switch, or a broadband retention script.
- Cards and points. Add any card. Almanac works out which card to use for each kind of spending, values every points balance two ways (easy use vs best use), tracks welcome bonuses (only if your normal spending reaches them), and switches rewards off entirely for any card you're paying interest on.
- Investing, in the right order. Emergency fund first, then free money (25% Lifetime ISA bonus), then a low-cost global index fund. It never names a fund, and always shows the capital-at-risk warning.
- A wealth manager you can talk to. A chat that answers from your numbers, takes actions ("Do it: £250 cushion"), draws charts in its replies, reads answers aloud and takes spoken questions.
- Built for everyone. Simple view (four plain sentences, big buttons), larger text, keyboard navigation, reduced motion, and a Privacy and safety page with free debt-help signposting.
How we built it
Stack: React 19, TypeScript, Vite, Tailwind CSS v4, anime.js v4 for motion. Python and Hugging Face Transformers for the language model.
1. Data in the Open Banking format
Our demo persona, Sam, a healthcare assistant in Manchester, has 90 days of synthetic transactions in the UK Open Banking OBTransaction shape, the format NatWest's Account and Transaction API returns. Switching to real data changes one file.
2. Learning the shape of someone's money
We detect recurring payments by merchant, interval and day, and keep everything else (including irregular bank shifts) as an empirical distribution per weekday. So the simulation replays real days from the person's history rather than averages.
3. The forecast: a Monte Carlo of the next 90 days
For each of $N = 400$ simulated futures $k$:
$$ B^{(k)}{t+1} = B^{(k)}_t + \sum{r \in \text{recurring}} R_r(t) + E^{(k)}_{\text{dow}(t)} + S_t $$
where $R_r(t)$ are bills and income due on day $t$, $E^{(k)}$ is a real day resampled from history with the same weekday, and $S_t$ covers seasonal effects (Christmas) and any "what if" shocks. For each day we report the median, the 10th–90th percentile band, and
$$ \hat p_t = \frac{1}{N}\sum_{k=1}^{N} \mathbf{1}!\left[B^{(k)}t < 0\right], \qquad \hat P{\text{any}} = \frac{1}{N}\sum_{k=1}^{N} \mathbf{1}!\left[\min_t B^{(k)}_t < 0\right]. $$
The random seed is fixed (common random numbers), so when you take an action or test a spend, the only difference between the two runs is your change, not noise. A full 400 × 90 run takes a few milliseconds in the browser.
4. Decisions are rules, not AI
Room to save is the largest monthly amount that keeps overdraft risk under 10%, found by bisection to the nearest £5:
$$ m^* = \max\left{\, m \;:\; \hat P_{\text{any}}(m) \le 0.10 \,\right}. $$
Spend verdicts compare $\hat P_{\text{any}}$ before and after the spend ($\Delta$ = after − before). Go if risk after is under 10% or $\Delta < 1$pp. Hold off if the lowest likely balance goes below £0, $\Delta \ge 15$pp, or risk after is at least 25% with $\Delta \ge 5$pp. Otherwise go carefully. Groceries and bills are always treated as needs.
The resilience score is a weighted sum, ordered by priority:
$$ \text{Score} = 30\left(1-\tfrac{P_{\text{any}}}{0.4}\right)_{!+} + 30\min!\left(1,\tfrac{M}{3}\right) + 15\,\mathbf{1}[D=0] + 15\min!\left(1,\tfrac{m^*}{0.1\,I}\right) + 10\,\tfrac{F}{F+R} $$
with $M$ = months of essentials saved, $D$ = card debt carried, $I$ = monthly income, and $F, R$ = £/year of savings already taken vs still available. (If $D > 0$, the debt part becomes $\max(0,\,15 - D/100)$.)
The 10-year view simulates monthly contributions $c$ into a global index fund (with bonus rate $b$ for the Lifetime ISA) under log-normal returns, in today's money:
$$ V_{m+1} = \left(V_m + c\,(1+b)\right)\exp!\left(\mu - \tfrac{\sigma^2}{2} + \sigma Z_m\right), \quad \mu = \tfrac{5\%}{12},\; \sigma = \tfrac{15\%}{\sqrt{12}},\; Z_m \sim \mathcal{N}(0,1). $$
5. A language model that's only allowed to use our numbers
The chat runs Qwen3-0.6B locally (CUDA if available), so transactions never leave the device. The model does two jobs and nothing else:
- Understand. Turn "can I spend 100 quid tonight?" into
{ intent: spend_check, amount: 100, category: dining, days_from_now: 0 }. The amount must literally appear in the message, or it's thrown away and a regex reading is used instead. - Explain. Turn a short list of facts and the engine's decision into a plain-English reply.
Then a guard checks every reply. Any £ amount, percentage, decimal or number over 31 that isn't in the facts is rejected, and so is any wording that contradicts the engine's decision. The model retries once at a lower temperature. If it fails again, the app shows a built-in answer written from the same numbers. The AI never does the maths.
6. Tested
- 27 checks on the forecast engine: spending more never lowers risk, the lowest balance moves by exactly the amount spent, groceries are never called optional, no reply ever contains
NaN. - 13 unit tests for the AI layer: invented figures are caught, junk intents are rejected, the server falls back cleanly.
Challenges we ran into
- Small models invent numbers. A 0.6B model will happily say "you could save £120" when no £120 exists. Prompt tweaks weren't enough, so we built the guard and retry loop. That's what makes a small, private, free model safe to use for money.
- Irregular income broke our pattern detection. Bank shifts that came most Fridays were first detected as weekly income, so the forecast paid Sam every week and showed him getting rich. We now require something to appear in most weeks before calling it regular. Otherwise it stays as lumpy real-world income.
- Making randomness comparable. Early versions showed actions "helping" or "hurting" by chance. Fixing the seed so every comparison uses the same 400 futures made every before-and-after honest.
- UK regulation shaped the product. Recommending specific investments is regulated advice, and recommending credit cards is credit broking. So Almanac only optimises cards you already have, never names a fund, never suggests borrowing or spending to earn points, and frames investment suggestions as the FCA's targeted support regime (live from April 2026), which a bank could offer under its own permissions. We also kept the Lifetime ISA rules current: the 25% withdrawal charge, the £450,000 first-home cap (charge cut to 20% above the cap from October 2026), and replacement by the First Time Buyer ISA for new savers from April 2029.
- Design. Our first version was a mobile app with a weather metaphor. It was too cute and too cluttered, so we rebuilt it as a clean laptop app where the numbers carry the
Built With
- anime.js
- cuda
- hugging-face-transformers
- monte-carlo-simulation
- open-banking
- python
- pytorch
- qwen3
- react
- tailwindcss
- typescript
- vite