| | |
| | | start_money, end_money = ts[i] * 100, ts[i + 1] * 100 |
| | | tss.append((start_money, end_money)) |
| | | |
| | | watch_index_info_less_of_200 = [0, 0] |
| | | watch_index_info_200_to_300 = [0, 0] |
| | | watch_index_info_more_than_300 = [0, 0] |
| | | |
| | | rate_info_dict = {} |
| | | for t in tss: |
| | | rate_info_dict[t[0]] = [0,0] |
| | | |
| | | for x in before_watch_indexed_info: |
| | | money = limit_up_price * x[1] |
| | | for t in tss: |
| | | if t[0] <= money < t[1]: |
| | | if t[0] not in rate_info_dict: |
| | | rate_info_dict[t[0]] = [0,0] |
| | | rate_info_dict[t[0]][0] += x[1] |
| | | if x[0] in canceled_indexes: |
| | | rate_info_dict[t[0]][1] += x[1] |
| | | break |
| | | watch_index_info = [(k,v) for k,v in rate_info_dict.items()] |
| | | watch_index_info.sort(key= lambda x:x[0]) |
| | | watch_index_info = [(k, v) for k, v in rate_info_dict.items()] |
| | | watch_index_info.sort(key=lambda x: x[0]) |
| | | watch_index_info = [x[1] for x in watch_index_info] |
| | | watch_index_info_details = [] |
| | | for x in watch_index_info: |