How george-dominic/portfolio-performance works
Project type and purpose
• This is a lightweight Python‐based automated analytics pipeline. It fetches portfolio holdings and price/sector data, computes performance metrics, generates an LLM‐driven summary, and emails a daily report.
• Not a web front‑end or microservice suite, but a single orchestration script with clearly separated functional modules and external API integrations.
File structure
• Top‑level scripts & modules:
• prep_email.py (primary entry point for generating and sending the email)
• main.py (alternative CLI entry)
• auth_handler.py & token_manager.py (authenticate & manage tokens for Zerodha KiteConnect)
• news.py (fetch MarketAux news)
• ai_summary.py (invoke Ollama LLaMA 3.2 for text summarization)
• config.py (load environment variables and API keys)
• requirements.txt (.pip dependencies)
• No database or persistent storage; all data flows at runtime.
• External dependencies indicated by imports and README (Zerodha KiteConnect API, yFinance, MarketAux, Ollama, Resend).
README for additional insights
• Pipeline stages: holdings fetch → price/sector data → metrics computation (1-day, MTD, top movers, sector returns, benchmark) → LLM summarization → email digest.
• Key external services: KiteConnect, yFinance, MarketAux, Ollama (LLaMA 3.2 via ollama), Resend (email delivery).
• Configuration via .env (API keys, emails).