AI Trading Agent with Risk Guardrails for Educational Investing

✍️ OpenClawRadar📅 Published: April 13, 2026🔗 Source
AI Trading Agent with Risk Guardrails for Educational Investing
Ad

A developer has built an AI-powered trading assistant that connects Claude to a brokerage account with a risk engine positioned between the AI and the money. Every trade must pass through safety checks before execution.

Key Features and Implementation

The system includes multiple risk controls:

  • Blocks trades attempting to allocate 50% of portfolio to a single stock
  • Automatically shuts off trading when down 3% in a day
  • Includes a kill switch that stops everything at 20% drawdown
  • Uses fractional Kelly Criterion for position sizing ("don't bet more than the math says you should")

The setup begins with $100K in fake money using Alpaca paper trading (free to set up). Users can interact through multiple interfaces:

  • Talking to Claude in terminal
  • Web dashboard with charts and watchlist
  • CLI commands

The AI can analyze positions and provide buy/sell/hold recommendations, with clear disclaimers that this is educational and not financial advice.

Ad

Technical Details

The project works as an MCP server, allowing integration with Claude Code. According to the developer: "If you use Claude Code, you can drop it into your setup in about 2 minutes and just start talking to it." Example commands include:

  • "What's my portfolio look like?"
  • "Buy 5 shares of AAPL."
  • "Why did you block that trade?"

Transitioning from paper to live trading requires flipping one environment variable. The same guardrails apply with real stakes.

The project is available on GitHub under MIT license, includes 129 tests, and works on Mac/Linux/WSL. The developer is seeking feedback on whether the risk limits feel appropriate for learning and what additional features users would want.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also

Portable Mind Format (PMF): Provider-Agnostic Agent Specification with 15 Open-Source Agents
Tools

Portable Mind Format (PMF): Provider-Agnostic Agent Specification with 15 Open-Source Agents

The Portable Mind Format (PMF) is a JSON-based specification for defining AI agent identities that can run across multiple models and providers, including Claude, GPT-4, Gemini, DeepSeek, and local models via Ollama. It includes 15 MIT-licensed production agents and converters for Claude Code, Cursor, GitHub Copilot, and Gemini CLI.

OpenClawRadar
Yavio: Open-Source Product Analytics SDK for MCP Apps
Tools

Yavio: Open-Source Product Analytics SDK for MCP Apps

Yavio is an open-source product analytics SDK for MCP and MCP Apps that automatically captures tool calls, errors, and resource reads with one function call. The MIT-licensed project provides a dashboard with per-tool breakdowns, funnels, retention, and error tracking.

OpenClawRadar
Claude Banana: A Claude Code plugin for image generation with design system awareness
Tools

Claude Banana: A Claude Code plugin for image generation with design system awareness

Claude Banana is a Claude Code plugin that generates images using Google's Gemini API with context-aware prompt crafting. It reads Tailwind configs, CSS variables, design tokens, and existing assets to understand project visual styles.

OpenClawRadar
Claude Code UltraPlan Workflow Changes and Performance Observations
Tools

Claude Code UltraPlan Workflow Changes and Performance Observations

Claude Code UltraPlan introduces a cloud-based planning workflow with terminal launch, browser review interface, and execution options. Testing showed approximately 2x faster repeated runs than local planning, with mixed quality improvements.

OpenClawRadar