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

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


Code:
{"start":"2015-02-02T23:08:00.000Z","open":238.21,"high":239.35,"low":238.21,"close":238.66,"vwp":8743.778447997309,"volume":203.6969347,"trades":56}


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,
Brenton

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?
  Reply
#2
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.
  Reply
#3
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.
  Reply


Forum Jump:


Users browsing this thread: