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(AssetIDs[],Weights[],PortfolioCurrency,PortfolioValue)
Argument name Description
AssetID A single asset identifier representing the instrument (ISIN, FIGI, currency ISO, Edgelab ID).
Weight 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.