MyAlgoGuru Help
Education Glossary Open the app
Help/Reference/Trading Core

Position Management

Your live trading positions — derived automatically from executed trades using average-cost accounting. Positions are never created by hand.

Where you will find this

Positions (open, closed, consolidated), Position detail & broker reconciliation.

Purpose

Every fill nets into the open position for its instrument and product, updating quantity, average price and realised P&L. When a live quote is available (from Live Market Data), positions mark to market so you also see unrealised P&L. Position history is append-only.

Positions are derived, not entered

You cannot create or edit a position directly — it always reflects your executed trades. This keeps positions reconcilable against the broker and the audit trail.

The Position Management module maintains the current trading positions of the application.

It provides a consolidated view of all open and closed positions across supported brokers and ensures that position information accurately reflects executed trading activity.

The module serves as the single source of truth for trading positions.

Objectives

The module will:

  • Maintain current trading positions.
  • Track position lifecycle.
  • Consolidate positions across brokers.
  • Support real-time position monitoring.
  • Calculate position metrics.
  • Provide position information to dependent business modules.
  • Preserve complete position history.

Functional Scope

The module includes:

  1. Position Creation
  2. Position Updates
  3. Position Closure
  4. Position Lifecycle Management
  5. Position Consolidation
  6. Position Monitoring
  7. Position Search
  8. Position History
  9. Position Analytics
  10. Position Audit

Position Model

A position represents the current trading exposure for an instrument.

Positions is created and updated exclusively from executed trading activity.

The module does not create positions independently.

Position Sources

Position updates may originate from:

  • Manual Trading
  • Strategy Execution
  • Webhook Signal Execution

All position updates is derived from execution events received through the Order Management module.

Position Creation

A new position is created when executed trading activity establishes exposure in an instrument.

Position creation will occur automatically.

You not manually create positions.

Position Updates

Positions is updated whenever additional executions affect an existing position.

Updates may include:

  • Quantity
  • Average Price
  • Current Exposure
  • Realised Profit & Loss
  • Unrealised Profit & Loss

Position updates will occur automatically.

Position Closure

A position is closed when the net quantity reaches zero.

Closed positions remains available for historical reference.

Position closure does not remove historical records.

Position Lifecycle

Every position will maintain a lifecycle.

Typical lifecycle stages include:

  • Open
  • Partially Reduced
  • Fully Closed

Historical lifecycle information is preserved.

Position Information

Each position will maintain, where applicable:

  • Instrument
  • Exchange
  • Broker Account
  • Trading Product
  • Buy Quantity
  • Sell Quantity
  • Net Quantity
  • Average Price
  • Current Market Price
  • Current Value
  • Realised Profit & Loss
  • Unrealised Profit & Loss
  • Position Status

Position Consolidation

The platform will support both individual and consolidated position views.

Consolidation may occur across:

  • Broker Accounts
  • Trading Strategies
  • Trading Sources

Consolidation does not modify underlying position records.

Position Monitoring

You can monitor:

  • Open Positions
  • Closed Positions
  • Running Profit & Loss
  • Position Value
  • Position Exposure

Monitoring remains continuously available.

The platform will support searching and filtering positions.

Typical filters include:

  • Instrument
  • Broker
  • Product
  • Status
  • Trading Source
  • Strategy
  • Date Range

Position Ownership

Every position will maintain ownership information.

Ownership includes:

  • User
  • Broker Account
  • Strategy (where applicable)
  • Order Source

Ownership remains permanently associated with the position.

Position History

Historical positions is permanently preserved.

History includes:

  • Opening Activity
  • Quantity Changes
  • Partial Exits
  • Full Closure

Historical information remains immutable.

Position Synchronisation

The platform will maintain synchronisation between broker positions and internal positions.

Position discrepancies is detectable.

Where supported, synchronisation may be performed on demand or automatically.

Business Rules

  • Positions will only be created from executed trades.
  • Orders will never directly create positions.
  • Position updates will occur automatically.
  • Manual position creation does not be permitted.
  • Closed positions remains historically available.
  • Consolidated views does not modify source data.
  • Position history will never be deleted.
  • Internal position records remains synchronised with broker positions.

Audit Requirements

The platform will maintain an audit trail for position activities.

Audit events includes:

  • Position Created
  • Position Updated
  • Position Reduced
  • Position Closed
  • Position Synchronisation
  • Position Adjustment (where permitted)

Audit records remains immutable.

Out of Scope

The following are outside the scope of this module:

  • Order Execution
  • Strategy Logic
  • Broker Connectivity
  • Portfolio Analytics
  • Risk Enforcement
  • Historical Backtesting

These are addressed in their respective business modules.

Net against Day Net

A position carries both a net quantity and a day quantity. The day leg is split from the carry-forward once, in one place, so the two cannot drift apart.

  • The net identity always holds. The per-side convention is a convention, and where a broker’s numbers contradict it the split is refused rather than forced into shape.
  • P&L is not split between the day leg and the carry-forward — the split applies to quantity.
  • Brokers disagree about this in practice: one has published a day quantity as though it were the total, another has described a whole position as carried forward. The split is derived rather than taken on trust.

Positions are never created by hand

Every position is derived from executed activity, so it always reconciles to what actually filled. There is no way to type a position into existence, which is deliberate: a hand-entered position would be a number with nothing behind it.