(self, historical_price)
| 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 |
no outgoing calls
no test coverage detected