Skip to content

Your personal AI portfolio copilot: upload your holdings and get instant risk analysis, performance insights, and a smart, readable investment report.

Notifications You must be signed in to change notification settings

QuantTradingOS/Portfolio-Analyst-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Portfolio Analyst Agent

An AI-powered portfolio analysis tool that helps you understand your investments using real market data and large language models.

Upload your holdings (CSV) or paste them manually and receive:

Portfolio insights

Risk and concentration analysis

Performance snapshot

Correlation analysis

An AI-generated narrative report

⚠️ This project is for educational purposes only and does not provide financial advice.

✨ Features

Upload a CSV portfolio (symbol, shares, avg_price)

Or manually paste holdings

Live market data via yfinance

Portfolio metrics:

Total value

Allocation by holding

Sector exposure

Correlation matrix

Estimated volatility

Lookback return

AI-generated portfolio report (using OpenAI)

Interactive charts (Streamlit)

Optional local report memory (portfolio_memory.json)

πŸ“Έ Demo (optional)

You can add screenshots here later:

/screenshots/portfolio-report.png

🧠 Example Use Case

Input portfolio:

Symbol Shares Avg Price AAPL 50 145 NVDA 10 720 TSLA 20 230

Output:

Portfolio value

Concentration risk (e.g., too much tech exposure)

High correlation warning between NVDA / AAPL / MSFT

AI-written explanation of portfolio strengths & risks

What to watch next week (macro + earnings themes)

πŸ›  Tech Stack

Python

Streamlit (UI)

OpenAI API (analysis + report generation)

yfinance (market data)

pandas / numpy (data analysis)

πŸ“‚ Project Structure portfolio-analyst-agent/ β”‚ β”œβ”€β”€ app.py β”œβ”€β”€ requirements.txt β”œβ”€β”€ README.md β”œβ”€β”€ .gitignore └── portfolio_memory.json # (ignored by git)

πŸ“„ CSV Format

Upload a CSV like this:

symbol,shares,avg_price AAPL,50,145 NVDA,10,720 TSLA,20,230 MSFT,15,310

avg_price is optional but recommended for P/L calculations.

πŸš€ Installation

Clone the repo:

git clone https://github.com/yourusername/portfolio-analyst-agent.git cd portfolio-analyst-agent

Create a virtual environment (recommended):

python -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows

Install dependencies:

pip install -r requirements.txt

Run the app:

python -m streamlit run app.py

Then open:

http://localhost:8501

πŸ”‘ API Key

You will need an OpenAI API key.

When the app runs, enter your key in the sidebar.

Your key is not stored anywhere.

πŸ“Œ Roadmap

Planned future agents in this project series:

βœ… Insider Intelligence Agent

βœ… Portfolio Analyst Agent

⏳ Trade Journal Coach Agent

⏳ Watchlist + Alert Agent

⏳ Market Regime Detector

⏳ Earnings Reaction Analyzer

⚠️ Disclaimer

This project is for educational and research purposes only. It does not constitute financial advice. Always do your own research.

πŸ‘€ Author

Built by Sai Vamsy Palakollu Learning-focused AI + finance projects.

About

Your personal AI portfolio copilot: upload your holdings and get instant risk analysis, performance insights, and a smart, readable investment report.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages