Investment Studio > Expressions > Functions > Lookup > ASSET_FLOWS
float array[*][2] asset_flows(integer asset_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 gross amounts, i.e. principal values + fees (second column) for transactions in the asset identified by asset_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).
Principal flows into the asset are positive, principal flows out of the asset are negative. Positive fees are paid by you, negative "fees" are paid to you (e.g. interest). See the discussion of transaction fees.
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).
Asset indices are references to entries in Investment Studio's internal table of assets in the selected portfolio. The table is automatically created and maintained behind the scene, and may be rearranged at any time. Asset indices should therefore never be specified using constants, but rather obtained through the interface methods provided by the object hosting the expression (if need be with the aid of the transaction_asset function). See e.g. the discussion of lookup cells in Grid objects.
See also asset_fees, asset_first_trade, asset_fee_flows, asset_investment, asset_last_trade, asset_nav, asset_principal, asset_principal_flows, asset_units.