From news to probabilities: a news aggregator that estimates the events listed on Polymarket, compares the estimate with the price and says what is worth doing.
English · Italiano
Features · How it works · Quick start · Going online · Documentation
Warning
This is not financial advice. The app does not place orders: it produces suggestions to be checked. Before using real money, check the results over many resolved markets (backtest and calibration).
The human speaking now: this crap is 1000% vibe-coded; I wanted to test Claude Opus 5.5 and TypeSafe AI's Jev to see what these new technologies can do. Do not trust this web app to make financial decisions or place bets. Use the simulated portfolio inside the app if you want to see how it performs.
News × Markets collects news from RSS feeds and targeted searches, classifies it with TypeSafe Jev and links it to Polymarket markets. For each market Jev estimates the probability of the outcome without seeing the price; the estimate, corrected with past results and weighted by the strength of the news, is compared with the price.
When there is an edge, the app turns it into a concrete plan: whether to buy, with which limit order, how much to stake, when to sell, and why or why not. A simulated portfolio, the backtest and the calibration measure whether the signals really work.
The dashboard is available in English and Italian (IT/EN button at the top right).
|
|
|
|
What to do: orders, prices and reasons |
Multi-outcome: the distribution, outcome by outcome |
Simulated portfolio: results before real money |
Backtest: how it would have gone in the past |
Screenshots with demo data. Light and dark themes follow your GitHub settings.
flowchart LR
subgraph Sources
RSS[RSS feeds]
GN[Google News<br/>targeted search]
PM[Polymarket<br/>Gamma + CLOB]
end
RSS --> ING[Collection<br/>story dedup]
GN --> ING
ING --> CLS[Summary<br/>Jev classification]
CLS --> DB[(PostgreSQL<br/>+ pgvector)]
PM --> DB
DB --> LINK[Linking<br/>news ↔ markets]
LINK --> JEV[Calibrated<br/>Jev estimate]
JEV --> BLEND[Pooling with the price<br/>edge]
BLEND --> ECO[Economic<br/>assessment]
ECO --> PLAN[What to do<br/>orders and reasons]
PLAN --> OUT[Dashboard · Telegram<br/>simulated portfolio]
- Collection. News comes from RSS feeds and targeted searches; the same story rewritten by several outlets becomes a single entry, with the number of outlets confirming it.
- Linking. Each market gets the news about the same subject, chosen by relevance, source reliability and freshness.
- Forecast. Jev reads the market rules and the news and estimates the probability without seeing the price. The estimate is calibrated on markets already resolved and pooled with the price, with a weight that grows with the strength of the news.
- Decision. Real price from the book, fees, uncertainty, time and risk limits say whether it is worth it, how much to stake and at what price to sell.
- Verification. Simulated portfolio, backtest, calibration and closing price say whether the edge is real.
Details and formulas: The method · Strategy and portfolio.
With Docker (recommended). You need at least a TypeSafe key for forecasts.
git clone https://github.com/botta0oss/News_Aggregator.git && cd News_Aggregator
cp .env.example .env # set at least TYPESAFE_API_KEY and POSTGRES_PASSWORD
docker compose up --build
docker compose exec api python -m backend.auth.cli create-user yourname --role adminOpen http://localhost:8000 and sign in with the user you just created. Compose also starts Postgres with pgvector; on the first start news collection and market sync begin right away. To open it from your phone or another computer at home see Use on your home network.
Tip
With a local NVIDIA GPU:
docker compose -f docker-compose.yml -f docker-compose.gpu.yml up --build.
Without a GPU the default image uses CPU-only PyTorch, much lighter.
See Docker images.
Without Docker
You need PostgreSQL with the pgvector extension.
python -m venv .venv && source .venv/bin/activate
pip install torch --index-url https://download.pytorch.org/whl/cpu # only without a GPU
pip install -r requirements.txt
cp .env.example .env # set DATABASE_URL and the keys
python -m backend.auth.cli create-user yourname --role admin
uvicorn backend.main:app --reloadpython scripts/check_env.py checks which keys are configured and whether the database
answers. Tables are created at startup and updated by idempotent migrations.
The cheapest way: a small VPS with Docker and Cloudflare Tunnel for HTTPS, with no open ports and no certificates to manage. Compose includes the tunnel and a daily database backup.
| Indicative cost | |
|---|---|
| VPS with 2 vCores, 4 GB RAM (OVH VPS-1, Hetzner…) | about €4–6 a month |
| Cloudflare Tunnel, HTTPS, domain managed by Cloudflare | free (the domain is paid separately) |
| Summaries with Gemini or Groq, Telegram, Polymarket, Google News | free tiers |
| Forecasts with Jev (TypeSafe) | pay per use, with daily limits |
Step-by-step guide: Deploy on a VPS with Cloudflare Tunnel.
Everything is set in .env (a copy of .env.example). The most important:
| Variable | What it is for |
|---|---|
TYPESAFE_API_KEY |
Forecasts and classification with Jev. Without it: heuristic classification and no forecasts |
GEMINI_API_KEY / GROQ_API_KEY |
News summaries (free tiers) |
POSTGRES_PASSWORD |
Database password in compose, to choose before the first start |
DAILY_JEV_CALL_LIMIT, DAILY_AI_BUDGET_USD |
Daily cap on calls and spend |
PREDICTION_AUTO |
Automatic forecasts after every collection (off by default) |
TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID |
Alert notifications |
PUBLIC_URL |
Dashboard address, for the links in notifications |
APP_LANGUAGE |
Language of Telegram alerts and news summaries: en (default) or it |
All the others: Configuration.
| Page | Contents |
|---|---|
| Dashboard guide | The pages, the recommended workflow, what to do if the dashboard does not open |
| The method | Collection, news–market linking, forecasting, multi-outcome markets |
| Strategy and portfolio | Economic assessment, what to do and when to sell, simulated portfolio |
| Alerts | Telegram notifications and how much they get ahead of the price |
| Backtest and calibration | How much to trust the forecasts, on the past and on the present |
| Usage and costs | Paid calls, cost estimate, daily limits |
| Configuration | Every .env variable |
| Access and security | Users and roles, sessions, protections |
| Deploy | CPU/GPU images, local and home-network use, VPS with Cloudflare Tunnel, backups |
| API | The REST endpoints |
| Development and tests | Tests, CI, code structure |
The Italian documentation is in docs/it.
| Layer | Tools |
|---|---|
| Backend | FastAPI, async SQLAlchemy + asyncpg, APScheduler |
| Data | PostgreSQL 16 with pgvector |
| Models | TypeSafe Jev (forecasts and classification), sentence-transformers paraphrase-multilingual-MiniLM-L12-v2 (embeddings), Gemini / Groq / Ollama (summaries) |
| Frontend | HTML, CSS and JavaScript with no dependencies and no build step, light and dark themes, English and Italian, keyboard accessible |
| Infrastructure | Docker (CPU or CUDA), Cloudflare Tunnel, GitHub Actions |
- No order execution. Placing orders would need Polymarket's CLOB API, a wallet and order signing. The portfolio is only simulated and assumes buying at the current book without moving the market beyond the depth it read.
- Fees. The rate depends on the category and the
/fee-rateendpoint only says whether a market is exempt: Polymarket's documentation and its API do not agree. - Similarity thresholds were tuned on the previous embedding model: with the multilingual one they should be checked on your own data.
- Targeted search via Google News RSS: an unofficial service, with no guarantees; results only have a title and an outlet.
- No password recovery by email: an admin resets it with
python -m backend.auth.cli set-password.