The drawdown of a stock indicates how much time it's spent "underwater" - it's essentially the percentage drop of its price from a peak to a trough, with the drawdown resetting to zero if a previous high is reached. The drawdown of a stock is a valuable risk measure and is employed by traders to gauge volatility.
This application:
- downloads historical stock prices from Yahoo Finance for a chosen ticker symbol,
- defines a procedure that calculates the drawdown of the historical stock price,
- and plots the drawdown against the adjusted close price of the asset.
By changing the ticker and the dates, you can examine drawdown of any stock between your chosen dates.