We introduce some basic notions in fractal geometry such as Hausdorff distance, Hausdorff dimension, iterated function system (IFS) and attractor. Some fundamental results such as the contraction mapping principle, the collage theorem, the boxing counting theorem and the Moran theorem are studied. We construct IFS from some given data sets, and show that the coefficients of the IFS are related to the dimensions of the attractor of the IFS. These results are applied to stock market prediction.