Week 8/9: Administration Console and Public Portfolio Tracker

~5 min read

Implementation Overview

Week 8/9 marked a significant expansion in my AI trading bot ecosystem, focusing on operational visibility and public transparency. I implemented advanced features, launched an administration console for internal management, and deployed a comprehensive public portfolio tracker with detailed trade analytics.

What I Built

Technical Core

  • Time-to-Result (TTR) & Stagnancy Exits: Implemented time-based trade decay mechanism that monitors position duration and executes exits for stagnant trades to improve capital efficiency
  • AltData Decision Traceability: Added comprehensive tracking of which alternative data sources contributed to each trading decision, with full audit trail for ML analysis
  • Pending Orders Visibility: Built admin console page for monitoring WAL durability, ghost orders, and broker submission status
  • Portfolio Selector: Implemented equity vs crypto view switching across the admin console with filtered dashboards and data streams
  • Profile Performance Adaptive Weighting: Created empirical risk layer that adjusts position sizes based on trailing 30-day performance metrics (win-rate, Sharpe ratio, profit factor)
  • SectorAdjuster: Developed sector-aware signal weighting and volatility-adjusted risk parameters for different asset classes (crypto, biotech, large-cap tech)
  • Sector-Adaptive Regime Strategy: Built adaptive scaling system that allows outlier stocks to trade even in bearish sector conditions, with relative strength filtering
  • Developed and deployed the administration console for internal system management
  • Implemented public portfolio tracker with real-time performance metrics
  • Created trade detail pages with deep analytics and AI reasoning

Screenshots

Here are some key interfaces from this week's work:

Administration Console

Administration Console - Internal management dashboard

Public Portfolio Tracker

Public Portfolio Tracker - Live performance visualization

Code Highlight

This week's focus: implementing the database connection layer with async support for the administration console and portfolio tracker.

def get_engine():
    global _engine
    if _engine is None:
        _engine = create_async_engine(
            get_database_url(),
            echo=True,  # Log SQL for debugging
            future=True,
            pool_pre_ping=True,
            pool_size=10,
            max_overflow=20,
        )
    return _engine

Architecture Decision

Public vs. Private Interfaces

Balancing transparency with security: The public portfolio tracker provides real-time insights while the admin console remains internal-only, ensuring operational security without sacrificing user trust.

Testing Results

Confidence Check

All 15 unit tests pass, covering database connections, portfolio calculations, and UI rendering:

  • Database async session management
  • Portfolio performance metrics accuracy
  • Trade detail page data integrity

Next Steps

With ZephyrApex now deployed to production, the focus shifts to live paper trading for equities. Track my progress and performance metrics in real-time on the public portfolio tracker.


Follow @therealkamba on X for regular updates. View all posts →