I have the Markov Switching Multifractal (MSM) MLE code in Python - Email me if you want it but I am still working on the documentation of the code. The codes is based on the work of Laurent Calvet and Adlai J. Fisher. See Extreme Risk and Fractal Regularity in Finance.
To reproduce Figure 3 in Extreme Risk and Fractal Regularity in Finance by L. Calvet and A. Fisher (2013), download the zipped file: Partition Function. The zipped file contains the MATLAB Function PFUNC and the daily data.
Mandelbrot Set Matlab Codes (by Mathwork)
OTHER COOL FRACTAL STUFF