Summary

The ELPORTWEIGHTTOQUANTITY function converts the asset’s weight into quantity given that the instrument is part of a portfolio which has a specific value and currency.

Examples

=ELPORTWEIGHTTOQUANTITY("US0378331005",0.2,"CHF",1000000)

Calculates the number of Apple shares required to achieve a target weight of 20% within a portfolio of 1,000,000 CHF.

=ELPORTWEIGHTTOQUANTITY(A1,30%,"GBP",500000)

Calculates the required quantity of the instrument whose ID is specified in cell A1 to achieve a target weight of 30% within a portfolio of 500,000 GBP.

=ELPORTWEIGHTTOQUANTITY(A1:A25,B1:B25,"GBP",500000)

The function is now dynamic. In this example, it calculates the required quantities of the instruments (A1:A25) to achieve their respected weights (B1:B25) within a portfolio of 500,000 GBP.

Syntax

ELPORTWEIGHTTOQUANTITY(assetsIds[], weights[], portfolioCurrency, portfolioValue)
Argument name Description
assetsIds A single asset identifier representing the instrument (ISIN, FIGI, currency ISO, Edgelab ID).
weights The desired weight of the instrument expressed in percentage within the portfolio.
portfolioCurrency The ISO code of the currency in which the overall portfolio value is specified.
portfolioValue The total value of the portfolio within which the desired weight should be achieved.