MCPcopy
hub / github.com/tradytics/surpriver / calculate_recent_volatility

Method calculate_recent_volatility

detection_engine.py:173–178  ·  view source on GitHub ↗
(self, historical_price)

Source from the content-addressed store, hash-verified

171 return latest_data_point, self.parse_large_values(today_volume), self.parse_large_values(average_vol_last_five_days), self.parse_large_values(average_vol_last_twenty_days)
172
173 def calculate_recent_volatility(self, historical_price):
174 close_price = list(historical_price["Close"])
175 volatility_five_bars = np.std(close_price[-5:])
176 volatility_twenty_bars = np.std(close_price[-20:])
177 volatility_all = np.std(close_price)
178 return volatility_five_bars, volatility_twenty_bars, volatility_all
179
180 def calculate_future_performance(self, future_data):
181 CLOSE_PRICE_INDEX = 4

Callers 2

find_anomaliesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected