How can I calculate the historical volatility of a stock in MATLAB?
I would like to create some simu开发者_开发知识库lated historical options data, and need to calculate historical volatility from historical stock prices. Is there a built in function to do this? Any formulas?
The only built-in functions I found were in the Financial Toolbox:
- BLKIMPV
- BLSIMPV
- CHAIKVOLAT
Other than that, here are some other links that may help:
- Trading with MATLAB blog
- Historical Volatility by Josiah Renfree on the MathWorks File Exchange (link from ShinTakezou's comment above)
精彩评论