Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- total_pnl_list = [(total_today_pnl, total_today_kpi), (total_mtd_pnl, total_mtd_kpi), (total_ytd_pnl + 73462, total_ytd_kpi)]
- total_roi_list = [(total_today_pnl / (total_ytd_kpi / 0.3) * 252 , 0.3),
- (total_mtd_pnl / (total_ytd_kpi / 0.3) * 252 / 20, 0.3),
- ((total_ytd_pnl + 73462) / (total_ytd_kpi / 0.3), 0.3)]
- if include_KPI:
- print ';'.join(['Total', '', '|'.join([' / '.join(["{:,}".format(int(i[0])), "{:,}".format(int(i[1]))]) for i in total_pnl_list]), '|'.join([' / '.join(["%s %%" % round(i[0] * 100,2), "%s %%" % round(i[1] * 100,2)]) for i in total_roi_list])])
- else:
- print ';'.join(['Total', '', '|'.join(["{:,}".format(int(i[0])) for i in total_pnl_list])])
- for output in output_list:
- if include_KPI:
- if to_management:
- print ';'.join([STRATEGY_DUMMY_NAME_MAPPING[output[0]], ','.join(output[1]), '|'.join([' / '.join(["{:,}".format(int(i[0])), "{:,}".format(int(i[1]))]) for i in output[2]]), '|'.join([' / '.join(["%s %%" % round(i[0] * 100, 2), "%s %%" % round(i[1] * 100, 2)]) for i in output[3]])])
- # print output[3]
- # print '|'.join(['/'.join(["%s %%" % (i[0] * 100), "%s %%" % (i[1] * 100)]) for i in output[3]])
- else:
- print ';'.join([output[0], ','.join(output[1]), '|'.join([' / '.join(["{:,}".format(int(i[0])), "{:,}".format(int(i[1]))]) for i in output[2]]), '|'.join([' / '.join(["%s %%" % round(i[0] * 100,2), "%s %%" % round(i[1] * 100,2)]) for i in output[3]])])
- else:
- if to_management:
- print ';'.join([STRATEGY_DUMMY_NAME_MAPPING[output[0]], ','.join(output[1]), '|'.join(["{:,}".format(int(i[0])) for i in output[2]])])
- else:
- print ';'.join([output[0], ','.join(output[1]), '|'.join(["{:,}".format(int(i[0])) for i in output[2]])])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement