Finding motifs of financial data streams in real time is a very interesting and valuable work. We hope to find the motif existing in financial data streams on local trend subsequence. A stock market trader might use such a tool to spot arbitrage opportunities or escape the underlying venture. The paper introduces a novel distance measurement, that is SDD (Slope Duration Distance), for local subsequences. At the same time, we propose an efficient algorithm of motif discovery over a great deal of financial data streams, that is PMDGS (P-Motif Discovery based on Grid Structure), which make use of...