From c490abe08953a4f9b8e1dbdae24da51aa72ee6f7 Mon Sep 17 00:00:00 2001 From: Shuhao Qing Date: Fri, 3 Apr 2026 01:03:11 +0800 Subject: [PATCH] docs: update README and CLAUDE.md for PR #8 features Add documentation for peer comparison, sector browsing, batch fundamental analysis, and comprehensive report with buy-readiness checklist. Expand analysis/ directory listing in CLAUDE.md project structure. Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 9 ++++++++- README.md | 12 +++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 66d3aad..84456e5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,7 +47,14 @@ haoinvest/ │ ├── risk_engine.py # Risk metrics (vol, drawdown, Sharpe, Sortino) │ └── optimization_engine.py # Portfolio optimization (HRP, min vol, max Sharpe) ├── portfolio/ # Trade recording, position tracking, returns (TWR) -├── analysis/ # Thin adapters over engine — fundamental, risk, technical +├── analysis/ # Thin adapters over engine +│ ├── fundamental.py # Valuation assessment (PE/PB/ROE), financial health +│ ├── technical.py # Technical indicator adapter +│ ├── risk.py # Risk metrics adapter +│ ├── peer.py # Same-sector peer comparison +│ ├── report.py # Full stock report with buy-readiness checklist +│ ├── signals.py # Aggregate buy/sell signals +│ └── volume.py # Volume analysis ├── market/ # Provider registry — akshare, yfinance, crypto MCP └── strategy/ # Optimizer adapter + rebalance logic ``` diff --git a/README.md b/README.md index 2b47430..0b6c794 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,10 @@ Built for a beginner investor in China covering A-shares, US stocks, HK stocks, - **Portfolio Management** — Record trades, track positions, calculate time-weighted returns (TWR) - **Market Data** — Real-time quotes from AKShare (A-shares), Yahoo Finance (US/HK), Crypto.com (crypto) -- **Fundamental Analysis** — PE/PB/ROE valuation assessment +- **Fundamental Analysis** — PE/PB/ROE valuation assessment with financial health scoring; batch support for multi-symbol comparison +- **Peer Comparison** — Find and compare same-sector stocks by valuation and performance +- **Sector Browsing** — Browse A-share industry sectors and their constituent stocks +- **Comprehensive Report** — Full stock report with buy-readiness checklist combining fundamental, technical, and risk analysis - **Risk Metrics** — Annualized volatility, max drawdown, Sharpe ratio, Sortino ratio (powered by QuantStats) - **Technical Analysis** — MA, MACD, RSI, Bollinger Bands with Chinese explanations (powered by pandas-ta) - **Portfolio Optimization** — Equal weight, risk parity, minimum volatility, maximum Sharpe allocation (powered by PyPortfolioOpt) @@ -46,8 +49,15 @@ uv run haoinvest portfolio returns # P&L summary # Analysis uv run haoinvest analyze fundamental 600519 # PE/PB valuation +uv run haoinvest analyze fundamental 600519,000858 # Batch comparison uv run haoinvest analyze risk --symbol NVDA # Volatility, Sharpe, drawdown uv run haoinvest analyze correlation 600519,NVDA # Correlation matrix +uv run haoinvest analyze peer 600519 # Same-sector peer comparison +uv run haoinvest analyze report 600519 # Full report with buy-readiness checklist + +# Sectors +uv run haoinvest market sector-list # A-share industry sectors +uv run haoinvest market sector 白酒 # Sector constituent stocks # Strategy uv run haoinvest strategy optimize --method risk_parity # also: max_sharpe, min_volatility