Investment System

Portfolio
Manager

Disciplined investment portfolio tracking with the Anchor & Flow framework. Real-time IBKR integration, multi-source market data, and automated audit engine.

Real-time Sync Rules Engine

The Anchor & Flow Framework

50-60%
Anchor
  • Stable infrastructure: NVDA, GOOGL, AMD, MU
  • Long-term conviction holds
  • 15% max per stock
40-50%
Flow
  • High-growth narrative: IREN, ASTS, LITE
  • 8% hard stop loss
  • 45-day time stop
0-5%
Moonshot
  • Speculation / lottery tickets
  • Minimal position size

Enforces strict position limits, theme concentration caps (25%), and market regime awareness.

Key Features

IBKR Account Sync

Real-time positions, P&L, and cash from Interactive Brokers TWS API

Audit Bot

Per-stock health check: technicals, volume, trend, RSI with ENTER/HOLD/TRIM/SELL verdicts

Trade Journal

Record every trade with lessons learned and pattern recognition

Market Screener

TradingView + yfinance screener for discovering new opportunities

Pyramid Tracker

Staged position building with entry levels and cost basis tracking

Reentry Tracker

10-day cooloff period, max 2 reentries per quarter per stock

18 Specialized Pages

Every aspect of portfolio management has a dedicated view.

Dashboard
Holdings
Actions
Anchor-Flow
Screener
Audit
Batch Audit
Watchlist
Trade Log
Performance
Allocation
Earnings
Flow Health
Pyramid Tracker
Reentry Tracker
Weekly Review
One-Pager
System Guide

System Architecture

Frontend React 19 + Vite + Tailwind Cloudflare Pages :3400
Backend FastAPI Google Cloud Run :3401
Database Turso (SQLite) + local fallback
Broker IBKR TWS ib_async subprocess
Market Data TV + yfinance screener + fallback
Real-Time Data

IBKR TWS connection via ib_async subprocess, live portfolio sync with 5-second heartbeat

Dual Market Support

TradingView screener for TW stocks, yfinance fallback for US market data

Audit Engine

10+ validation rules, automated lot matching, capital gains tracking with tax lot methods

Local-First

Turso SQLite with local fallback, works offline with full sync on reconnect

5 React Contexts · 22 component directories · 6 database tables

Tech Stack

Frontend
React 19 TypeScript Vite Tailwind CSS 4 Recharts
Backend
FastAPI Turso ib_async tvscreener yfinance pandas
Infrastructure
Cloudflare Pages Google Cloud Run

Rules Engine

The discipline that keeps emotions out of trading.

Position Limits — Single stock max 15%, single theme max 25%
Leverage & Cash — Max leverage 1.2x, cash buffer at least 10%
Flow Rotation — Sell 50% at +100% gain to lock profits
Earnings Blackout — No entry within 5 days of earnings
Circuit Breakers — Yellow / Orange / Red / Full Stop thresholds
Market Regime — Bull / Choppy / Correction / Bear detection

By the Numbers

18
Specialized Pages
40+
API Endpoints
2,165
Line Audit Bot
4,853
Line Backend
22 Component Dirs 6 DB Tables 5 React Contexts

Portfolio Manager

Disciplined investing through code.

Built by Jazz Lien · 2026