used maps to group trades by time