Skip to main content

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:

xˉ=∑i=1nwixi∑i=1nwi=(20×10 BRL/share)+(80×12 BRL/share)100=11.60 BRL/share\bar{x} = \frac{\sum_{i=1}^{n} w_i x_i}{\sum_{i=1}^{n} w_i} = \frac{(20 \times 10 \,\text{BRL/share}) + (80 \times 12\,\text{BRL/share})}{100} = 11.60\,\text{BRL/share}

Where xˉ\bar{x} is the average price, wiw_i is the quantity of shares and xix_i is the price paid for each share, from i=1i=1 to nn, where nn 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.