.. _maker-template-capital: Capital and other equity lines (``capital``) ============================================ One signature and one documentation text are shared by every maker listed at the end of this page. The call is shown for ``co.bs.capital``; the other kinds take the same arguments. .. py:function:: co.bs.capital(name, amount=None, at=None, *, opening=None, cf=None, counterparty=None, fx_rate=None, actuals=None) Add an equity line such as share capital, paid in against cash or by another entity. The line's value is its balance at the end of each period. ``amount`` raises it and cash, and a negative amount reduces it. With ``counterparty``, another entity of the model pays the capital and books the shares it holds. :Parameters: **name** : str Line name; required. It must be unique among the lines of this kind in the entity. **amount** : scalar, Quantity, Series, or dict, optional Capital paid in each period, in the entity's currency per period. A dict maps period labels, indices, or dates to amounts and books 0 in the other periods. With ``counterparty`` it is required unless ``opening`` is given. **at** : int, str, or date, optional Period in which ``amount`` is booked, once. Without ``at``, ``amount`` is booked in every period. **opening** : scalar, Quantity, Series, or dict, optional Opening balance before the first period, in the entity's currency. With ``counterparty`` it also opens the owner's shares at the same amount and does not combine with ``amount``, ``at`` or ``fx_rate``. **cf** : str, optional Cash-flow class of the cash movements: ``"operating"``, ``"investing"``, ``"financing"`` or ``"fx"``. The default is the cash-flow class of the kind. **counterparty** : Entity, optional The owner that pays the capital, another entity of the same model. It books the shares it holds (`` shares``, an asset) against the cash it pays, and consolidation eliminates both. **fx_rate** : scalar, Quantity, or Series, optional Exchange rate on the transaction date, used to translate the amount into the owner's currency: owner currency per unit of this entity's currency. Without it, the period average is used. Requires ``counterparty``, and has no effect when both entities have the same currency. **actuals** : dict, optional Historical closing balances for periods up to ``Model.actual_until``, as ``{period: amount}``. Requires ``Model(..., actual_until=...)``. :Returns: LineItem The capital line, valued at its balance. With ``counterparty``, its ``counterparty`` attribute is the owner's shares line. :Raises: TypeError At construction, if ``fx_rate`` is given without ``counterparty``; if ``counterparty`` is not an entity, is given without ``amount`` or ``opening``, or ``opening`` is combined with ``amount``, ``at`` or ``fx_rate``; or if an amount has a type boki cannot use in an expression. ValueError At construction, if a line with this name already exists for this kind, ``cf`` is not a cash-flow class, or ``counterparty`` is this entity or belongs to another model. UnitError At construction, if an amount is in a unit other than the entity's currency, or ``fx_rate`` is not quoted in owner currency per unit of this entity's currency. IndexError At evaluation, if ``at`` or a period of ``amount`` is outside the model timeline. CheckFailed At evaluation, if ``fx_rate`` is not positive and the entities have different currencies; ``render(checks="warn")`` only warns. .. rubric:: Notes The documentation of each maker starts this section with the maker's kind, its side, and the section and cash-flow class of the kind; the layout pages list them. The line is paid in by a debit to cash and a credit to the line. With ``counterparty``, the owner debits its shares and credits cash for the translated amount. The shares line is created on the first use and reused. See the `equity section `_ and the `intercompany capital transactions `_. .. rubric:: Examples Capital of 1,000 paid in the first month of a monthly model: >>> import boki as b >>> m = b.Model("Capital", start="2027-01", periods=3, step=b.month) >>> co = m.entity("A", standard=b.IFRS) >>> capital = co.bs.capital("Share capital", 1000, at=0) >>> r = m.render() >>> [round(r.value(capital, month)) for month in ("2027-01", "2027-02", "2027-03")] [1000, 1000, 1000] >>> round(r.value(co.bs.cash, "2027-03")) 1000 A subsidiary's capital paid in by its parent appears as shares in the parent's books: >>> m = b.Model("Group", start="2027-01", periods=2, step=b.month) >>> parent = m.entity("Parent", standard=b.IFRS) >>> sub = m.entity("Sub", standard=b.IFRS) >>> parent.bs.opening(cash=500) >>> paid = sub.bs.capital("Capital", 200, at=0, counterparty=parent) >>> r = m.render() >>> round(r.value(parent.bs.cash, "2027-01")), round(r.value(paid.counterparty, "2027-01")) (300, 200) Makers that use this template ----------------------------- * :doc:`IFRS general `: ``co.bs.capital``, ``co.bs.nci``, ``co.bs.oci`` * :doc:`US GAAP general `: ``co.bs.capital``, ``co.bs.nci``, ``co.bs.oci`` * :doc:`J-GAAP general `: ``co.bs.capital``, ``co.bs.nci``, ``co.bs.oci`` * :doc:`bank `: ``co.bs.capital``, ``co.bs.nci``, ``co.bs.oci``