virat Profile picture
Dec 21 2 tweets 2 min read Read on X
I’ve been building a real-world AI hedge fund.

It's open source so you can learn + build too.

The hedge fund has 6 agents:
1 • market data agent
2 • quant agent
3 • fundamentals agent
4 • sentiment agent
5 • risk manager agent
6 • portoflio manager agent

The hedge fund is powered by @LangChainAI

You can run all of my code below.

No prior coding experience is required.

All of the agents show their reasoning so you can see how they work.

1 • Market Data Agent: gathers market data like stock prices, fundamentals, etc.

2 • Quant Agent: calculates signals like MACD, RSI, Bollinger Bands, etc.

3 • Fundamentals Agent: analyzes profitability, growth, financial health, and valuation.

4 • Sentiment Agent: looks at insider trades to determine insider sentiment.

5 • Risk Manager: determines risk metrics like volatility, drawdown, and more.

6 • Portfolio Manager: makes final trading decisions and generates orders.

This is just the start.

There are a ton of cool features that we can add.

Let me know if you have any suggestions.Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with virat

virat Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @virattt

May 12, 2023
So, I'm learning how to build LLM-powered chat apps that are more production-ready, from scratch.

I've created an open-source repo that contains my ongoing explorations.

The stack:
• Django backend
• React frontend
@LangChainAI agents
• Websocket protocol

GitHub below. ImageImage
In my free time, my main focus will be to evolve this codebase.

Functionalities I want to add:
• Streaming LLM output
• Storage (e.g. vector db)
• More agent tools
• Short-term memory
• BabyAGI
• Plan-and-Execute agent
• More sophisticated UI
• Error handling

What else?
Here's the repo: github.com/virattt/chat_a…

I just created the codebase this week and there's a lot of (exciting!) work to do.

However, the core functionality of chatting with a @LangChainAI agent is implemented.

Fun fact: this is my first open source project 🙂🎢
Read 4 tweets
Apr 18, 2023
Alright, I finally understand @LangChainAI agents and tools.

I can now create a custom:
1. Tool that "reads" annual reports
2. Agent that answers queries via the tool

For my example, I am using $META's 2022 annual report.

Code is below. Happy learning 🙂
(1/3) About the custom Tool

Under the hood, the Annual Report tool is forwarding queries to a @LangChainAI chain.

This chain answers queries using:
@trychroma's Chroma DB
@OpenAI's GPT-3.5 Turbo model

I still don't have API access to GPT-4. Sigh.
(2/3) About the custom Agent

The agent is given a list of tools that it can use to answer queries.

For my example, I am just giving it the Annual Report tool.

However, you can create or add more tools as you see fit!
Read 4 tweets
Apr 7, 2023
I've seen multiple questions about how to build a Chatbot that:

• Retrieves data from PDFs and
• Has conversational memory

Turns out, it's really simple to do with @LangChainAI.

So, I wrote a quick tutorial with a real-world example for you all.

Code below.
1/4

Prompt: "What was Airbnb's net income in 2022?"

Response: "$1.9 billion"
2/4

Prompt: "What was it two years before that?"

Response: "Airbnb's net income in 2020 was -$4.6 billion."

Nice.

It figured out that I want to know what net income was two years before 2022.
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(