Calculating volatility measure from price movement alone

Discussion in 'Strategy Building' started by logic_man, May 20, 2011.

  1. heech

    heech

    "Volatility estimator" is the right term to be googling. There isn't a simple way to even define the term volatility, although usually we use it as being equivalent to the standard deviation for a log-normal distribution.

    What *you* mean by the term "volatility" is really up to you.
     
    #11     May 24, 2011
  2. ddude

    ddude

    Thats not BS thats R 8^)

    To be more terse:

    > # load a nice quant library...
    > require(quantmod)
    > # get the daily data from yahoo for a year back...
    > # do the close-to-close volatility calculation...
    > # display the end of the time series of volatility...
    > tail(volatility(getSymbols('aapl', auto.assign=FALSE), calc="close"))
    [,1]
    2011-05-16 0.1466364
    2011-05-17 0.1636225
    2011-05-18 0.1759760
    2011-05-19 0.1771079
    2011-05-20 0.1881051
    2011-05-23 0.1859659
    >

    Hmmm... Four comments and two lines of code... And NO BS ;^)

    Cordially,

    -Digital Dude-
     
    #12     May 24, 2011
  3. I have ended up going this route, more or less. I agree that things don't need to be overly complicated, just complicated enough to matter.
     
    #13     May 25, 2011