Investment Studio > Expressions > Functions > Lookup > PORTFOLIO_PRINCIPAL

float portfolio_principal(integer portfolio_index, date start_date, date end_date)

Returns the sum of the principal values of all transactions in the portfolio identified by portfolio_index during the time period start_date to end_date.

Principal flows into the portfolio are positive, principal flows out of the portfolio are negative. All flows are converted to the portfolio currency using the latest known currency conversion rate on the transaction date.

Portfolio indices are references to entries in Investment Studio's internal table of loaded portfolios. The table is automatically created and maintained behind the scene, and may be rearranged at any time. Portfolio indices should therefore never be specified using constants, but rather obtained through the interface methods provided by the object hosting the expression. See e.g. the discussion of lookup cells in Grid objects.

See also currency_convert, portfolio_fees, portfolio_fee_flows, portfolio_first_trade, portfolio_flows, portfolio_investment, portfolio_last_trade, portfolio_nav, portfolio_principal_flows.