Chris Pollett > Students > Kabra

    Print View



    [CS297 Proposal]





    [CS 297 Report-PDF]

    [CS298 Proposal]

    [CS 298 Report-PDF]

    [CS 298 Presentation-PDF]

Volatility of a stock:

In deliverable 1, I will be calculating historic volatility of any given stock ticker from SandP 500 stock market. Volatility of a stock is the degree of variation of price series over time. It is measured by standard deviation of returns of stock. Historic volatility is derived from past market prices for time series. Historic volatility is also called as realized volatility. The 1st step in calculating volatility is to find returns of stock.

The return of a stock is the percentage difference of Adjusted Close Price of i-th day compared to (i-1)-th day The next step is to calculate the realized variance. It can be calculated as sum of squared returns divided by number of observations. Based on this, Realized Volatility is calculated as a square root of realized variance. But in this deliverable, we will calculate the volatility of stock based on its performance with respect to the performance of overall market index. In this way we will get the relative measure of risk for that stock.

To run the program: Type $ python ./ AAPL 24 Here, AAPL is name of desired stock ticker 24 is number of days from current date to past.