Ryan Yang

Selected workCase study · 05 / 05

IBKR Portfolio Analyzer

Finance dashboard · Desktop

A read-only portfolio intelligence dashboard for consolidated Interactive Brokers holdings, risk analysis, deterministic scoring, and evidence-linked research.

Role
Independent Software Engineer
Timeline
2026 - Present
Platform
Web + local services
Status
Public repository

01

Overview

A local-first, read-only portfolio intelligence system designed to consolidate Interactive Brokers accounts, explain portfolio risk, and support decisions without exposing any trading capability.

02

Contributions

  1. 01

    Built multi-account holdings consolidation with USD/CAD conversion, live profit and loss, allocation breakdowns, and VaR, drawdown, and concentration metrics.

  2. 02

    Connected to IBKR Gateway through ib-insync using read-only sessions, response caching, diagnostics, unique client IDs, and a broker contract with no execution methods.

  3. 03

    Implemented a GBDT-style scoring engine combining fundamentals, technicals, and news sentiment with suitability checks, IPS drift detection, and a Data Insufficient fallback.

  4. 04

    Integrated Gemini research reports with structured JSON, provenance markers, execution-language sanitization, and 56+ pytest cases verifying no-trading compliance.

03

System design

IBKR Portfolio Analyzer architecture Interactive Brokers Gateway connects to a read-only broker adapter exposing seven methods: get accounts, account summary, positions, transactions, open orders read-only, latest price and health check. The adapter feeds risk and analytics services, which write to a local database and serve a Next.js dashboard through a FastAPI layer. There is no order-placement path anywhere in the system. Interactive Brokers Gateway Read-only broker adapter Risk & analytics services FastAPI routes → Next.js dashboard get_accounts · get_account_summary · get_positions get_transactions · get_open_orders_readonly get_latest_price · health_check — and nothing else. No order-placement method exists. advanced_risk · extended_metrics · factor_model margin_assessment · portfolio_xray · risk_policy AccountSwitcher · AllocationBars · BrokerStatusBadge CalculationLineagePanel · AIPnlChart 178 test files guard the boundary
The system as its repository is laid out. The broker adapter’s abstract base declares seven methods and every one of them reads. Drawn from RyanYang053/ibkr-portfolio-analyzer
Client
Next.js and TypeScript dashboard with server-side data access and financial visualizations.
API
FastAPI services expose portfolio, risk, scoring, research, and diagnostic endpoints.
Broker boundary
ib-insync adapter handles read-only account and market data; the interface exposes no order-placement methods.
Validation
pytest coverage verifies analytical behavior, fallback logic, provenance handling, and compliance boundaries.

04

Outcome

The result is a decision-support tool rather than an execution system: data access, analysis, research, and risk review are deliberately separated from trading.

Core stack

Discuss the work

Need implementation detail or engineering context?

Email a specific question about the architecture, trade-offs, or validation approach.

Next case study · 01 / 05 HabitForge Habits & budgeting · iPhone

The studio

Back to the room it all began in.

Every page here is on the computer in that room.

Enter the studio