Free & open source · paper trading by default New Kalshi prediction markets →

Your own AI trading bot, running on your server.

Charles invests on its own with one simple, tested plan: most of the money in the whole market, a few of the strongest stocks, and a safety switch for crashes, with an AI that reads the news before every new pick. It runs on a server you control; watch it from a live dashboard and get every move on Telegram.

Runs on Alpaca's paper-trading account by default — simulated orders, no real money. Live trading is optional and entirely your call. Not financial advice.

What it does

A complete investing plan, on autopilot.

Rank, check the news, buy, protect, report: Charles does every step once a day and keeps doing it whether you're watching or not.

Picks the strongest stocks

Once a month it ranks 100 big US companies by their past-year gain and buys the top 4 that are still in an uptrend, next to an S&P 500 index fund that holds most of the money.

An AI that reads the news

Before a new pick is bought, an LLM (via Groq) reads its recent headlines and skips it for serious trouble, like an accounting probe. Every trade comes with a plain-English reason.

A safety switch for crashes

When the market ends a month below its 200-day average, everything moves to T-bills until it recovers. No stock is ever more than 5% of the account, and a daily-loss limit pauses buys.

Live dashboard

A web dashboard on your server shows your money vs the market, what Charles holds and why, this month's stock ranking and every trade, from any browser, including your phone.

Telegram alerts

Every rebalance, safety-switch change and error is pushed to your phone, plus a daily summary and a regular heartbeat so you know it's alive.

Runs 24/7, restarts itself

Installed as a system service: it starts on boot, comes back after a crash, and keeps a full log you can tail any time.

Dashboard

See everything, from any device.

Screenshots from a running instance. The dashboard runs on port 8502 and works on your phone.

Charles dashboard, home tab: a briefing from Charles, portfolio value and today's change, the safety switch gauge, and a chart of Charles's value against SPY with the same starting money
Home. Charles's briefing in plain words, your portfolio vs the market with the same money, and the safety switch: how far the market sits above its long-term trend.
The Plan tab on a phone: the four parts of the plan with what each holds now, and this month's stock ranking with the four picks marked
The plan, explained. The four parts and what each holds right now, plus this month's ranking: which stocks were picked, and why the others weren't. Add it to your phone's home screen and it opens like an app.
New · Kalshi

Stocks and prediction markets, one dashboard.

A Stocks | Kalshi switch at the top of the dashboard opens a second bot: a betting book on Kalshi's prediction markets. It bets when its forecast disagrees with the market's price by more than the fees, and shows every bet in plain English.

  • Weather — daily highs and lows in 24 cities, from the National Weather Service forecast
  • Sports — game winners, against sportsbook odds with the book's cut removed
  • Inflation — CPI markets, against the Cleveland Fed's nowcast
  • Long shots — fades cheap contracts, which win less often than their price says
Paper money only. Included in the installer: it needs no Kalshi account or key and can't place real orders. The screenshot is a live test book, losses included.
Kalshi dashboard: the Stocks and Kalshi switch, a briefing on bets settled, placed and settling soon, the betting book's value, record, and a chart of the book over time
Kalshi betting book. A briefing on what settled and what's coming up, then the book and its chart. Tap any bet for what it wins, what it loses and why the bot took it.
Kalshi holdings tab: where the money is across weather, sports, inflation and long-shot bets with each strategy's record, beside the open bets with what each one costs, wins, loses and is worth now
Holdings. Where the money sits by strategy, each one's won/lost record, and every open bet: what it cost, what it pays if it wins, what the bot expects, and what it's worth right now.
The Kalshi dashboard on a phone with Evil Charles switched on: the Charles logo turns red with red eyes and angry brows, under it the red Toggle Evil Charles button, and a card compares Charles's picks with the opposite bets over the last 30 days
New · Evil Charles

Think Charles keeps missing? Bet against him.

One red button on the Kalshi home screen, Toggle Evil Charles, turns Charles into Evil Charles. Charles still does all the work (picks the market, sizes the bet, follows the same limits), then Evil Charles puts the money on the other side. Charles's face turns red and angry so you always know who's in charge; tap again and he's back to normal.

  • One tap, either way — takes effect from the next scan; bets already open stay as they were
  • Charles vs Evil Charles — a card shows how Charles's picks and the opposite bets did over the last 30 days, after fees
  • Same safety rails — same bet sizes, caps and levels; it only flips the side
