portfolio — analytics engine
Stock Performance &
Portfolio Analytics Platform
A Python analytics engine that transforms Excel-based trade logs and equity curves into structured performance intelligence — covering return distributions, drawdowns, benchmark comparisons, crisis-period analysis, sector exposure, and cash management, served through a session-based FastAPI backend.
Raw trade logs tell you whether a strategy made money — they don't tell you whether it was worth the risk. This platform closes that gap by running uploaded portfolio files through a suite of analytics modules that surface monthly return distributions, drawdown behavior, benchmark-adjusted performance, cash utilization patterns, sector concentration, and market crisis resilience. Results are stored in a session and served through versioned API endpoints, so dashboards and reporting tools can pull only what they need.
| master_analytics | High-level portfolio statistics CAGR · total return · win rate · profit factor · payoff ratio · expectancy · Calmar ratio |
| monthly_return | Monthly return heatmap and bucket distribution Return table · distribution summary · positive/negative month breakdown |
| quarterly_return | Aggregated quarterly performance view Q1–Q4 groupings · year-over-year comparison |
| yearly_return | Year-level return metrics across the full strategy history |
| market_crisis | Strategy behavior during major market stress periods Crisis return vs benchmark · drawdown during event windows |
| portfolio_value | Portfolio value progression from the equity curve over time |
| cash_management | Cash allocation and available capital behavior tracking |
| drawdowns_analysis | Drawdown depth, duration, and recovery analysis |
| compare_benchmark | Equity curve comparison against selected market index tickers via yfinance |
| sector_analysis | Performance breakdown and exposure by sector |
| weighted_portfolio | Multi-strategy combined performance with user-defined weightages |