Finance is a very broad field where the uncertainty plays a central role and every financial operator have to deal with it. In this paper we propose a new method for a trend prediction on financial time series combining a Linear Piecewise Regression with a granular computing framework. A set of parameters control the behavior of the whole system, thus making their fine tuning a critical optimization task. To this aim in this paper we employ an evolutionary optimization algorithm to tackle this crucial phase. We tested our system on both synthetic benchmarking data and on real financial time series. Our tests show very good classification results on benchmarking data. Results on real data, although not completely satisfactory, are encouraging, suggesting further developments.