|
|
@@ -163,7 +163,7 @@ def calculate_sigma_squared(prices, timestamps):
|
|
|
return 0.0
|
|
|
|
|
|
time_diff = int(int((timestamps[-1] - timestamps[0]).total_seconds() * 1000) / 100)
|
|
|
- price_diff_squared = [(prices[i] - prices[i - 1]) ** 2 for i in range(1, n)]
|
|
|
+ price_diff_squared = [(1 - prices[i] / prices[i - 1]) ** 2 for i in range(1, n)]
|
|
|
sigma_squared = np.sum(price_diff_squared) / time_diff
|
|
|
|
|
|
return sigma_squared
|