Algorithmic Trading Platform

Architecture / Component

Overview

Tracks positions, cash balance, exposure, and P&L in near real time. Updated after each simulated execution.

Referenced By 1

Architecture

Documents

Position Manager README document repo://graph/nodes/9d6ace698c54942b7e885e858ef80aab/artifacts/position-manager-readme.md

Position Manager

Responsibilities

Tracks open positions and realized P&L across all symbols.

  • Subscribes to Execution events to update position quantities and average cost
  • Publishes Position events after each update
  • Maintains per-symbol position state (quantity, average cost, realized P&L)

Event Flow

Execution → PositionManager → Position (published)

Position State

Field Description
symbol Ticker symbol
quantity Net position (positive = long, negative = short)
avg_cost Volume-weighted average cost
realized_pnl Cumulative realized profit/loss

Source

src/components/position_manager.py