Algorithmic Models of Investor Behavior