Investment Studio > Expressions > Functions > Lookup > PORTFOLIO_FEE_FLOWS

float array[*][2] portfolio_fee_flows(integer portfolio_index, date start_date, date end_date, float start_flow = 0, float end_flow = 0)

Returns a two-column array containing dates (first column) and fees (second column) for transactions in the portfolio identified by portfolio_index during the time period start_date to end_date. The array is time-sorted in ascending order (earliest date in first row, latest date in last row).

Positive fees are paid by you, negative "fees" are paid to you (e.g. interest). See the discussion of transaction fees.

All fees are expressed in the portfolio currency using the latest known currency conversion rate on the transaction date.

If a non-zero start_flow is specified, it's added to the result array as the first flow, dated at start_date. If a non-zero end_flow is specified, it's added to the result array as the last flow, dated at end_date.

By default, start_flow and end_flow are both = 0 (meaning no extra flows are added to the result array).

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 portfolio_fees, portfolio_first_trade, portfolio_flows, portfolio_investment, portfolio_last_trade, portfolio_nav, portfolio_principal, portfolio_principal_flows.