Inspiration

We were inspired by a demo done at the Bloomberg table of the Bloomberg Terminal; the intuitive design and level of accuracy are what we aimed to add to AlphaParse. We have also spent time looking through different companies ' SEC filings by hand, and it can be quite time-consuming. We strived to speed up the process of extracting key information about a company from its filings.

What it does

Alpha Parse uses Gemini to allow the user to query financial information directly from SEC filings. Quering includes but is not limited to creating bar graphs, pie charts, and line charts from accurate quantitative datapoints found in a company's filings.

How we built it

We began the project by building out the front end. At first, we created each front-end component to only display mock API data in order to see how the website would look and feel. This included components to enter a stock's ticker, toggle search/ticker mode, a card that displayed quick facts about the ticker (full company name, price, market cap, etc), a query/chat mode toggle, a query search component along with query results cards, and an AI chat component. Afterwards, we linked these front-end components to APIs on the backend in order to display real information. First, we added a ticker search API to populate a dropdown search results while the user looks for a company in company mode. Next, we added Finnhub's quote and company-profile endpoints in order to display a company's: Ticker, Company Name, Exchange, Current Price, Change, Market Cap, IPO Date, Country, Currency, Phone, Website, and Logo when the User types in a ticker. At the same time, we implemented the SEC's company concept API endpoint in order to get the most recent 10-K after a ticker is entered. Then we implemented Gemini's API in the query mode to look for keywords that the query may query for, and display accurate information from a request. For example, creating a pie chart of Apple's revenue by product segment. Gemini's API was also implemented on the chat mode, where Gemini is prompted to give the User brief chat-like responses and given the company's 10-k as context, the chat mode is able to give accurate information about a company's 10-k and at the end of each message, ask the user leading questions that help guide them into learning more about a Company and if they would like to have any niche finance terms defined.

We chose Next.js as the React framework. The front end is built with Tailwind, a CSS framework. The backend is built in TypeScript.

Challenges we ran into

We ran into git challenges, we were developing very quickly on different branches, and found it challenging to manage all of our commits and branches! Another challenge was to truncate the file sizes before prompting Gemini; without any truncation, the file sizes were in excess of 15mb each, and this would crash the server as the file contained too many tokens for Gemini to parse. We had to find a way to truncate the document as much as possible without removing any key information.

Accomplishments that we're proud of

We are proud of how the final product turned out. We think that the UI looks very nice and that the project will be useful to us as we are personally interested in a tool that allows for quick, accurate information about a company for free. Many of the tools available that give out financial information are very expensive because of API costs! We look forward to continuing development in the future.

What we learned

We learned how to navigate the SEC's API endpoints in addition to learning lots about how a company files with the SEC, including the types of forms public company’s are required to file, the structure of some of these forms, and what type of information is contained in some of the different SEC forms.

What's next for AlphaParse

In the future, we plan on adding more support for international securities and potentially other asset classes (i.e, Bonds, Forex, Cryptocurrency, Commodities). We would also like to add logic that lets the user view multiple stocks simultaneously to compare.

Built With

Share this project:

Updates