This is an automated archive made by the Lemmit Bot.
The original was posted on /r/artificial by /u/Starks-Technology on 2024-02-13 18:33:12.
The folks over at the r/ArtificialInteligence subreddit really liked this, so I thought to share it here too!
Last week,I wrote a technical article about a new concept: an intelligent AI-Powered screener. The feature is simple. Instead of using ChatGPT to interpret SQL queries, wrangling Excel spreadsheets, and using complicated stock screeners to find new investment opportunities, you’ll instead use a far more natural, intuitive approach: natural language.
Screening for stocks using natural language
This screener doesn’t just find stocks that hit a new all time high (poking fun at you, RobinHood). By combining Large Language Models, complex data queries, and fundamental stock data, I’ve created a seamless pipeline that can search for stocks based on virtually any fundamental indicator. This includes searching through over 130 industries including healthcare, biotechnology, 3D printing, and renewable energy. In addition, users can filter their search by market cap, price-to-earnings ratio, revenue, net income, EBITDA, free cash flow, and more. This solution offers an intuitive approach to finding new, novel stocks that meet your investment criteria. The best part is that literally anybody can use this feature.
Read the official launch announcement!
How does it work?
Like I said, I wrote an entire technical article about how it works. I don’t really want to copy/paste the article text here because it’s long and extremely detailed. To save you a click, I’ll summarize the process here:
- Using Yahoo Finance, I fetch the company statements
- I feed the statements into an LLM and ask it to add tags from a list of 130+ tags to the company. This sounds simple but it requires very careful prompt engineering and rigorous testing to prevent hallucinations
- I save the tags into a MongoDB database
- I hydrate 10+ years of fundamental data about every US stock into a different MongoDB collection
- I used an LLM as a parser to translate plain English into a MongoDB aggregation pipeline
- I execute the pipeline against the database
- I take the response and send another request to an LLM to summarize it in plain English
This is a simplified overview, because I also have ways to detect prompt injection attacks. I also plan to make the pipeline more sophisticated by introducing techniques like Tree of Thought Prompting. I thought this sub would find this interesting because it’s a real, legitimate use-case of LLMs. It shows how AI can be used in industries like finance and bring legitimate value to users.
What this can do?
This feature is awesome because it allows users to search a rich database of stocks to find novel investing opportunities. For example:
- Users can search for stocks in a certain income and revenue range
- Users find stocks in certain niche industries like biotechnology, 3D printing, and alternative energy
- Users can find stocks that are overvalued/undervalued based on PE ratio, PS ratio, free cash flow, and other fundamental metrics
- Literally all of the above combined
What this cannot do?
In other posts, I’ve gotten a bunch of hate comments by people who didn’t read post. To summarize what this feature isn’t
- It doesn’t pick stocks for you. It finds stocks by querying a database in natural language
- It doesn’t make investment decisions for you
- It doesn’t “beat the market” (it’s a stock screener… it beating the market doesn’t make sense)
- It doesn’t search by technical indicators like RSI and SMA. I can work on this, but this would be a shit-ton of data to ingest
Happy to answer any questions about this! I’m very proud of the work I’ve done so far and can’t wait to see how far I go with it!