Building an AI Stock Auto-Trading System for Workers (feat. OpenClaw)

Cover Image for Building an AI Stock Auto-Trading System for Workers (feat. OpenClaw)
baxa
baxa

🤖 I built an AI stock auto-trading system with OpenClaw.

If you don't have time to check charts after work, every worker can relate. Checking "How did Samsung Electronics do today?" on the way to work, secretly turning on HTS during lunch, sighing "Oh, today was another loss" on the way home...

Me: Pretending to work while checking charts 🙈

So I thought: "Why not just let AI do it?"


OpenClaw + Me = AI Trading System

If I had built it alone, it would have taken months. But pair programming with OpenClaw made the speed insane. I'd ask "Should I do it like this?" and it would write the code immediately. When bugs occurred, we'd debug together. When architecture was a concern, we'd design together... It really felt like coding with a senior developer by my side.


So What Did We Build?

Connecting to Korea Investment & Securities API, AI automatically performs the following process:

  1. 📊 Analyze stocks
  2. 🎯 Determine buy/sell timing
  3. 💰 Even place actual orders - a fully automated system.

Designed to work for both domestic and US stocks.


First Day Results (Demo Account)

On the first day running with the demo account, surprisingly all 5 stocks were profitable. 🟢🟢🟢🟢🟢

Stock Return P/L
DB Insurance +10.0% 🏆 +194,600 KRW
DB +6.0% +242,084 KRW
F&F +2.8% +112,000 KRW
DN Automotive +2.3% +45,500 KRW
KODEX Leverage +0.2% +580 KRW

Total P/L: +594,764 KRW

Is it true that the worst performer was +0.2%? Of course, KOSPI was up +1.57% that day so the market had some influence, but all 5 stocks being green... AI's stock picks don't seem bad. 🤔


System Operation Principle

Price collection → Score calculation → AI judgment → Risk check → Order execution → Telegram notification

  1. Stock Scoring: Combine multiple indicators like momentum, trend, volume, risk to calculate 0-100 points. 60+ points is a buy candidate.
  2. Real-time Monitoring: Immediately sell when stop-loss is touched, split/fully sell when taking profit or trend breaks.
  3. LLM Final Decision: Ask DeepSeek or OpenAI about market conditions and make final decision.
  4. Strict Risk Management: No all-in bets, Kill Switch equipped.
  5. Telegram Notification: Get notified immediately via text when orders are filled.

Tech Stack

  • Backend: Python + FastAPI
  • Broker: Korea Investment & Securities KIS API
  • AI Brain: DeepSeek / OpenAI
  • Notification: Telegram
  • Pair Programming: OpenClaw 🦞

Conclusion

The hardest part of trading is following the rules. When humans do it, they can't cut losses and chase rallies due to FOMO. So I let AI do it.

Of course, it's too early to get emotional about first-day profits, but with OpenClaw, I think we can evolve into a much more sophisticated system. I'll continue to update the process! 👀


⚠️ This post is not investment advice. All investment responsibility lies with the individual.

#AITrading #AutoTrading #OpenClaw #Quant #SideProject #FirstDayProfit