Position & Inventory Functions =============================== .. py:type:: position A position is a single amount held at cost. Example: `10 HOOL {100.30 USD}` .. py:type:: inventory A collection of multiple positions is an inventory. Positions can be :func:`summed` up, resulting in :type:`inventories`. Functions to inspect or modify positions and inventories: * :func:`~fun.abs` - Absolute value. * :func:`~fun.convert` - Coerce an amount to a particular currency. * :func:`~fun.cost` - Get the cost of a position. * :func:`~fun.empty` - Determine whether the inventiry is empty. * :func:`~fun.filter_currency` - Filter an inventory to just the specified currency. * :func:`~fun.getprice` - Fetch a price. * :func:`~fun.neg` - Negative value. * :func:`~fun.possign` - Correct sign of an Amount based on the usual balance of associated account. * :func:`~fun.units` - Get the number of units. * :func:`~fun.value` - Coerce an inventory to its market value.