Automated Trading System with AI-Driven Strategy Evolution

All About AIgo watch the original →

The author built an autonomous trading bot for Hyperliquid that uses a scoring system to evaluate trade entries and periodically refines its strategy by feeding historical trade data back into an LLM.

The Breakthrough

The author developed a 24/7 autonomous trading system that uses a scoring-based entry mechanism and an evolutionary feedback loop, where historical trade data is periodically analyzed by an LLM to refine strategy parameters.

What Actually Worked

  • Scoring-Based Entry: The system evaluates potential trades against a 100-point scale, requiring a minimum score of 70 to execute. The scoring factors include liquidity (20 points), price trend duration (15 points), RSI balance (15 points), and bounce strength (18 points).
  • Autonomous Execution: The bot runs in a background tmux session to minimize latency and avoid the high token costs associated with running an LLM in a continuous loop. It scans the market every five minutes to check for new trade opportunities.
  • Evolutionary Feedback Loop: The system logs every trade result, including entry/exit points and performance metrics. The author periodically feeds this dataset back into the LLM to identify potential improvements, such as adding emergency exit logic or adjusting risk parameters.
  • Position Management: Once a trade is opened, the system spawns a dedicated manager process to track the position and close it automatically when predefined exit parameters are met.

Context

The author sought to move away from manual trading by creating a system that could learn from its own performance. Initial attempts to run the agent in a continuous LLM loop proved prohibitively expensive due to token consumption, leading to the current architecture where the LLM is used only for periodic strategy optimization while the trading logic runs autonomously in code. The author emphasizes that this is an experimental setup intended for learning rather than a guaranteed profit-generating machine.

Content References

  • #ai
  • #trading
  • #automation

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.