Skip to content

Latest commit

 

History

60 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Company Insight Utility

Built by Anand Prasad

A webapp built in Flask and React that generates a real-time SWOT (Strengths, Weaknesses, Opportunities, Threats) analysis for publicly traded companies, alongside broader financial insight data. Give it a stock ticker or company name; all information is pulled live from financial data APIs.

Features

  • Stock overview
    • Last stock price, net change in price in past day and percent change in price over past day
  • Company description
    • A brief description of the company (pulled from their SEC filing)
  • Financial numbers
    • Key financial numbers such PE, Market Cap, etc.
  • News articles
    • Recently published news articles relating to the company
  • Analysis of earnings call transcripts
    • List of companies earnings calls including links to transcripts and analysis
    • analysis includes:
      • Call participants
      • Tone analysis: e.g. the overall done of the call (happy, sad, analytical, etc...)
      • Participation analysis: how many questions did each participant ask and answer **SWOT synthesis Combines the above into a structured Strengths / Weaknesses / Opportunities / Threats breakdown

The current version relies on rule-based logic applied to API data; LLM-assisted synthesis (using a mixture-of-experts approach combining structured data with LLM interpretation) is planned for a future release — see Roadmap below. Screenshots / Demo Coming soon — screenshots and/or a demo GIF of the app in action will be added here.

Note: This application was originally developed and tested against Chrome 72.0.3626.109 and Python 3.7. It has not been re-verified against current versions — if you run into issues on a modern setup, that's the most likely place to start troubleshooting. (Re-testing against current Chrome/Python versions is on the roadmap.)

Installation

1. Clone the repo

Clone the repo or download the zip.

2. Install frontend dependencies

cd frontend
npm install

3. Install backend dependencies

it is recommended that you use a virtual environment but not required. To setup a virtual environment run (from the project root):

python3 -m venv env

This will create a new virtal environment in the folder 'env'. To activate the virtual environment run:

source env/bin/activate

If you want to deactivate the environment later simply run deactivate.

Next, install all dependencies by running:

pip install -r requirements.txt

Note: I developed this application for Google Chrome. Most testing has been done with Chrome 72.0.3626.109.

Note: This application uses python 3.7.

Running the app

First start the backend, then start the front end:

1. Back End

python3 backend/server.py

The API will now be live at http://localhost:5000

You can test that the backend is up by going to http://localhost:5000. It should display a simple webpage with some information about the endpoints.

2. Front End

In a second terminal window:

cd frontend
npm start

The website will now be live at: http://localhost:3000/

Important Note

If at anytime data fails to load, it is likely because your IP has been blocked by seeking alpha's web scraping watch dog. To accomodate this I created an endpoint on the backend that will generate a proxy and route all requests through it. To do this simply open a new tab and navigate to http://localhost:5000/generate/proxy. Each time you visit this URL it will generate a new proxy. You can visit this URL as many times as you would like and it will generate a new proxy each time. If a proxy isn't working well it often helps to just generate another one.

System Architecture

  • Front end
    • React app: dynamically creates pages based on JSON response from requests to backend endpoints
  • Backend
    • Python/Flask
    • Data layer: pulls from financial data APIs (see Sources) rather than scraping pages directly, so no proxy/IP-rotation workaround is needed

Roadmap / Ideas for Future Updates

LLM-assisted synthesis (MoE approach): blend the current rule-based logic applied to API data (financial ratios, revenue trends, etc.) with LLM-generated interpretation (news sentiment, qualitative narrative) to produce richer, better-written SWOT output. Likely structured as an "LLM proposes, rules verify" pipeline so numeric claims stay grounded in the underlying data rather than being hallucinated.

FastAPI migration: move the backend from Flask to FastAPI to support concurrent API calls and LLM calls natively (async), rather than the current synchronous pipeline.

Better mobile handling

Better error handling for API failures / testing against edge-case tickers

Analysis of articles in addition to earnings calls

Some form of data caching

Challenges

Parsing earnings call transcripts is difficult when working from raw text with little structure — normalizing this across companies and API providers still takes care.

Reconciling data formats and rate limits across multiple API providers (Alpha Vantage, Financial Modeling Prep, Finnhub) since each has its own schema and usage quotas.

Sources

Financial data is sourced via proper JSON APIs rather than scraping, so requests are stable and not subject to IP blocking:

Alpha Vantage — company fundamentals, financial statements, ratios

Financial Modeling Prep — earnings call transcripts, financial statements, DCF/valuation data

Finnhub — real-time quotes, news, sentiment, analyst ratings

SEC EDGAR — official 10-K / 10-Q / 8-K filings

nasdaq.com (supplementary market data)

You'll need free API keys for Alpha Vantage, Financial Modeling Prep, and Finnhub — see .env.example for the required environment variables.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages