
#calculate total return of our portfolio for the last x days
total_return = 0
for item in allocation:
  total_return = total_return + (allocation[item]['perc_position'] * allocation[item]['return'] )

print(total_return)