Before I code this, is there already a study available that I am not aware of that I think is called "Historical Volatility"?
The formula as presented to me is as follows:
Historical Volatility(length) = standard deviation(ln(close/yesterday’s close),length) * 100 * square root (256).
In English:
1. Divide today’s close by yesterday’s close.
2. Take the natural log of #1.
3. Take the standard deviation of #2 for length desired (the number of trading days, i.e. 50)
4. Multiply #3 by 100.
5. Multiply #4 by the square root of the number of trading days in 1 year (around 256).
HV is based on a one-standard deviation move
If not, is there a "Standard Deviation" function somewhere I can use while coding my own?
Thanks!
The formula as presented to me is as follows:
Historical Volatility(length) = standard deviation(ln(close/yesterday’s close),length) * 100 * square root (256).
In English:
1. Divide today’s close by yesterday’s close.
2. Take the natural log of #1.
3. Take the standard deviation of #2 for length desired (the number of trading days, i.e. 50)
4. Multiply #3 by 100.
5. Multiply #4 by the square root of the number of trading days in 1 year (around 256).
HV is based on a one-standard deviation move
If not, is there a "Standard Deviation" function somewhere I can use while coding my own?
Thanks!
Comment