Utils for analysis history of trades