惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
博客园 - 司徒正美
博客园 - 【当耐特】
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
宝玉的分享
宝玉的分享
V
V2EX
S
SegmentFault 最新的问题
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
Martin Fowler
Martin Fowler
Jina AI
Jina AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
L
LangChain Blog
D
Docker
腾讯CDC

HN's home page

Rainbow Query Language | Hacker News Exec into Node via Kubectl An AI native hedge fund The Seven-Action Documentation Model | Hacker News Package Manager for Kubectl Plugins Tongan Castaways | Hacker News Tech overlords plan for conscious AI to conquer the cosmos. What could go wrong? Data Breach Disclosure Lag Is Getting Worse How LLMs Work | Hacker News I Dropped PRDs for Shape Up Go Experiments Explained | Hacker News FCA's Palantir deal could expose UK financial data to Trump's US, critics fear WebXR BCI for Neural-Adaptive Avatar Control in Mixed Reality The first murder conviction via DNA analysis Tom Interviews Theo de Raadt of the OpenBSD Project (2019) [video] Show HN: Replace shell commands with bun shell typescript scripts Quay.io Is Down | Hacker News AI driven analysis of brokerage account fees in the UK Bill Gates Spent Years Crafting His Image. Now It's Cracking Using LLMs to secure source code Wi-Fi 8 in the Lab [video] The household battery revolution that could change energy bills and the world Is Python Becoming Pinyin? | Hacker News Livia – Executive Assistant | Hacker News FindMyPipe – Query Apple Find My from Linux for AI Agents Show HN: Agent skill for creating product launch videos with Remotion RecruitMyself – AI job search copilot for resumes and applications AI coding agents and the erosion of system understanding The 'Resting' Generation and South Korea's Youth Recession AMD Computex 2026: 10 Years of AM4, AM5 Support Through 2029
Trader – LLM agent for Robinhood with a Rust safety layer...
zhangxd6 · 2026-06-03 · via HN's home page

I built this after Robinhood launched their official agentic trading MCP server. The idea: give an LLM access to the Robinhood MCP tools (portfolio, quotes, order placement), but sit a typed Rust safety layer in the middle that hard-enforces risk limits regardless of what the model decides.

  The architecture is a ToolExecutor trait chain:

    LLM → SafetyValidator → ResearchExecutor →
  SimulationExecutor → Robinhood MCP

  Each layer is independent. The SafetyValidator checks
  every order against your
  config (stop-loss, position caps, per-trade USD cap,
  daily trade count, minimum
  cash reserve) and rejects violations before they reach
   the broker. The
  ResearchExecutor intercepts web_search and
  get_stock_news calls and satisfies
  them locally via Yahoo Finance RSS and Brave/DDG — no
  extra API key required for
  the news side. A new get_stock_fundamentals tool
  fetches the real 52-week high,
  volume ratio, and P/E from Yahoo Finance so the LLM
  evaluates buy filters on
  actual data instead of guessing.

  Strategy is defined in YAML as a hybrid: structured
  thresholds enforced by Rust
  plus free-text judgment rules passed verbatim to the
  LLM prompt. You can run
  multiple strategies in parallel, each on its own
  interval. Paper trading uses
  live Robinhood market data against a virtual portfolio
   persisted to disk, with an
  equity curve you can view as an ASCII chart in the TUI
   or export to CSV.

  The audit log writes one JSONL line per cycle with the
   full turn-by-turn
  conversation — system prompt, every tool call and
  result, intermediate LLM
  reasoning, final response — so you can replay and
  inspect exactly what the model
  was thinking.

  Works with any OpenAI-compatible endpoint. I've tested
   with GPT-4o, Claude,
  Groq's llama-3.3-70b (free tier), and locally with
  Ollama qwen2.5:7b. The
  7B local model is borderline for reliable tool
  calling; 14B+ is more consistent.

  The obvious caveat: this is paper-trading software
  that happens to also support
  live mode. I wouldn't run it live without significant
  time in simulation first.
  dry_run: true is the default and the safety layer
  still enforces everything in
  dry-run mode — it just blocks the final order from
  reaching Robinhood.