CCI Trading: Mathematical Analysis and Data-Driven Strategy Implementation