Investment Studio > Expressions > Functions > Lookup > PORTFOLIO_NAV
float portfolio_nav(integer portfolio_index, date quote_date, boolean allow_old = FALSE)
Returns the net value of all assets in the portfolio identified by portfolio_index on the specified quote_date.
The result is computed by adding up the NAVs (Net Asset Values) of all assets in the portfolio on the specified quote_date (see function asset_nav), with each NAV converted to the portfolio currency using the latest known currency conversion rate on quote_date.
This function therefore requires that the NAV on quote_date and the conversion rate to the portfolio currency be known for all assets in the portfolio, without exception. If an asset's NAV is not available for quote_date, allow_old = FALSE (default) causes the function to fail with an #N/A error condition; allow_old = TRUE causes the first available, preceding asset NAV to be used instead.
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 asset_currency, asset_nav, portfolio_currency, portfolio_quotes.