Posts

Weighted average price

avatar of @stdd
25
@stdd
·
0 views
·
3 min read

A week ago, I needed to calculate a weighted average price. I could not do it by logical manipulation, and I did not have a formula at the time. Google also refused to understand me, because I did not know the very definition of "weighted average price". I couldn't find a formula or definition on LeoGlossary either. If anyone at @leoglossary is reading this post, it would be nice to add that information or show me if I'm wrong.

I ended up finding several definitions that would not be clear to a mere mortal who is not involved in finance or constant calculations (accountant, broker, mathematician, physicist). I thought it wouldn't hurt to write about this term and my problem that I solved with this knowledge. Let's go!

Why do I need to know this?

If you buy any commodity, cryptocurrency, or metal in different amounts at different prices, sometimes you want to know the average price of those purchases. It's simple, if you buy the same volumes at different prices. You can add up all the prices and divide by the volume to get the average price of a commodity or crypto you buy. But if the volumes are always different, you'll need a formula.

In simple words

On Wikipedia I found this formula. But again, what is going to make sense out of it to an untrained person? To me, almost nothing...

My task was to calculate the weighted average price of my SPS purchases. I bought different amounts of SPS at different times at different prices. You might be interested to know what your average price was for apples over the past year. Or, more relevantly, Bitcoin, which went down from $65,000 to $16,000. Yes, I think I'll take Bitcoin!

Calculations

To avoid stretching these calculations into 1,000 words, I will take just 3 purchases. Let's assume that we buy Bitcoin this way:

  1. 0.5 Bitcoin for 64,000
  2. 0.66 bitcoin for 37,000
  3. 0.88 bitcoin for 22,000

What is the average-weighted price of our purchased Bitcoin?

To solve this task, we will need to add up all the volumes of purchases multiplied by the price and divide by the sum of the volumes. That is:

(0.5 64000 + 0.66 37000 + 0.88 * 22000) / 0.5 + 0.66 + 0.88

=

(32000 + 24420 + 19360) / 2.09

= $36258.37

That is, if you want to sell all of your bitcoin at $37,000, you will even be in the black.

Conclusion

It is very important to understand this definition not only for traders, investors and financiers. If you hold anything at all in your wallets, you can calculate not only buying but also selling your tokens on Hive-Engine in the same way. You will only need to place orders for different volumes and different prices. The rest will be done for you by the market itself. You may have heard of frustrated traders who are nervous about selling large volumes at the click of a button. This really isn't beneficial to anyone, because it can kill the price of some assets for a long time.

There are probably many services or sites with automatic calculation of average weighted price, but I haven't found them quickly. If anyone uses one, please drop me a line in the comments. I'd be happy to! But sometimes there are a few numbers and a few minutes to calculate. That's when knowing and understanding the term and formula can come in handy.

That's all for now!

Hive ON! Hive Five!

I am also a member of the following communities!⬇️

All banners are clickable

<a href=https://discord.gg/XZGPGpz>