I created an open-source AI trading algorithm, and released it on GitHub
An open-source python package for AI stock analysis
I just released my new open-source trading system using multi-agent AI approach
Thoughts on MSFT exposure to Open AI?
Videos
Open-source GitHub Repo | Paper Describing the Process
Aside: If you want to take the course I did online, the full course is available for free on YouTube.
When I was a graduate student at Carnegie Mellon University, I took this course called Intro to Deep Learning. Don't let the name of this course fool you; it was absolutely one of the hardest and most interesting classes I've taken in my entire life. In that class, I fully learned what "AI" actually means. I learned how to create state-of-the-art AI algorithms โ including training them from scratch using AWS EC2 clusters.
But, I loved it. At this time, I was also a trader. I had aspirations of creating AI-Powered bots that would execute trades for me.
And I had heard of "reinforcement learning" before.. I took an online course at the University of Alberta and received a certificate. But I hadn't worked with "Deep Reinforcement Learning" โ combining our most powerful AI algorithm (deep learning) with reinforcement learning
So, when my Intro to Deep Learning class had a final project in which I could create whatever I wanted, I decided to make a Deep Reinforcement Learning Trading Bot.
Background: What is Deep Reinforcement Learning
Deep Reinforcement Learning (DRL) involves a series of structured steps that enable a computer program, or agent, to learn optimal actions within a given environment through a process of trial and error. Hereโs a concise breakdown:
-
Initialize: Start with an agent that has no knowledge of the environment, which could be anything from a game interface to financial markets.
-
Observe: The agent observes the current state of the environment, such as stock prices or a game screen.
-
Decide: Using its current policy, which initially might be random, the agent selects an action to perform.
-
Act and Transition: The agent performs the action, causing the environment to change and generate a new state, along with a reward (positive or negative).
-
Receive Reward: Rewards inform the agent about the effectiveness of its action in achieving its goals.
-
Learn: The agent updates its policy using the experience (initial state, action, reward, new state), typically employing algorithms like Q-learning or policy gradients to refine decision-making towards actions that yield higher returns.
-
Iterate: This cycle repeats, with the agent continually refining its policy to maximize cumulative rewards.
This iterative learning approach allows DRL agents to evolve from novice to expert, mastering complex decision-making tasks by optimizing actions based on direct interaction with their environment.
How I applied it to the stock market
My team implemented a series of algorithms that modeled financial markets as a deep reinforcement learning problem. While I won't be super technical in this post, you can read exactly what we did here. Some of the interesting experiments we tried included using convolutional neural networks to generate graphs, and use the images as features for the model.
However, despite the complexity of the models we built, none of the models were able to develop a trading strategy on SPY that outperformed Buy and Hold.
I'll admit the code is very ugly (we were scramming to find something we could write in our paper and didn't focus on code quality). But if people here are interested in AI beyond Large Language Models, I think this would be an interesting read.
Open-source GitHub Repo | Paper Describing the Process
Happy to get questions on what I learned throughout the experience!
Hey folks!
I am looking for some good stock+AI packages in Python for my project. I have tried multiple open-source Python packages and so far found investormate as reliable. Itโs not meant to replace low-level data providers like yFinance โ it sits a layer above that and focuses on turning market + financial data into analysis-ready objects.
Things I am looking for:
-
Normalised income statement, balance sheet, and cash flow data
-
60+ technical indicators (RSI, MACD, Bollinger Bands, etc.)
-
Auto-computed financial ratios (P/E, ROE, margins, leverage)
-
Stock screening (value, growth, dividend, custom filters)
-
Portfolio metrics (returns, volatility, Sharpe ratio)
-
Sentiment Analysis
-
Back Testing
-
AI layer (OpenAI / Claude / Gemini)
Packages so far tried - defectbeta-api, yfinance, investormate.
Open to any better suggestions.
I want to share my new open-source project, which I've been working on as part of my research. I previously posted about another open source project here that received huge success (see here), so I decided to share this one with you as well.
This concept follows a similar approach, but it utilizes a multi-agent system with LangGraph for agent orchestration. The system includes four agents:
-
Data Collection Agent - gathers data from multiple sources
-
Technical Analysis Agent - performs classical technical indicator calculations
-
News Intelligence Agent - based on the PrimoGPT idea, creates seven custom NLP features
-
Portfolio Manager Agent - takes everything into account and makes recommendations
I built the entire system to be easily extensible, whether adding new agents, new tools, or changing prompts.
Everything is open source with very simple instructions on how to run it, so you can easily test it and see the results.
GitHub repository: https://github.com/ivebotunac/PrimoAgent/
I know there will be both good and bad comments, but with this project, I wanted to give the community an idea and example of how such multi-agent AI systems can be used to help with financial analysis. This is intended exclusively for educational purposes.
If you find any bugs or have ideas on how to improve the system, feel free to contribute to the project.
Thanks, everyone, for the support!