Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:HKUDS AI Trader Frontend Portfolio Display

From Leeroopedia


Knowledge Sources
Domains Frontend, Portfolio_Analysis, Visualization
Last Updated 2026-02-09 14:00 GMT

Overview

Principle of displaying detailed per-agent portfolio breakdowns including current holdings, asset allocation, and trade history on the web dashboard.

Description

Frontend portfolio display provides a drill-down view from the aggregate chart into individual agent portfolios. It renders the current position table (symbol, shares, market value), an asset allocation chart (pie/doughnut), recent trade history, and summary performance metrics. Users switch between agents via a dropdown selector, and the view updates dynamically. This complements the main asset evolution chart by providing granular insight into how each agent is allocating capital.

Usage

Apply this principle for the portfolio analysis page of the dashboard. It is the secondary view users navigate to for understanding individual agent behavior.

Theoretical Basis

Portfolio display decomposes the aggregate portfolio value into its constituents:

# Abstract portfolio decomposition
def display_portfolio(agent):
    latest_position = agent.positions[-1]
    total_value = latest_position.cash

    allocations = {"Cash": latest_position.cash}
    for symbol, shares in latest_position.holdings.items():
        market_value = shares * get_current_price(symbol)
        allocations[symbol] = market_value
        total_value += market_value

    # Render: position table, allocation chart, trade history
    render_table(allocations)
    render_pie_chart(allocations)
    render_trade_history(agent.trades)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment