moon-dev-ai-agents-for-trading
ai agents for trading
Stars: 861
Moon Dev AI Agents for Trading is an experimental project exploring the potential of artificial financial intelligence for trading and investing research. The project aims to develop AI agents to complement and potentially replace human trading operations by addressing common trading challenges such as emotional reactions, ego-driven decisions, inconsistent execution, fatigue effects, impatience, and fear & greed cycles. The project focuses on research areas like risk control, exit timing, entry strategies, sentiment collection, and strategy execution. It is important to note that this project is not a profitable trading solution and involves substantial risk of loss.
README:
This project explores the potential of artificial financial intelligence - a focused implementation of AI for trading and investing research.
⭐️ first full concise documentation video (watch here)
📀 follow all updates here on youtube: https://www.youtube.com/playlist?list=PLXrNVMjRZUJg4M4uz52iGd1LhXXGVbIFz
We're researching AI agents for trading that will eventually leverage AFI. With 4 years of experience training humans through our bootcamp, we're exploring where AI agents might complement human trading operations, and later replace trading human operations. This is experimental research, not a profitable trading solution.
AI agents will be able to build a better quant portfolio than humans. i've spent the last 4 years building quant systems & training others to do so. 2025 is about replicating that success but with ai agents doing it instead of me. in 2026 i will release a paper of my findings after a full year of testing ai agents in quant vs the last 4 years of humans.
AI agents might help address common trading challenges:
- Emotional reactions
- Ego-driven decisions
- Inconsistent execution
- Fatigue effects
- Impatience
- Fear & Greed cycles
While we use the RBI framework for strategy research, we're exploring AI agents as potential tools. We're in early stages with LLM technology, investigating possibilities in the trading space.
There is no token associated with this project and there never will be. any token launched is not affiliated with this project, moon dev will never dm you. be careful. don't send funds anywhere
all the video updates are consolidated in the below playlist on youtube 📀 https://www.youtube.com/playlist?list=PLXrNVMjRZUJg4M4uz52iGd1LhXXGVbIFz
There is no token associated with this project and there never will be. any token launched is not affiliated with this project, moon dev will never dm you. be careful. don't send funds anywhere
PLEASE READ CAREFULLY:
-
This is an experimental research project, NOT a trading system
-
There are NO plug-and-play solutions for guaranteed profits
-
We do NOT provide trading strategies
-
Success depends entirely on YOUR:
- Trading strategy
- Risk management
- Market research
- Testing and validation
- Overall trading approach
-
NO AI agent can guarantee profitable trading
-
You MUST develop and validate your own trading approach
-
Trading involves substantial risk of loss
-
Past performance does not indicate future results
Project updates will be posted in discord, join here: moondev.com
- Free Algo Trading Roadmap: moondev.com
- Algo Trading Education: algotradecamp.com
- Business Contact [email protected]
- Trading Agent (
trading_agent.py): Example agent that analyzes token data via LLM to make basic trade decisions - Strategy Agent (
strategy_agent.py): Manages and executes trading strategies placed in the strategies folder - Risk Agent (
risk_agent.py): Monitors and manages portfolio risk, enforcing position limits and PnL thresholds - Copy Agent (
copy_agent.py): monitors copy bot for potential trades - Whale Agent (
whale_agent.py): monitors whale activity and announces when a whale enters the market - Sentiment Agent (
sentiment_agent.py): analyzes Twitter sentiment for crypto tokens with voice announcements - Listing Arbitrage Agent (
listingarb_agent.py): identifies promising Solana tokens on CoinGecko before they reach major exchanges like Binance and Coinbase, using parallel AI analysis for technical and fundamental insights - Focus Agent (
focus_agent.py): randomly samples audio during coding sessions to maintain productivity, providing focus scores and voice alerts when focus drops (~$10/month, perfect for voice-to-code workflows) - Funding Agent (
funding_agent.py): monitors funding rates across exchanges and uses AI to analyze opportunities, providing voice alerts for extreme funding situations with technical context 🌙 - Liquidation Agent (
liquidation_agent.py): tracks liquidation events with configurable time windows (15min/1hr/4hr), providing AI analysis and voice alerts for significant liquidation spikes 💦 - Chart Agent (
chartanalysis_agent.py): looks at any crypto chart and then analyzes it with ai to make a buy/sell/nothing reccomendation. - funding rate arbitrage agent (
fundingarb_agent.py): tracks the funding rate on hyper liquid to find funding rate arbitrage opportunities between hl and solana - rbi agent (
rbi_agent.py): uses deepseek to research trading strategies based on the youtube video, pdf, or words you give it. then sends to his ai friend who codes out the backtest. - twitter agent (
tweet_agent.py): takes in text and creates tweets using deepseek or other models - video agent (
video_agent.py): takes in text to create videos by creating audio snippets using elevenlabs and combining with raw_video footage
- [x] Basic project structure
- [x] Environment setup
- [x] Token data collection
- [x] Basic trading functions
- [x] Market data API integration (OI, Liquidations, Funding)
- [x] Risk management agent with PnL limits
- [x] Risk agent minimum balance protection (1/8/25)
- [x] CopyBot portfolio analyzer (1/8/25)
- [x] Comprehensive API access for Quantalete members (1/15/25)
- [ ] Portfolio optimization
- [ ] Advanced risk management
- [ ] Machine learning integration
- [x] Sentiment analysis with voice announcements
- [ ] Backtesting framework
- [ ] Performance analytics
- [x] 1/27 - built a tweet agent and video agent
- [x] 1/23 - build an rbi agent that codes backtests based on trading strategy videos, pdfs or words
- [x] 1/20 - built the funding rate arbitrage trading agent to annnounce when there is a funding rate arbitrage between hyperliquid tokens and spot solana tokens. later we can update this to place the trades
- [x] 1/17 - built chuck the chart analysis agent that reads in any crypto chart and then analyzes it to get a buy/sell/nothing reccomendation.
- [x] 1/16 - Built Luna the Liquidation Agent with configurable time windows (15min/1hr/4hr) - Updated Whale Agent to use new OI data format - Fixed Funding Agent to handle new API structure - All agents now using consistent Moon Dev API v2
- [x] 1/15 - Released comprehensive API access with detailed documentation - Historical liquidation data endpoints - Real-time funding rate monitoring - New Solana token launch tracking - Detailed & combined ETH/BTC open interest historical data - CopyBot data access for reference (follow list & their recent transactions)
- [x] 1/14 - Added Funding Rate Agent that monitors and announces extreme funding rates - Uses AI to analyze funding opportunities with technical context - Provides voice announcements for significant funding events - Tracks historical funding data for better analysis
- [x] 1/12 - built a Listing Arbitrage Agent that identifies promising Solana tokens before they reach major exchanges - Uses parallel AI analysis with technical and fundamental agents - Filters by market cap and volume criteria - Saves analysis results and buy recommendations to CSV
- [x] 1/10 - built a coin gecko agent conversation between 2 ai agents and all of coin geckos data
- [x] 1/10 - added a focus agent that will take random samples of my voice to ensure im always locked in. my kpi is 200 ai uses per day which is hard when i yap so this is the solution.
- [x] 1/9 - Added Sentiment Analysis Agent with voice announcements and historical tracking - Monitors Twitter sentiment for major tokens - Tracks sentiment changes over time - Announces significant sentiment shifts - updated the whale agent as well to work better
- [x] 1/8 - Added minimum balance protection to Risk Agent with configurable AI consultation - Completed CopyBot portfolio analyzer with position sizing - V0 of the whale agent launched
- [x] 1/7 - CopyBot Agent: Added AI agent to analyze copybot portfolio and decide on whether it should take a position on their account
- [x] 1/6 - Market Data API: Added comprehensive API for liquidations, funding rates, open interest, and copybot data
- [x] 1/5 - created a documentation training video with a full walkthrough of this github (releasing jan 7th)
- [x] 1/4 - strategy_agent.py: an ai agent that has last say on any strategy placed in strategies folder
- [x] 1/3 - risk_agent.py: built out an ai agent to manage risk
- [x] 1/2 - trading_agent.py: built the first trading agent
- [x] 1/1 - first lines of code written
-
⭐ Star the Repo
- Click the star button to save it to your GitHub favorites
-
🍴 Fork the Repo
- Fork to your GitHub account to get your own copy
- This lets you make changes and track updates
-
💻 Open in Your IDE
- Clone to your local machine
- Recommended: Use Cursor or Windsurfer for AI-enabled coding
-
🔑 Set Environment Variables
- Check
.env.examplefor required variables - Create a copy of above and name it
.envfile with your keys:- Anthropic API key
- Other trading API keys
⚠️ Never commit or share your API keys!
- Check
-
🤖 Customize Agent Prompts
- Navigate to
/agentsfolder - Modify LLM prompts to fit your needs
- Each agent has configurable parameters
- Navigate to
-
📈 Implement Your Strategies
- Add your strategies to
/strategiesfolder - Remember: Out-of-box code is NOT profitable
- Thorough testing required before live trading
- Add your strategies to
-
🏃♂️ Run the System
- Execute via
main.py - Toggle agents on/off as needed
- Monitor logs for performance
- Execute via
Built with love by Moon Dev - Pioneering the future of AI-powered trading
The content presented is for educational and informational purposes only and does not constitute financial advice. All trading involves risk and may not be suitable for all investors. You should carefully consider your investment objectives, level of experience, and risk appetite before investing.
Past performance is not indicative of future results. There is no guarantee that any trading strategy or algorithm discussed will result in profits or will not incur losses.
CFTC Disclaimer: Commodity Futures Trading Commission (CFTC) regulations require disclosure of the risks associated with trading commodities and derivatives. There is a substantial risk of loss in trading and investing.
I am not a licensed financial advisor or a registered broker-dealer. Content & code is based on personal research perspectives and should not be relied upon as a guarantee of success in trading.
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for moon-dev-ai-agents-for-trading
Similar Open Source Tools
moon-dev-ai-agents-for-trading
Moon Dev AI Agents for Trading is an experimental project exploring the potential of artificial financial intelligence for trading and investing research. The project aims to develop AI agents to complement and potentially replace human trading operations by addressing common trading challenges such as emotional reactions, ego-driven decisions, inconsistent execution, fatigue effects, impatience, and fear & greed cycles. The project focuses on research areas like risk control, exit timing, entry strategies, sentiment collection, and strategy execution. It is important to note that this project is not a profitable trading solution and involves substantial risk of loss.
awesome-agent-failures
Awesome AI Agent Failures is a community-curated repository documenting known failure modes for AI agents, real-world case studies, and techniques to avoid failures. It provides insights into common failure modes such as tool hallucination, response hallucination, goal misinterpretation, plan generation failures, incorrect tool use, verification & termination failures, and prompt injection. The repository also includes resources like research papers, industry resources, books, external resources, and related awesome lists to help AI engineers build more reliable AI agents by learning from production failures.
council
Council is an open-source platform designed for the rapid development and deployment of customized generative AI applications using teams of agents. It extends the LLM tool ecosystem by providing advanced control flow and scalable oversight for AI agents. Users can create sophisticated agents with predictable behavior by leveraging Council's powerful approach to control flow using Controllers, Filters, Evaluators, and Budgets. The framework allows for automated routing between agents, comparing, evaluating, and selecting the best results for a task. Council aims to facilitate packaging and deploying agents at scale on multiple platforms while enabling enterprise-grade monitoring and quality control.
hackingBuddyGPT
hackingBuddyGPT is a framework for testing LLM-based agents for security testing. It aims to create common ground truth by creating common security testbeds and benchmarks, evaluating multiple LLMs and techniques against those, and publishing prototypes and findings as open-source/open-access reports. The initial focus is on evaluating the efficiency of LLMs for Linux privilege escalation attacks, but the framework is being expanded to evaluate the use of LLMs for web penetration-testing and web API testing. hackingBuddyGPT is released as open-source to level the playing field for blue teams against APTs that have access to more sophisticated resources.
crewAI
crewAI is a cutting-edge framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks. It provides a flexible and structured approach to AI collaboration, enabling users to define agents with specific roles, goals, and tools, and assign them tasks within a customizable process. crewAI supports integration with various LLMs, including OpenAI, and offers features such as autonomous task delegation, flexible task management, and output parsing. It is open-source and welcomes contributions, with a focus on improving the library based on usage data collected through anonymous telemetry.
chatgpt-universe
ChatGPT is a large language model that can generate human-like text, translate languages, write different kinds of creative content, and answer your questions in a conversational way. It is trained on a massive amount of text data, and it is able to understand and respond to a wide range of natural language prompts. Here are 5 jobs suitable for this tool, in lowercase letters: 1. content writer 2. chatbot assistant 3. language translator 4. creative writer 5. researcher
aiid
The Artificial Intelligence Incident Database (AIID) is a collection of incidents involving the development and use of artificial intelligence (AI). The database is designed to help researchers, policymakers, and the public understand the potential risks and benefits of AI, and to inform the development of policies and practices to mitigate the risks and promote the benefits of AI. The AIID is a collaborative project involving researchers from the University of California, Berkeley, the University of Washington, and the University of Toronto.
intelligence-toolkit
The Intelligence Toolkit is a suite of interactive workflows designed to help domain experts make sense of real-world data by identifying patterns, themes, relationships, and risks within complex datasets. It utilizes generative AI (GPT models) to create reports on findings of interest. The toolkit supports analysis of case, entity, and text data, providing various interactive workflows for different intelligence tasks. Users are expected to evaluate the quality of data insights and AI interpretations before taking action. The system is designed for moderate-sized datasets and responsible use of personal case data. It uses the GPT-4 model from OpenAI or Azure OpenAI APIs for generating reports and insights.
HybridAGI
HybridAGI is the first Programmable LLM-based Autonomous Agent that lets you program its behavior using a **graph-based prompt programming** approach. This state-of-the-art feature allows the AGI to efficiently use any tool while controlling the long-term behavior of the agent. Become the _first Prompt Programmers in history_ ; be a part of the AI revolution one node at a time! **Disclaimer: We are currently in the process of upgrading the codebase to integrate DSPy**
SwiftSage
SwiftSage is a tool designed for conducting experiments in the field of machine learning and artificial intelligence. It provides a platform for researchers and developers to implement and test various algorithms and models. The tool is particularly useful for exploring new ideas and conducting experiments in a controlled environment. SwiftSage aims to streamline the process of developing and testing machine learning models, making it easier for users to iterate on their ideas and achieve better results. With its user-friendly interface and powerful features, SwiftSage is a valuable tool for anyone working in the field of AI and ML.
asreview
The ASReview project implements active learning for systematic reviews, utilizing AI-aided pipelines to assist in finding relevant texts for search tasks. It accelerates the screening of textual data with minimal human input, saving time and increasing output quality. The software offers three modes: Oracle for interactive screening, Exploration for teaching purposes, and Simulation for evaluating active learning models. ASReview LAB is designed to support decision-making in any discipline or industry by improving efficiency and transparency in screening large amounts of textual data.
TinyTroupe
TinyTroupe is an experimental Python library that leverages Large Language Models (LLMs) to simulate artificial agents called TinyPersons with specific personalities, interests, and goals in simulated environments. The focus is on understanding human behavior through convincing interactions and customizable personas for various applications like advertisement evaluation, software testing, data generation, project management, and brainstorming. The tool aims to enhance human imagination and provide insights for better decision-making in business and productivity scenarios.
PlanExe
PlanExe is an open-source tool that turns a single plain-english goal statement into a 40-page strategic plan in approximately 15 minutes using local or cloud models. It accelerates the creation of outlines, providing outputs such as executive summaries, Gantt charts, governance structures, role descriptions, stakeholder maps, risk registers, and SWOT analyses. While the tool significantly reduces the labor required for planning scaffolds, the final refinement to create a polished, client-ready document still necessitates human intervention. PlanExe's technical quality in terms of structure, formatting, and coherence is often superior to human junior/mid-tier consulting drafts, but areas such as budgets, timelines, metrics, and legal/operational realism may require further human refinement for high-stakes topics.
mahilo
Mahilo is a flexible framework for creating multi-agent systems that can interact with humans while sharing context internally. It allows developers to set up complex agent networks for various applications, from customer service to emergency response simulations. Agents can communicate with each other and with humans, making the system efficient by handling context from multiple agents and helping humans stay focused on specific problems. The system supports Realtime API for voice interactions, WebSocket-based communication, flexible communication patterns, session management, and easy agent definition.
Controllable-RAG-Agent
This repository contains a sophisticated deterministic graph-based solution for answering complex questions using a controllable autonomous agent. The solution is designed to ensure that answers are solely based on the provided data, avoiding hallucinations. It involves various steps such as PDF loading, text preprocessing, summarization, database creation, encoding, and utilizing large language models. The algorithm follows a detailed workflow involving planning, retrieval, answering, replanning, content distillation, and performance evaluation. Heuristics and techniques implemented focus on content encoding, anonymizing questions, task breakdown, content distillation, chain of thought answering, verification, and model performance evaluation.
uncheatable_eval
Uncheatable Eval is a tool designed to assess the language modeling capabilities of LLMs on real-time, newly generated data from the internet. It aims to provide a reliable evaluation method that is immune to data leaks and cannot be gamed. The tool supports the evaluation of Hugging Face AutoModelForCausalLM models and RWKV models by calculating the sum of negative log probabilities on new texts from various sources such as recent papers on arXiv, new projects on GitHub, news articles, and more. Uncheatable Eval ensures that the evaluation data is not included in the training sets of publicly released models, thus offering a fair assessment of the models' performance.
For similar tasks
ai_quant_trade
The ai_quant_trade repository is a comprehensive platform for stock AI trading, offering learning, simulation, and live trading capabilities. It includes features such as factor mining, traditional strategies, machine learning, deep learning, reinforcement learning, graph networks, and high-frequency trading. The repository provides tools for monitoring stocks, stock recommendations, and deployment tools for live trading. It also features new functionalities like sentiment analysis using StructBERT, reinforcement learning for multi-stock trading with a 53% annual return, automatic factor mining with 5000 factors, customized stock monitoring software, and local deep reinforcement learning strategies.
moon-dev-ai-agents-for-trading
Moon Dev AI Agents for Trading is an experimental project exploring the potential of artificial financial intelligence for trading and investing research. The project aims to develop AI agents to complement and potentially replace human trading operations by addressing common trading challenges such as emotional reactions, ego-driven decisions, inconsistent execution, fatigue effects, impatience, and fear & greed cycles. The project focuses on research areas like risk control, exit timing, entry strategies, sentiment collection, and strategy execution. It is important to note that this project is not a profitable trading solution and involves substantial risk of loss.
For similar jobs
qlib
Qlib is an open-source, AI-oriented quantitative investment platform that supports diverse machine learning modeling paradigms, including supervised learning, market dynamics modeling, and reinforcement learning. It covers the entire chain of quantitative investment, from alpha seeking to order execution. The platform empowers researchers to explore ideas and implement productions using AI technologies in quantitative investment. Qlib collaboratively solves key challenges in quantitative investment by releasing state-of-the-art research works in various paradigms. It provides a full ML pipeline for data processing, model training, and back-testing, enabling users to perform tasks such as forecasting market patterns, adapting to market dynamics, and modeling continuous investment decisions.
jupyter-quant
Jupyter Quant is a dockerized environment tailored for quantitative research, equipped with essential tools like statsmodels, pymc, arch, py_vollib, zipline-reloaded, PyPortfolioOpt, numpy, pandas, sci-py, scikit-learn, yellowbricks, shap, optuna, ib_insync, Cython, Numba, bottleneck, numexpr, jedi language server, jupyterlab-lsp, black, isort, and more. It does not include conda/mamba and relies on pip for package installation. The image is optimized for size, includes common command line utilities, supports apt cache, and allows for the installation of additional packages. It is designed for ephemeral containers, ensuring data persistence, and offers volumes for data, configuration, and notebooks. Common tasks include setting up the server, managing configurations, setting passwords, listing installed packages, passing parameters to jupyter-lab, running commands in the container, building wheels outside the container, installing dotfiles and SSH keys, and creating SSH tunnels.
FinRobot
FinRobot is an open-source AI agent platform designed for financial applications using large language models. It transcends the scope of FinGPT, offering a comprehensive solution that integrates a diverse array of AI technologies. The platform's versatility and adaptability cater to the multifaceted needs of the financial industry. FinRobot's ecosystem is organized into four layers, including Financial AI Agents Layer, Financial LLMs Algorithms Layer, LLMOps and DataOps Layers, and Multi-source LLM Foundation Models Layer. The platform's agent workflow involves Perception, Brain, and Action modules to capture, process, and execute financial data and insights. The Smart Scheduler optimizes model diversity and selection for tasks, managed by components like Director Agent, Agent Registration, Agent Adaptor, and Task Manager. The tool provides a structured file organization with subfolders for agents, data sources, and functional modules, along with installation instructions and hands-on tutorials.
hands-on-lab-neo4j-and-vertex-ai
This repository provides a hands-on lab for learning about Neo4j and Google Cloud Vertex AI. It is intended for data scientists and data engineers to deploy Neo4j and Vertex AI in a Google Cloud account, work with real-world datasets, apply generative AI, build a chatbot over a knowledge graph, and use vector search and index functionality for semantic search. The lab focuses on analyzing quarterly filings of asset managers with $100m+ assets under management, exploring relationships using Neo4j Browser and Cypher query language, and discussing potential applications in capital markets such as algorithmic trading and securities master data management.
jupyter-quant
Jupyter Quant is a dockerized environment tailored for quantitative research, equipped with essential tools like statsmodels, pymc, arch, py_vollib, zipline-reloaded, PyPortfolioOpt, numpy, pandas, sci-py, scikit-learn, yellowbricks, shap, optuna, and more. It provides Interactive Broker connectivity via ib_async and includes major Python packages for statistical and time series analysis. The image is optimized for size, includes jedi language server, jupyterlab-lsp, and common command line utilities. Users can install new packages with sudo, leverage apt cache, and bring their own dot files and SSH keys. The tool is designed for ephemeral containers, ensuring data persistence and flexibility for quantitative analysis tasks.
Qbot
Qbot is an AI-oriented automated quantitative investment platform that supports diverse machine learning modeling paradigms, including supervised learning, market dynamics modeling, and reinforcement learning. It provides a full closed-loop process from data acquisition, strategy development, backtesting, simulation trading to live trading. The platform emphasizes AI strategies such as machine learning, reinforcement learning, and deep learning, combined with multi-factor models to enhance returns. Users with some Python knowledge and trading experience can easily utilize the platform to address trading pain points and gaps in the market.
FinMem-LLM-StockTrading
This repository contains the Python source code for FINMEM, a Performance-Enhanced Large Language Model Trading Agent with Layered Memory and Character Design. It introduces FinMem, a novel LLM-based agent framework devised for financial decision-making, encompassing three core modules: Profiling, Memory with layered processing, and Decision-making. FinMem's memory module aligns closely with the cognitive structure of human traders, offering robust interpretability and real-time tuning. The framework enables the agent to self-evolve its professional knowledge, react agilely to new investment cues, and continuously refine trading decisions in the volatile financial environment. It presents a cutting-edge LLM agent framework for automated trading, boosting cumulative investment returns.
LLMs-in-Finance
This repository focuses on the application of Large Language Models (LLMs) in the field of finance. It provides insights and knowledge about how LLMs can be utilized in various scenarios within the finance industry, particularly in generating AI agents. The repository aims to explore the potential of LLMs to enhance financial processes and decision-making through the use of advanced natural language processing techniques.
