VWP (Volume Weighted Price)
I would like to know how BudFox is calculating VWP.

The Documentation for BudFox states that its output is JSON objects such as:


where I assume "vwp" is Volume Weighted Price.  However, it seems to me that the actual values of VWP disagrees with other data (specifically price and volume) from that same record of trades.  

Given that

[Image: vwap.gif]

I presume then that VWP = VWAP * Total Share Bought = VWAP * Total Volume.

So, from the data from the sample record above, VMP = 8743.79 and volume = 203.70 which implies VWAP = 8743.79/203.70 = 42.92
But 42.92 is outside the high..low for that trading period (239.35 .. 238.21).

What am I missing?

Thanks in advance,

BTW.  I checked the code [gekko/core/budfox/candleCreator.js: 149 and 152] and it does appear to be creating a VWAP correctly.  Perhaps the data is bad in the example?
That sample documentation is extremely old, it might very well be old data generated when VWAP was buggy. Do note that even though vwap is stored, it's not actually used by any of the default strategies. I will double check if the VWAP is calculated correctly and update the documentation if it is.
As a follow up question I wonder how vwp is computed when the source provides data only with a minute resolution or higher. Since there is no data to aggregate, I assumed it will be simply close price, but is not the case.

Forum Jump:

Users browsing this thread: