Calculate the average unit price in advance before purchasing additional stocks