Investment portfolio monitoring with DCF analysis, fair value scenarios, and trend charts. Automatically tracks SEC filings and reassesses companies.
/plugin marketplace add valerymad/portfolio-analyzer
/plugin install portfolio-analyzer
git clone https://github.com/valerymad/portfolio-analyzer.git
cd portfolio-analyzer
npm install
npx tsx scripts/setup.ts --email "you@email.com" --portfolio "growth" --tickers "CRM,GOOGL"- Multi-portfolio management — create and manage multiple portfolios with US-listed tickers
- SEC EDGAR integration — automatically downloads financial data (10-K, 10-Q) from XBRL
- 3-step assessment — financial analysis → DCF valuation → 3 scenarios (bull/base/bear)
- New filing detection — checks SEC for new quarterly/annual reports
- Interactive charts — Chart.js-powered HTML dashboards with assessment history
- Local data storage — financials downloaded once, updated only when new filings appear
npx tsx scripts/setup.ts --email "you@email.com" --portfolio "growth" --tickers "CRM,GOOGL,AAPL"This creates your config, first portfolio, and looks up CIK numbers via SEC.
npx tsx scripts/fetch-financials.ts --ticker "CRM"Use the /portfolio-analyzer:assess CRM command, or run the full pipeline through the plugin's slash commands.
npx tsx scripts/generate-chart.ts --ticker "CRM"
open output/charts/CRM.html| Command | Description |
|---|---|
/portfolio-analyzer:assess <TICKER> |
Full DCF assessment with 3 scenarios |
/portfolio-analyzer:portfolio <action> |
Create, add, remove, list, delete portfolios |
/portfolio-analyzer:check-filings |
Check SEC for new 10-K/10-Q filings |
/portfolio-analyzer:chart <TICKER> |
Generate interactive HTML chart |
All scripts run via npx tsx scripts/<name>.ts:
| Script | Purpose |
|---|---|
setup.ts |
Initial setup (email, first portfolio) |
manage-portfolio.ts |
CRUD operations for portfolios |
fetch-financials.ts |
Download financials from SEC EDGAR XBRL |
fetch-price.ts |
Get current stock price (Yahoo Finance) |
check-new-filings.ts |
Detect new SEC filings |
store-assessment.ts |
Save/retrieve assessment JSON |
generate-chart.ts |
Generate Chart.js HTML files |
data/
├── portfolios.json # Your portfolios and tickers
├── financials/{TICKER}/ # Cached SEC financial data
│ ├── filings.json # Filing index
│ ├── 10-K_FY2025.json # Annual report data
│ └── prices.json # Price history
└── assessments/{TICKER}/ # Historical assessments
└── 2026-03-20.json # Assessment by date
Each assessment produces a structured JSON with:
- Financial summary (revenue, margins, FCF, ratios)
- DCF model (WACC, growth assumptions, projections)
- Three scenarios with fair value and upside %
- Quality scores (financial health, growth, moat, management)
- Verdict: BUY / HOLD / SELL
The plugin includes methodology.md — a condensed investment framework synthesized from:
- Benjamin Graham's The Intelligent Investor and Security Analysis
- Warren Buffett's shareholder letters (2004-2024)
- Philip Fisher's Common Stocks and Uncommon Profits
- Mary Buffett's The New Buffettology
- Joel Greenblatt's You Can Be a Stock Market Genius
- Node.js 18+
tsx(installed via package.json)- Internet access for SEC EDGAR and Yahoo Finance APIs
MIT