DANYLO PRAVDAHUB
0%
ALL POSTS

Trading & finance — 2026-06-27PUBLIC

AI trading and financial automation: autonomy tiers, risk layers, and the path from paper to scaled

AI trading splits into three autonomy tiers, from prompt-assisted analysis to fully agentive bots. The edge isn't the model, it's the risk architecture: a four-layer risk stack (loss halts, ATR position sizing, per-trade stops, correlation filters), the data and news APIs that feed execution, and a non-negotiable paper-to-micro-to-scaled path.

by

18 min read

Read this with AI
Included · 4 reusable skills to download
AI trading and financial automation: autonomy tiers, risk layers, and the path from paper to scaled

Someone just handed an AI the keys to a live brokerage account and told it to run wild. That is not a figure of speech. @Saboo_Shubham_ wired Claude Code and Codex into a real Robinhood account and let them trade. @Apostolakis_Geo switched on an Alpaca bot and, on day one, wrote down the only fully honest sentence in this entire field:

"Risk of blowing up the account if the strategy fails."

The fantasy of the autonomous money machine is dying, and what's replacing it is more demanding. The people actually making AI work in markets in 2026 have stopped pretending that one clever prompt or a weekend n8n tutorial prints alpha. They learned, often expensively, that the edge isn't the model's raw intelligence. It's the architecture around it:

  • the loops that verify
  • the risk layers that stop a single hallucinated "buy" from emptying an account overnight
  • the boring plumbing, the data, news, and execution APIs, that decides whether a good idea ever gets filled at a good price

This note is built from the actual artifacts working traders deployed with live money, where they disagree, and how to build one yourself without repeating their most expensive mistakes.

TESTS

CH.01

What does "autonomous trading" actually mean?

"Autonomous" covers everything from a scheduled email alert to a bot that sizes positions and manages correlation exposure on its own. Conflating those three things is where most projects die before they start. There are three distinct operational tiers, and autonomy is a gradient, not a switch.

Tier Who's running it What the AI actually does Who's the trader
1: Prompt-assisted analysis @ElsaSofia__AI Structured prompts turn Claude or ChatGPT into a financial analyst The human. The AI is a research intern that never sleeps
2: API-connected execution @Apostolakis_Geo, @Saboo_Shubham_ Writes the strategy code and decision rules. Orders flow through broker APIs AI executes (inside the broker's guardrails)
3: Fully agentive multi-strategy @adiix_official Runs mean reversion, breakouts and trend-following at once, with ATR sizing, 1% stops and correlation filters The AI, autonomously, with real money

Tier 1 is concrete. One representative @ElsaSofia__AI prompt:

"Analyze my portfolio [paste holdings] against current macro conditions. Identify concentration risk, suggest rebalancing thresholds, and flag any position exceeding 5% of total capital."

Another builds a wealth plan from salary data. Powerful for decision support, explicitly not execution.

Tier 2 touches the market. The @Apostolakis_Geo bot scans for targets and trades through the Alpaca API. The @Saboo_Shubham_ setup lets Claude Code and Codex "run wild" on a Robinhood account through Hermes, an agent-orchestration harness. The key architectural decision: the AI writes the logic, but execution still rides on broker APIs that carry their own guardrails.

Tier 3 is @adiix_official's multi-asset bot, running several deliberately-uncorrelated strategies at once (the regime mix and its risk controls are in the risk chapter), with a frontier Claude model holding a real account that it backtests and trades live. The practitioners who survive are the ones who engineer the boundaries of that autonomy with obsessive precision.

CH.02

Which architecture survives live fire?

The corpus holds a productive fight between two philosophies (ship-fast "vibe coding" and rigorous harness engineering), and the more autonomous a system claims to be, the more sophisticated its safety architecture has to become.

Rapid deployment: hard-coded risk walls

@adiix_official's system is the rapid-deployment camp: he gave a frontier Claude model access to a real trading account with real money and let it build strategies, backtest them, and run live trades autonomously. The risk parameters (ATR sizing, 1% hard stop, correlation filter) are hard-coded walls the AI operates inside. Goal-based autonomy: the human defines the risk envelope, the AI explores strategy space within it.

Orchestration: a multi-agent control plane

@Saboo_Shubham_'s Hermes-Robinhood integration leans on the orchestration layer instead. The stated plan is to "automate this end-to-end with Hermes Agent," meaning today it's partly manual. Hermes is the control plane: spawn Codex for code, Claude Code for reasoning, the Robinhood API for execution. Multi-agent by design. The detail that matters: he says he'll go full-auto only "after sometime," once he trusts it. That sequence is correct.

flowchart TD
  H["Hermes control plane"] --> C["Codex writes the code"]
  H --> R["Claude Code does the reasoning"]
  H --> A["Robinhood API places the orders"]

The non-obvious read across the two: @adiix_official's 1% stop and correlation filter aren't afterthoughts bolted on at the end. They are the load-bearing walls of the whole structure. Strip them out and the "autonomy" is just a faster way to lose money.

CH.03

What APIs actually feed the execution tier?

Separate data from execution. One set of APIs reads the market, a different one places the trade, and a third turns news into something a model can reason over. Wire them into one undifferentiated blob and you'll find out too late that your "trade" API has lousy fills, or your price feed runs a beat behind everyone you're trading against.

Three distinct API layers in a trading system, with price and indicator feeds at the base, the execution layer at the center touching live capital, and news and sentiment feeds at the top condensed for the AI agent.
Three distinct API layers in a trading system, with price and indicator feeds at the base, the execution layer at the center touching live capital, and news and sentiment feeds at the top condensed for the AI agent.

This is the concrete substance of Tier 2, the sockets the AI's strategy code plugs into. Three jobs, three layers, and the discipline to keep them apart.

Prices and indicators (read-only)

Polygon.io covers US stocks, options, indices, forex, crypto, and futures over REST, WebSocket, and S3 flat files, aggregates (OHLCV bars), trades, quotes, snapshots, and option chains, with real-time streaming on per-asset clusters at wss://socket.polygon.io/{cluster} and Python clients that drop straight into charting. It's data only, with exchange-licensing limits on redistribution. Twelve Data is the affordable unified time-series option across stocks, forex, and crypto, built for moderate-frequency strategies rather than ultra-low-latency feeds. The budget aggregators below them broaden coverage cheaply but ship thinner docs and SLAs.

Execution

Alpaca is the piece that touches money: commission-free trading in US equities, options, and crypto, with a Trading API, a Market Data API, and the official alpaca-trade-api-python SDK. The detail that makes the disciplined path below possible: you move from paper (paper-api.alpaca.markets) to live (api.alpaca.markets) by changing the credentials and the domain, same code, different account, no rewrite. Because Alpaca publishes llms.txt and OpenAPI specs, an agent framework can generate a typed client with little hand-holding. The catch is honest: its reach is mostly US markets, with KYC and order-throttling rules you handle in code, not wish away.

Tool Assets API Trades? Best for
Polygon.io Stocks, options, indices, forex, crypto, futures REST + WebSocket + S3 No Low-latency multi-asset feeds, backtesting
Twelve Data Stocks, forex, crypto REST + WebSocket No Affordable unified time-series
Alpaca US stocks, options, crypto REST + WebSocket (alpaca-trade-api-python) Yes (paper + live) End-to-end execution
Mboum Stocks, crypto, options REST + WebSocket No Budget feeds and prototypes
FCS API Forex, crypto, stocks REST No Cheap multi-asset monitoring (~$10/mo entry)

News, shaped for a model

A trading agent that writes a daily digest or feeds sentiment into its decisions needs news APIs that return enriched, summarizable text, not raw headlines you have to clean. Markets.sh built its News API for trading: embedding-powered semantic search plus AI-generated summaries, so the agent retrieves articles by ticker, sector, or theme and gets back something already condensed. Alphai is more structured still: GET /api/news/{uid}/ returns full per-ticker enrichment with categories and entities, GET /api/news/insider/ is a SEC Form-4 ownership-change feed with cursor pagination, and GET /api/symbols/{ticker}/sentiment-summary/ returns 7-day sentiment rollups. That hands a trading agent sentiment and insider signals without building an NLP pipeline.

Tool Focus Enrichment Pricing (2026) Best for
Markets.sh News Market news Semantic search + AI summaries Usage-based Summarizable news for trading agents
Alphai Finance news + sentiment Ticker sentiment, insider (Form 4), entities SaaS, usage-based Sentiment / insider signal inputs
Newsfilter.io Stock-market news Financial filtering Usage-based Real-time ticker alerts (Query + Stream APIs)
Exa News Web/news search Semantic search + date filters Usage-based RAG news digests
NewsMesh General ML entities/topics, ~90k sources Free 25/day, then $29 / $79 / $199 a month General digests, topic tracking
GNews General, 60k+ sources Basic From ~$84/mo, free 100/day Budget continuous monitoring
Mediastack General, ~7.5k sources Basic From ~$24.99/mo, 500 free/mo Budget projects
NewsAPI.org General Basic metadata Free dev, production from ~$449/mo Prototypes only, pricey at scale
Semantic Finance Market events LLM-filtered event/sentiment structuring Enterprise Institutional agents

The pricing is where people get caught. NewsAPI.org has a free dev tier, but production pricing (its listed rate was around $449/month as of mid-2026, check the current page) jumps far above the enrichment-for-the-price options. For retrieval-augmented digests, Exa returns semantically ranked results with date filters, GDELT is the free historical fallback for a low-budget build.

The architecture point underneath all of it: a backend service (LangChain, plain Python, or a framework like CrewAI, with the production-reliability caveat below) batches and caches the high-volume work, pulling a year of bars, streaming quotes, classifying headlines, while the agent only reasons over the condensed result.

Don't make the model the bus for raw data.

And mind the meter: streaming market-data feeds scale with message rate, so start on a lower tier and instrument usage from day one.

TEST 1 OF 3

CH.04

How does a weather-arbitrage terminal actually work?

@shmidtqq's weather market terminal is the sharpest system here, and it works precisely because the AI's job is to build the terminal, not to decide individual trades. This isn't an LLM choosing buy or sell. It's a specialized inference pipeline.

The mechanism: the terminal ingests weather data from the ECMWF (European Centre for Medium-Range Weather Forecasts) and GFS (Global Forecast System) models. It decomposes cities into "drivers": localized weather variables that move market-relevant outcomes. By the builder's own account, a roughly billion-parameter nowcast core prices probabilities in tens of milliseconds (treat the exact parameter count and latency as his stated figures, not measured fact).

flowchart TD
  A["ECMWF and GFS weather models"] --> B["City drivers: local weather variables"]
  B --> C["Billion-parameter nowcast core"]
  C --> D["Model probability vs prediction-market price"]
  D --> E["Gap around $0.10 fires an automatic buy"]
  F["Brier score tracked against outcomes"] --> C

It hunts for model-vs-market divergence: where the prediction-market price disagrees with the model's probability. When that gap is wide enough (he cites a divergence threshold around $0.10) it fires automatic buys.

@shmidtqq describes asking Claude, in plain language, to "build him a terminal," and the AI wrote the data ingestion, model integration, and execution logic. The human's edge is in defining what divergence means and what threshold justifies action. The AI's edge is building infrastructure to detect and act on it at speed. And the verification is baked in: the weather model's Brier score is tracked against actual outcomes.

If predictive power degrades, the edge evaporates, no matter how fast the execution is.

CH.05

What's the risk layer that saves your account?

Every strategy has drawdowns. The question is never whether your bot will lose money. It's whether it survives losing long enough for the edge to show up. Loss halts are the difference between a drawdown and a blowup.

@RoundtableSpace runs the four-layer version: loss halts (daily, monthly, total), dynamic ATR position sizing that scales down during loss streaks and up during win streaks, a per-trade stop, and a smart-money correlation filter. Read the halts as circuit breakers:

  • Daily halt: lose X% today, stop until tomorrow.
  • Monthly halt: lose Y% this month, stop until next month.
  • Total halt: account drops below Z% of its starting value, stop everything and alert the human.

Without them, a losing streak runs the account to zero. With them, you live to trade the recovery. @adiix_official's system enumerates the rest of the wall:

The four layers of risk control in a survivable trading system, from correlation filtering at the base to loss halts at the top, each vetting a trade before any order reaches the market.
The four layers of risk control in a survivable trading system, from correlation filtering at the base to loss halts at the top, each vetting a trade before any order reaches the market.
Control What it actually does
Strategy diversification Mean reversion (indices), breakouts (Bitcoin), trend-following (commodities), chosen to perform in different regimes, deliberately uncorrelated
ATR-based position sizing Size scales with volatility: higher volatility, smaller position. Kills the failure where fixed sizes are fine in calm markets and catastrophic in violent ones
1% hard stop No single trade loses more than 1% of total capital. A constraint, not a suggestion
Correlation filter Blocks positions that look diversified but would move together in a crisis

The dynamic win/loss sizing is Kelly-adjacent: shrink when losing to preserve capital, grow when winning to compound. Mathematically optimal, emotionally almost impossible for a human to do consistently, which is exactly why it belongs in code. And the load-bearing detail: these constraints live in the execution layer, not as polite suggestions to the AI. The AI generates trades. The risk system vets and modifies them before any order hits the market. That separation of strategy-generation from risk-enforcement is what distinguishes a survivable system from one that blows up on its first black swan.

TEST 2 OF 3

CH.06

Loops or verification: which one keeps you alive?

Loops are essential, but only inside a verification harness. That's the synthesis on the iteration-loop axis (distinct from the autonomy-boundary fight earlier): how the bot improves itself, not how much rope you give it.

@0xCodez speaks for the speed camp: "I don't prompt Claude anymore, I write loops." Automate the iteration cycle so the AI checks its own work and keeps going until a criterion is met. @DeRonin_ is the skeptic, and blunt about which tools to avoid:

"Avoid AutoGen/AG2: moved to community maintenance, releases stalled. Dead for production. CrewAI: demos well, breaks in production."

His point: framework hype outruns production reliability, and the skill that actually compounds is "context engineering, tool design, orchestrator-subagent pattern, eval discipline, the harness mindset." (Worth holding next to the backend-framework choice above, a LangChain or CrewAI tool layer is fine glue, but the reliability lives in your harness, not the framework's demo.) @Voxyz_ai's "Production-Grade Goal" template is what the loop looks like once you bolt verification onto it:

"goal: {your task}. keep going until the architecture and result meet the bar, not just until it runs. after every meaningful step: real-time test the real thing (full end-to-end, plus computer use, browser, keystrokes, whatever it needs), auto review then commit, write progress somewhere sensible in the project. finished: one dedicated review pass over everything. done = every dimension at 100%, production-grade, a real user can walk in and use it."

That's the antidote to both failure modes at once: the vibe-coder who ships broken fast and the perfectionist who never ships at all.

CH.07

Which prompts actually move money?

@ElsaSofia__AI's trading prompts make you a faster, more thorough analyst. They do not make you a profitable trader, and pretending otherwise is the trap. Examined closely, the effective ones share four structural elements:

  1. Explicit role assignment: "Act as a quantitative risk analyst," "You are a portfolio construction specialist."
  2. Structured input format: holdings as a table, macro conditions as bullets, constraints as numerical thresholds.
  3. Multi-step reasoning instruction: "First identify concentration risk, then suggest rebalancing thresholds, finally flag any position exceeding 5% of total capital."
  4. Output format specification: JSON for structured data, markdown tables for comparison, prose for narrative.

The honest gap: between "good analysis" and "profitable trade" sit execution, timing, risk management, and the willingness to be wrong, none of which an LLM supplies. What works better is prompts that force real cognitive work:

  • Comparative: "Compare the cash flow profiles of these three companies in the same sector, normalize for capital expenditure differences, and identify which one is most likely to sustain its dividend through a recession."
  • Contrarian: "For each bullish thesis on this stock, generate the strongest bearish counterargument with specific data points."
  • Show-your-work: "Walk through a DCF valuation step by step, explicitly state every assumption, and show how the output changes if revenue growth is 2% lower than your base case."

@adiix_official takes the next step, using the AI to write the code that enforces the rules instead of applying them conversationally: "Generate a Python function that calculates ATR-based position sizes given a price series and a risk budget." The output gets reviewed, tested, and wired into the execution system. Code enforces. Chat suggests.

CH.08

Where's the real edge hiding?

Every source obsesses over the trading logic. The actual edge is almost never in the signal. It's in three places nobody wants to talk about.

Three unglamorous places a trading edge disappears before it ever reaches a chart: slippage on execution, a data feed running behind the market, and positions that look diversified but move as one bet. The article argues the edge lives in this plumbing, not in the signal itself.
Three unglamorous places a trading edge disappears before it ever reaches a chart: slippage on execution, a data feed running behind the market, and positions that look diversified but move as one bet. The article argues the edge lives in this plumbing, not in the signal itself.

Execution quality

Getting filled two cents worse on every trade compounds into a brutal drag over thousands of trades. Alpaca's API is convenient. Its execution is not institutional-grade. Trade liquid equities with tight spreads and it barely matters. Trade anything with width (small caps, crypto, options) and slippage eats the edge alive.

Data latency

The weather terminal works because weather data reaches the market slowly. Reverse that and you lose: a market feed 500ms behind, a sentiment API that batches every 60 seconds, and you're trading stale information against people who aren't. This is the unglamorous reason the data layer above matters: a feed that's gappy or a few hundred milliseconds behind quietly hands your edge to someone faster. The architecture of your data pipeline matters more than the architecture of your strategy.

Correlation blindness

Most retail bots don't realize they're making the same bet five ways. Long tech, long semis, long crypto, long growth ETFs, long AI stocks: that's one macro bet on risk appetite and rates, wearing five costumes. When it breaks, all five move against you at once. The correlation filter from the risk chapter is what prevents it, and its absence is the most common cause of blowups that "nobody could have seen coming."

CH.09

How do you go from zero to live in 90 days?

Built for a reader with basic programming literacy and access to Claude. It moves from analysis to execution on a realistic clock. The order is not negotiable: infrastructure before strategy, paper before money, small before scaled.

The three-phase path from paper trading to scaled live deployment, with explicit go/no-go gates that must pass before the next phase begins.
The three-phase path from paper trading to scaled live deployment, with explicit go/no-go gates that must pass before the next phase begins.

Phase 1: Paper trading (days 1–30)

Goal: prove the infrastructure doesn't break. Profit is not the goal here.

  1. Open an Alpaca paper account (free, minutes). Configure the paper endpoint: https://paper-api.alpaca.markets.
  2. Build a single-strategy bot with Claude Code or Codex. Start dead simple: a moving-average crossover on SPY, fed by a Twelve Data or Polygon price feed. Do not try to build the multi-asset system on day one.
  3. Implement the four-layer risk stack before the strategy: loss halts (daily 2%, monthly 5%, total 10%), ATR position sizing, a 1% per-trade stop, and a correlation filter. No exceptions. Wire it to an orchestration layer (n8n or similar) for scheduling and notifications. It texts you every trade and a daily P&L summary.
  4. Log everything: every signal, constraint check, execution. The log is your training data.
  5. Run 30 days on paper.

Decision criteria: trades execute without errors, risk halts fire correctly on simulated drawdowns, notifications are reliable → proceed. Any of those fail → fix first. Do not skip this.

Phase 2: Micro-position live trading (days 31–60)

Goal: connect analysis to execution without risking meaningful capital.

  1. Switch to a live Alpaca account by swapping the credentials and domain to api.alpaca.markets, minimum viable deposit ($1,000–$5,000, money you can lose entirely).
  2. Set position sizes to the minimum: one share per trade. You're testing execution, not making money.
  3. Monitor slippage: the gap between the price your bot thinks it got and what it actually got. Above 0.1% on average, your execution is the problem, not your strategy.
  4. Add the correlation filter. Even with one strategy, check your positions aren't secretly the same bet: long SPY calls and long QQQ calls is one position, not two.
  5. Run 30 days. Calculate your Sharpe ratio. Below 0.5 means no edge. Back to paper with a different approach.

Decision criteria: Sharpe above 0.5, acceptable slippage, no risk halt tripped by a bug (as opposed to legitimate market movement) → proceed.

Phase 3: Scaled live trading (days 61–90)

Goal: implement the multi-strategy architecture in simplified form.

  1. Size positions by ATR. The formula: position size = (account equity × 1% risk per trade) / ATR of the asset. A $10,000 account risking 1% ($100) on an asset with a $2 ATR gets 50 shares. Re-derive as equity and ATR change.
  2. Add a second uncorrelated strategy once the first works: mean reversion on indices alongside breakouts on Bitcoin is a clean template, because they trade different instruments with different logic.
  3. Add dynamic position sizing: reduce size by 25% after each losing trade, increase by 10% after each winning trade. Conservative Kelly: protect capital in drawdowns, compound in streaks.
  4. Optionally bolt on a news layer, Markets.sh or Alphai sentiment feeding a daily digest and trading notes, but as input to your judgment, never an auto-trigger.
  5. Set up a phone interface (a Telegram or WhatsApp bot) so you can monitor and override from anywhere. It should text you "daily loss halt triggered, -2.1% today, resuming tomorrow," and you should be able to text back "halt all trading until I review" and have it actually stop.

Verification checkpoints

Checkpoint Pass criteria
Analysis accuracy AI risk scores correlate with your manual assessment in 18/20 cases
Constraint enforcement All 20 test cases of deliberate constraint violation are blocked
Paper trading P&L Positive after 30 days, or explainable negative (e.g., strategy designed for a different market regime)
System uptime No unplanned failures in a 2-week period
Human override Can halt all trading within 60 seconds of decision

How to verify it worked. After 90 days you should have: (a) a system that ran at least 100 live trades without infrastructure failure, (b) a Sharpe ratio above 1.0, (c) a maximum drawdown below 10%, (d) zero instances where the bot traded when a risk halt should have stopped it, and (e) the ability to shut everything down from your phone in under 60 seconds. Treat those targets as goals to clear, not returns you're owed. All five → you have a system. Missing any → you have a prototype that needs more work before you scale.

TEST 3 OF 3

CH.10

What's the honest truth about all this?

The technology is real. The APIs work. The risk controls are implementable. What's not yet real is any evidence these systems beat a buy-and-hold index fund after slippage, fees, compute, and the hours you pour into building them. Flag the hype where it lives:

  • @adiix_official's claim that Claude replaces "quant teams" and Bloomberg terminals is aspirational. The actual system is a set of risk-constrained strategies, not a full quant research platform.
  • @shmidtqq's weather edge depends on a market inefficiency that may close as more participants pile in.
  • @Apostolakis_Geo was on day one when he posted. No claim of instant success, no passive-income promise, just the start of a disciplined process.

Two structural traps sit under the tidy comparison tables, too. Compliance is yours regardless of tooling: Alpaca's KYC and order-throttling apply through any wrapper, and trade execution belongs behind real risk controls, never auto-fired at scale. The data-latency trap from the edge chapter applies here too: verify a cheap feed's accuracy before anything load-bearing depends on it. Every source mentioning trading revenue is either hypothetical or claimed without evidence. And the caveat @Apostolakis_Geo wrote on day one still frames the whole field best:

"Risk of blowing up the account if the strategy fails."

And the deeper limit:

No system here has removed the need for human judgment in defining what "good" looks like.

The AI optimizes within constraints. It cannot set them. The 1% hard stop, the correlation threshold, the ATR multiplier: those are human decisions encoding risk tolerance and market philosophy. The automation that works is the kind that makes explicit what used to live in a trader's gut, then enforces it with mechanical consistency. The AI is a tool for expressing an edge, not a substitute for having one.

Build the infrastructure. Pick the API that fits the layer and drive it the way the platform actually rewards. Implement the risk controls. Start small. Measure everything. And remember the market's most expensive lesson: the one where your automation worked flawlessly, and all it did was execute, perfectly, a strategy that never had an edge in the first place.

MEMBER BONUS · MY ACTUAL SKILLS

The 4 skills behind this note

  • Research a topic into clusters

    Turn a TOPIC into current, deduped, exhaustively-sourced DRAFT NOTES via the v5 research engine (research/,...

    Sign in to open
  • Publish the article

    THE long-form article publisher

    Sign in to open
  • Narrate a note (audiobook)

    Stage 3 of the blog pipeline

    Sign in to open
  • Generate the quiz

    Stage 4 of the blog pipeline

    Sign in to open
tradingfinancialautomationriskapis

KEEP GOING

Take this with you.

Found this useful? Like it so others find it.
SHAREXLinkedIn
DashboardPrefer email? Turn it on in your dashboard.
DISCUSSION

No comments yet. Start the conversation.

Sign in to join the discussion. It's free.