Multi-Agents LLM Financial Trading Framework

(github.com)

38 points | by fittingopposite 3 hours ago

13 comments

  • _pdp_ 42 minutes ago
    If this worked it wouldn't have been open source?

    Anyway, I have been running my own trading experiment and so far it has lost a bit of money. That being said I have not tried to optimise anything - just let it do whatever it wants. The losses are small and it might be able to recover later this year. Who knows.

    The agent writes a blog about its progress here https://trades.chatbotkit.space/

    I am thinking to output all the chat logs to HF as well for research.

    You can run your own trading agents that communicate over a message buss in your own terms by downloading the CBK platform and running it locally with your own models. I have also shared my trading blueprint if you want to give it a go. https://chatbotkit.com/hub/blueprints/trader

    • whazor 34 minutes ago
      It would be more interesting to compare trading agents with index tracking ETFs. The better version of an ETF could maybe be a model where you zoom in on the companies and add/remove to your portfolio on the company related news, but keeping a broader portfolio.

      Maybe agentic trading still performs worse than ETFs. But alternatively, if it were meaningfully better then it would be okay to opensource, similarly how ETFs are publishing their portfolios.

      • _pdp_ 23 minutes ago
        I think this might work.

        When I started working no the trading agent I mentioned above I wanted to see if it can be just a better investor over the long run. The intention was not to do high-frequency trading. As you can see most of the days it is not taking any actions. The losses where down to mistakenly setting the stop losses too close to the top. If it wasn't so careful it might have made some money tbf.

        My gut feeling is that AI agents will be able to manage a long-term portfolio much better than a human. Though it is just a gut feeling.

        • dakolli 8 minutes ago
          Lmao, you llm people have some crazy delusions. You realize markets are zero sum, and if you're using a public model that everyone else also has access too, you llm psychos will destory eachothers "agentic" edge (not that there ever was one). Not to mention all the other obvious flaws with llms, lime having an effective memory of ~200k words and no ability to judge whats actually going on in the real world.
    • rienbdj 33 minutes ago
      If you like building but have no capital you might release something like this that works.
  • dsl 13 minutes ago
    I spent about an hour looking at the code and found some glaring issues that should be fixed before trusting it with real money.

    - Yahoo News is introduced twice (sentiment and news analysis) which double weights it

    - Sentiment analysis prompt primes the model to be bullish on Nvidia.

    - In the self learning loop there is a complex parsing bug that results in hallucinated memories when agents return truncated responses

    - You can completely control sentiment analysis of a subreddit by simply maintaining a majority of the 5 most recently posted messages, regardless of any quality metric

    - The reflection prompt states the agent must cite alpha, which in a market wide downturn causes it to think correctly placed calls were losses

    • embedding-shape 11 minutes ago
      > Sentiment analysis prompt primes the model to be bullish on

      Eeh, yeah? At that point I'd stop reading the code and just leave the project behind. How exactly is the prompt doing this right now?

  • hacker_9 1 hour ago
    Having worked in hedge funds for the last decade, this seems to miss the mark. Firstly we often reward skillstacking ie a technical person later becoming a trader. The more one person knows the better. These people are rare though hence the reason there is still many seperate job functions, so a person can specialize. But an AI agent? They all have the same brain, so why nerf them by specialising.

    Secondly, browsing reddit for sentiment and doing technical analysis is not even a feature in the trading world. At the most basic level, these are lagging indicators. Something on options IV and premiums would have been closer to the mark.

    Hedge funds are akin to the maintenance crew for markets, we keep them efficient and liquid. The process is quite scientific, you come up with a theory and validate with real data. Or you go from data to theory.

    • looofooo0 1 hour ago
      Given what a know about the 2008 financial crisis, wouldn't an AI analysis in the years before that crisis of the real state funds helped to understand the risk of them better and avoid the big exposure.
      • hacker_9 37 minutes ago
        The problem wasn't the analysis, given it was found out before it happened. The problem was politics, and as usual pushing the system to its limits and beyond.
      • elzbardico 22 minutes ago
        Probably not. On the contrary, it would probably just amplify the mood.
    • audinalexandre 1 hour ago
      As local contexts/skills get better at depicting what's to be expected and what an agent can work with and work to get better at, having more and more little specialized agents working as a swarm get you, with a field-skilled human as a supervisor, really good results even in highly niche and technical fields
  • adyavanapalli 6 minutes ago
    As the saying goes, those who know don't say and those who say don't know.
  • ctdonnet 9 minutes ago
    What is the purpose of this repo? Is it to simulate the market so you can reliably backtest trading strategies?

    Whatever the stated purpose is, where can I read the test results to show it accurately fulfills that purpose.

    Anyone can make a markets simulation that models interactions between market participants. Making a simulation that is accurate enough to be useful for anything is hard.

  • politelemon 2 hours ago
    103K stars, so clearly it's popular. Has anyone here used it, and what are the outcomes like, and importantly, who is the target audience for this?

    I can see the intention behind crawling social media and news feeds to determine some 'evidence', but am not sure if that's the best approach or even if an LLM is the best way to get an assessment, or whether having so many input sources is a good idea.

    • testaccount121 51 minutes ago
      103K stars in a few months, smells of purchased stars IMO.
    • mechazawa 1 hour ago
      I feel like a lot of the stars for repos like this are from people who are riding the AI hype train and not actually interested in using the software
  • skanga 1 hour ago
    In case there is interest, I've got a fork with some custom improvements. See section "What this fork adds" in README.md

    https://github.com/skanga/TradingAgents

  • shaolinspirit 2 hours ago
    I do not understand the value of multi agent approach? Isn't a single agent with a good harness better than any multi agent env?
    • jasode 1 hour ago
      >Isn't a single agent with a good harness better than any multi agent env?

      Multiple agents can each have their own isolated LLM context that is focused on their respective narrow scoped tasks. That way, the accumulated "memories", "instructions", etc do not stomp on each other. E.g. the agent loop that is gathering "signals" from the market has a context memory full of instructions related to scraping websites and using REST APIs and it doesn't interfere with the other agent loop that does sentiment analysis that has context memory dedicated to text of news transcripts correlated with historical price signals.

      You can have a single agent acting as a top-level "orchestrator" to manage other agents. However, you can't have a single agent that does "everything" for long complicated workflows with high quality. The drawback is the more agents you spawn to take advantage of isolating contexts to improve task completion quality, the more you multiply the tokens consumption and costs.

      Another other driver for multi-agents is scaling out cpu usage, especially across different machine boundaries.

    • BenoitP 2 hours ago
      It helps you spend more token, is more expensive, and thus is obviously more AI. Also novelty and more complexity means less scrutiny of the approach.

      These are necessary and perfectly sufficient for an investment firm thesis I believe.

    • podocarp 1 hour ago
      If it's a single agent then people will just call it a chatgpt wrapper, can't have that can we
    • elzbardico 21 minutes ago
      Modularity maybe. Remember, agents are basically workflows that call LLMs in certain nodes.
  • feverzsj 1 hour ago
    Which will make you bankrupt faster, this framework or the its token consumption?
  • fedeb95 1 hour ago
    1) costs? 2) profits/costs?
  • petesergeant 2 hours ago
    I think multi-agent (eg _different_ underlying LLMs) everything is really the future. Code produced via multi-agent workflows and reviews seems noticeably better. I've been experimenting with a multi-agent message board recently: https://github.com/pjlsergeant/dogpark
    • monkeydust 1 hour ago
      Experimented with multi-llm analysis for problem solving over summer, combined with multi-agent approaches it can tease out interesting angles to problems that I never considered. Expensive but use only for my high value problems.

      https://github.com/monkeydust/rightmind

    • elzbardico 17 minutes ago
      I've built agents that call different LLMs and keep separated memories. Remember, agents are just long-running workflows with some nodes calling LLMs and that sometimes can be started as tool from other "agent".

      There are times when I wonder if couldn't just draw then in a BPMN designer that allowed me to write custom code for nodes. Is BPMN still a thing?

  • reedf1 2 hours ago
    nightmare horseshit, don't waste your tokens
  • krapcys 8 minutes ago
    [flagged]