Refactored correlation logic into TickMatrix class