ENH vwap update

This commit is contained in:
Kevin Johnson
2021-01-18 11:54:59 -08:00
parent c3eb22f754
commit c8107e372b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ def vwap(high, low, close, volume, offset=None, **kwargs):
# Calculate Result
weighted_price = typical_price * volume
vwap = weighted_price.groupby(weighted_price.index.to_period('d')).cumsum() / \
volume.groupby(volume.index.to_period('d')).cumsum()
vwap = weighted_price.groupby(weighted_price.index.to_period("d")).cumsum()
vwap /= volume.groupby(volume.index.to_period("d")).cumsum()
# Offset
if offset != 0:
+1 -1
View File
@@ -17,7 +17,7 @@ setup(
"pandas_ta.volatility",
"pandas_ta.volume"
],
version=".".join(("0", "2", "36b")),
version=".".join(("0", "2", "37b")),
description=long_description,
long_description=long_description,
author="Kevin Johnson",