diff --git a/finance.py b/finance.py index 357dec4..f31cb04 100755 --- a/finance.py +++ b/finance.py @@ -214,6 +214,11 @@ def change_time_period(selectedData): to_time = selected_stock_in_table_df.index.max() from_time = round_to_nearest_weekday(from_time) to_time = round_to_nearest_weekday(to_time) + full_table_in_time_period = fullTableDf.loc[from_time:to_time] + mean = full_table_in_time_period.mean(axis=0) + mean = mean.xs('Close', level=0) + std = full_table_in_time_period.std(axis=0) + std = std.xs('Close', level=0) time_period = selected_stock_in_table_df.loc[from_time:to_time] mean = time_period.mean(axis=0) std = time_period.std(axis=0)