Download README.md from sukhrobnurali/financial-document-analyzer: direct link, hf CLI and curl.
- Browser
- Download file 3.77 kB
-
https://huggingface.co/spaces/sukhrobnurali/financial-document-analyzer/resolve/main/README.md
- Command line
-
hf download hf://spaces/sukhrobnurali/financial-document-analyzer/README.md
-
curl -L -o README.md https://huggingface.co/spaces/sukhrobnurali/financial-document-analyzer/resolve/main/README.md
title: Intelligent Investment Screener
emoji: π
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
license: mit
Intelligent Investment Screener
An AI-powered financial document analyzer that screens company annual reports against specific investment criteria using RAG (Retrieval-Augmented Generation).
What It Does
Instead of manually reading 100-page annual reports to find specific financial metrics, this tool:
- Accepts company financial documents (10-K, Annual Reports)
- Extracts key financial metrics (debt ratios, revenue breakdown, etc.)
- Analyzes them against customizable investment criteria
- Returns a Pass/Fail decision with citations (page numbers and sections)
Key Features
Citation-Based Analysis
Every finding includes:
- Exact page number
- Specific section or table name
- Relevance score
This transforms the tool from a "magic box" to a trusted, verifiable assistant.
Multiple Screening Criteria
Shariah Compliance: Islamic finance screening
- Debt ratio < 33%
- Interest income < 5%
- No prohibited activities (alcohol, gambling, etc.)
ESG (Environmental, Social, Governance): Sustainable investing
- Carbon emissions disclosure
- Board diversity > 30%
- No environmental violations
- Labor practice compliance
Value Investing: Traditional value metrics
- P/E ratio < 15
- Debt to Equity < 0.5
- Positive free cash flow
- Revenue growth > 5%
Technical Architecture
Tech Stack
- Frontend: Streamlit
- LLM: OpenAI GPT-4o-mini
- RAG Framework: LlamaIndex
How It Works
PDF Upload β LlamaIndex Parser β Vector Index β OpenAI Analysis β Cited Results
- Document Loading: LlamaIndex parses PDF and preserves page metadata
- Vector Indexing: Creates searchable embeddings of document chunks
- Criteria Analysis: OpenAI GPT-4o-mini analyzes relevant sections against rules
- Citation Extraction: Page numbers and sections are tracked throughout
- Results Display: Pass/Fail with verifiable citations
Quick Start
Running Locally
# Clone the repository
git clone https://huggingface.co/spaces/sukhrobnurali/financial-document-analyzer
cd investment-screener
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Add your OPENAI_API_KEY to .env
# Run the app
streamlit run app.py
Get an OpenAI API Key
- Visit OpenAI Platform
- Sign up or log in
- Click "Create new secret key"
- Copy the key and add it to
.envor enter it in the app sidebar
Usage
- Select Screening Criteria: Choose from Shariah, ESG, or Value Investing
- Upload Document: Upload an annual report or 10-K filing (PDF)
- Analyze: Click the analyze button
- Review Results:
- Overall Pass/Fail decision
- Detailed metric-by-metric breakdown
- Citations with page numbers for verification
Example Use Cases
Shariah Compliance Screening
Investors following Islamic finance principles need to ensure companies:
- Don't derive significant income from interest
- Maintain acceptable debt levels
- Don't operate in prohibited industries
ESG Screening
Socially responsible investors want to verify:
- Environmental impact disclosures
- Corporate governance practices
- Social responsibility metrics
Value Investing
Traditional investors need quick access to:
- Valuation ratios (P/E, P/B)
- Financial health metrics
- Growth indicators
Note: This tool is for informational purposes only. Always verify financial data and consult with qualified financial advisors before making investment decisions.