Stock controller