Inspiration

I wanted to build an app that uses a third-party API using langchain. When I read their documentation, I noticed that one use case for this would be natural language investment research. Subsequently, I decided to pursue this topic for my project.

What it does

MarketComm is simple by design. The user asks a question about financial markets in the input and the answer appears in bullet-point form below the input.

How we built it

MarketComm is built with Streamlit, OpenAI, Langchain and various financial data API's. Structurally, the app is made of many functions which retrieve financial data end-points. The AI aspect decides which parameters to pass into the retrieval function based on keywords in the user's input. I decided to use Streamlit instead of the typical web development stack because it's highly efficient in developing fast mockups of a product in the data analysis/ai space.

Challenges we ran into

It was very difficult for me to find a free financial data API. I had to settle for very basic endpoints such as financial ratios and top gainers. However, with proper data plans, virtually any stock market-related question can be answered. Also, authentication between the Next.js landing page and the Streamlit app wouldn't work.

Accomplishments that we're proud of

I'm proud that I created something financial analysts can actually use - an app that provides genuine value.

What we learned

I learned how to use Langchain with third-party API's, and the very basics about AI.

What's next for MarketComm

I hope to launch this app to the public as I believe it's very useful. However, Streamlit isn't viable for consumer use, so I want to re-create it using Next.js and Tailwind.

Additional Information

I did not include the code for the landing page because I cloned it from a template and edited it: https://github.com/ilaesm/htn-landing

Built With

  • alpha-vantage
  • financial-modelling-prep-api
  • langchain
  • openai
  • python
Share this project:

Updates