Python Script to Calculate Historic Volatility
Leverages Python, TD Ameritrade API, and methodology from Dynamic Hedging by Nassim Taleb to calcute 15-day volatility (annualized) for a given security. SPY is used in this exampled.
Register with https://developer.tdameritrade.com/apis and obtain a CONSUMER KEY to run the code on your own Python IDE.