Agent based Modeling of Financial Markets