reduce function

Reduce portfolio by merging redundant date ranges