Average Price
The Average Price of a stock is a calculation used to determine the average of the prices you paid for the securities. It is a strategy that investors often use when they acquire shares of the same company at different points in time and at varying prices. The goal here is to determine the average purchase price, which can help smooth out fluctuations in the security's price over time.
To calculate the average price, you add up the total amount you paid for all the shares and then divide it by the total number of shares you bought. For example, if an investor bought 100 shares of a company in two transactions - first 20 shares at BRL 10 each and then another 80 shares at BRL 12 each - the average acquisition price would be calculated as follows:
Where is the average price, is the quantity of shares and is the price paid for each share, from to , where is the number of transactions.
Therefore, in this scenario, the average acquisition price for the 100 shares is BRL 11.60 per share.
To get the average price, use the List Position Average Prices endpoint, which provides the average price of each position in the portfolio on a given date. For an economic group, use List Economic Group Positions Average Prices.