The GIST (IPython Notebook) below shows you a hands-on step-by-step approach to analyze stock prices using Python. The notebook starts by first downloading historic prices of several stocks, and then visualizing the historic time series. Then, percentage daily returns are computed, and its correlation to similar types of stocks are computed. Finally, a Monte Carlo based approach is used to obtain future stock prices and estimate maximum possible loss one may incur by staying invested in a stock.
Disclaimer – To the best of my knowledge I have no Long/Short positions on any of the stocks analyzed below.