Investment Studio > Expressions > Functions > Lookup > PORTFOLIO_INVESTMENT
float portfolio_investment(integer portfolio_index, date start_date, date end_date)
Returns the sum of gross values (principal values + fees) 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. Positive fees are paid by you, negative "fees" are paid to you (e.g. interest). See the discussion of transaction fees.
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_last_trade, portfolio_nav, portfolio_principal, portfolio_principal_flows.