Inspiration
People want to invest, but they don't know when. So most do nothing, or follow a stranger online.
- 61% of UK adults with £10,000+ to invest keep three quarters of it in cash (FCA, 2025).
- In Mexico, 76.5% of adults have a bank product, but only 3.4% hold a term deposit or a fund (INEGI, 2024).
- Finfluencer followers scored 42% on an investing quiz, yet 63% rated their own knowledge as high (FINRA Foundation, 2026).
Most apps answer with a chart. We wanted an app that answers with a decision, shows its reasoning, and comes back when your time is up. The theme was time, so time became the whole product: your horizon.
What it does
Horizon asks which asset, how much, for how long, and how much risk you accept. Then it answers Invest, Wait or Not now, with the amount to invest today.
- Reasons, not vibes: every answer shows the expected return, the chance of loss and the bad-case loss. It also flags Fed and Bank of England decisions.
- Help me choose: give an amount, a horizon and a risk profile, and Horizon builds a plan with up to 5 of 21 assets (US, Mexican and UK stocks, ETFs, indices, FX, crypto).
- Make it a habit: when your horizon ends, Horizon sends a WhatsApp with that day's answer. If you don't open it, it gives you a short call in an ElevenLabs voice.
- For everyone: five languages, local currencies, a dark theme, a guided setup and a money tutor built on Gemini that never says buy or sell.
Educational prototype. Not financial advice.
How we built it
1. Predict. A model forecasts the return over the horizon, its spread and the chance of a loss, using only prices up to the decision date. Our main model, Trend + TDA, reads momentum over 1, 3, 6 and 12 months and measures the shape of recent returns with persistent homology, a tool from topology. Its tails come from real past errors, not from a bell curve. XGBoost is the backup and a 3-year mean/volatility model is the fallback.
2. Size by risk. If $q_{5}$ is the 5th percentile of the forecast (the bad case) and $\tau$ is the loss you tolerate (5%, 10% or 20% for conservative, moderate and aggressive), the fraction to invest today is
$$ f = \min!\left(1,\ \frac{\tau}{|q_{5}|}\right) $$
3. Filter and events. If the model expects a loss, the answer is Not now. If a central bank decision falls within 3 days, we invest half now and half after.
Why sizing and not timing? Timing rarely beats investing now: Vanguard found a lump sum beats staged entry 68% of the time (1976–2022). Sizing by volatility makes extreme losses less severe (Harvey et al., 2018).
Stack: Python (NumPy, pandas), FastAPI, React, Yahoo Finance and Binance data, Gemini and ElevenLabs for words and voice (they never change the numbers), Twilio for WhatsApp and calls, Tiger Data to store and grade every prediction, and Vultr (London) with Caddy for HTTPS.
Does it tell the truth?
We retrained Trend + TDA with data up to November 2021 only, then tested on 2022 to today: 1,218 windows of 30 days across 21 assets.
| Check | Target | Baseline | XGBoost | Trend + TDA |
|---|---|---|---|---|
| Real return inside the 90% interval | 90% | 92% | 94% | 90% |
| Brier score of chance of loss (lower is better) | < 0.246 | 0.252 | 0.250 | 0.245 |
| Rank correlation, expected vs real | > 0 | −0.06 | +0.02 | +0.06 |
Following the rule, the moderate profile reached a Sharpe ratio of $1.17$ versus $0.98$ for buy-and-hold, with a maximum drawdown of $-16.5\%$ versus $-24.0\%$ for the same average exposure. A bootstrap 90% interval for the gain over the same exposure excludes zero for moderate and aggressive profiles.
Challenges
- Our first rule sat in cash 84% of the time. It blocked instead of sizing. We changed it to invest by default and let risk set the amount.
- Honest attribution. We split the gain into sizing and timing. Most of it is sizing (less in crypto, more in index funds). Trend + TDA's timing gain is small but better than chance: only 1–3% of random timings match it.
- Real messages are messy. WhatsApp's link-preview robot visits every link, so we mark the habit as "opened" only when the app loads. Meta's Cloud API test number failed twice, so the demo uses the Twilio sandbox.
- Fragile choices. Adding 2 assets changed the winner for the baseline, so we fixed 6 rule settings in advance, chose on 2016–2021 and tested on 2022 onward.
What we learned
- A small, well-calibrated edge is worth more than a loud prediction. Our intervals are right on target, and we say the gains are small.
- Separating how much from when showed us where the value actually comes from.
- Testing with a strict out-of-sample protocol made us drop ideas that looked good in training (the trend brake did not help, so it is off).
Limitations
Cash earns 0% and there are no trading costs. The 21 assets were picked in 2026 (survivorship bias). The test has only 57 portfolio windows, too few to separate small Sharpe gaps from noise. The rate-decision calendar starts in October 2026, so it is not in the backtest.
What's next
WhatsApp through Meta's Cloud API with an approved template, SMS as a second channel, Banxico's rate calendar once published, and a single API call for several assets.
Built With
- binance-api
- caddy
- elevenlabs
- fastapi
- gemini
- javascript
- numpy
- pandas
- persistent-homology
- postgresql
- pytest
- python
- react
- systemd
- tiger-data
- topological-data-analysis
- twilio
- uvicorn
- vite
- vultr
- xgboost
- yfinance
Log in or sign up for Devpost to join the conversation.