some python code about stock