This commit is contained in:
dsyoon
2024-02-05 19:44:28 +09:00
parent 67a128099f
commit 0416c1a8f7
2 changed files with 37 additions and 29 deletions

View File

@@ -36,5 +36,7 @@ class BolingerBand:
stock['PRICE'][i]['bolingerband_upper'] = df.upper.values[i]
stock['PRICE'][i]['bolingerband_middle'] = df.middle.values[i]
stock['PRICE'][i]['bolingerband_lower'] = df.lower.values[i]
stock['PRICE'][i]['bolingerband_width'] = (df.upper.values[i] - df.lower.values[i])/df.middle.values[i]
stock['PRICE'][i]['bolingerband_pb'] = (df.close.values[i] - df.lower.values[i]) / (df.upper.values[i] - df.lower.values[i])
return