Paper money, and no promises. Betting the other side pays the fees too, so it only helps when Charles is wrong more often than the prices say. Watch the comparison card before trusting it. Included in the installer.
New · Crypto

Bitcoin and ether, with the same safety switch.

A Crypto tab next to Stocks and Kalshi runs a third bot: 60% bitcoin and 40% ether, each held only while it's above its 200-day average, the same trend rule that guards Charles's stocks. It checks once a week and steps aside into cash when a coin falls below its trend.

  • Live prices — Coinbase's public prices, updated every hour, with a 0.6% fee on every trade
  • Charles vs just holding bitcoin — the chart puts the two side by side, with the same starting money
  • Tested since 2016 — 75% a year with a worst drop of 61%, where holding bitcoin made 60% a year but fell 84%
Practice money only, and not a forecast. $1,000 of paper money, kept apart from your Alpaca account; it needs no exchange account. Since 2021 the trend rule earned less than just holding bitcoin (9% a year vs 16%) while cutting the worst drop from 77% to 41%. Past results don't promise future ones. Included in the installer.
Crypto dashboard: a briefing, the $1,000 practice book, each coin against its 200-day average, and a chart of the book against just holding bitcoin
Crypto book. What it holds and why, each coin against its 200-day average, and the book against just holding bitcoin, from one day to all time.
How it works

From GitHub to a running bot in four steps.

About 30 minutes, most of it waiting for installs. The setup guide walks through every command.

Get the code

Charles lives on GitHub. Read it, fork it, star it — it's all yours.

Start a server

Create a small Ubuntu droplet on DigitalOcean and run the one-line installer.

Add your keys

Free Alpaca paper and Groq keys (Telegram optional) go into a .env file.

Run & watch

charles-start, then follow along on the dashboard.

How Charles trades

One plan, four parts.

Charles checks once a day and trades on the first trading day of each month. No day-trading, no stop-loss whipsaws.

80% in the whole market

An S&P 500 index fund (SPY): 500 big US companies in one. Over long stretches this is where most of the growth comes from, so it's the core.

4 momentum picks, 5% each

Stocks that rose the most over the past year tend to keep doing well for a while. Each month Charles ranks 100 big names, skips the latest month's noise, and holds the top 4 that are above their 200-day average.

A safety switch

If SPY ends a month below its 200-day average, everything moves to T-bills (about 4% a year) until a month ends back above it. Long market falls like 2008 and 2022 start exactly that way.

Aggressive mode, its own call

When the market is rising and calm, Charles moves the core into a 2× S&P 500 fund, and back to plain SPY on the first choppy day. Leverage only where it has paid: calm, rising markets.

Be realistic. On 2007–2026 history (simulated, dividends, fund fees and slippage included) the plan earned about 19% a year with a worst drop of 39%, vs about 11% and 55% for SPY. But its stock list is today's, which flatters the picks; run on sector funds instead, the same plan made about 12% a year with a 35% worst drop. Aggressive mode raises returns and also the drops. Expect somewhat better than the market with smaller crashes than it, not a money machine. Not financial advice.
Make it yours

Change the bot by asking in plain English.

Install Claude Code on the same server and work on Charles in conversation: ask why it picked a stock, try a different plan on history, add a Telegram report, or explain a file. It reads the code and logs, makes the change, and can restart the bot for you.

How to set it up →
~/charles — claude
› Why did Charles skip WDC this month? Read data/plan.json · Read allocator.py WDC ranked 5th (+247% over the year), but it closed below its 200-day average, so it didn't qualify. The 4 slots went to MRNA, MU, DELL and STX. › What if it held 6 picks? Backtest it. Bash ops/heavy-run python backtest_core.py ✓ 6 picks: +13.5%/yr, worst drop −28% (4 picks: +15.5%/yr, −29%).
Open source

Free, on GitHub, yours to run.

No account, no subscription, no license key. Clone it, run it on your own server, and change anything you like.

  • Full source — read and modify every line
  • A tested plan + an AI news check
  • Dashboard and Telegram alerts
  • Paper trading by default, live optional
  • Self-hosted: your server, your keys, your data

Charles places simulated orders on Alpaca's paper account until you deliberately connect live keys. It makes no profit guarantees in any mode, past or simulated results don't predict real ones, and nothing here is financial advice. You're responsible for how you use it.