Calculating the standard deviation for non‐derivative stocks is essentially the process of measuring the volatility of the underlying asset’s returns. Whether you’re working with stocks (which are not derivatives) or any other asset, the calculation steps are typically as follows:
1. Collect Price Data
Obtain a series of historical prices for the stock. Common choices include daily closing prices, though the process works similarly if you choose weekly or monthly data.
2. Calculate Returns
Volatility is generally calculated based on returns rather than raw prices. You have two common approaches:
-
Arithmetic Returns:
[
R_t = \frac{P_t - P_{t-1}}{P_{t-1}}
]
-
Logarithmic (Log) Returns:
[
r_t = \ln\left(\frac{P_t}{P_{t-1}}\right)
]
Note: Log returns have desirable properties (such as time additivity) and are often preferred for statistical analysis.
3. Compute the Mean Return
For a series of ( n ) returns—say ( R_1, R_2, \ldots, R_n ) (or ( r_1, r_2, \ldots, r_n ))—compute the average return:
[
\bar{R} = \frac{1}{n} \sum_{t=1}^{n} R_t
]
4. Calculate the Variance
The variance measures the average squared deviation of each return from the mean return. There are two common versions depending on whether you treat your data as a full population or a sample:
-
Population Variance (if you believe you have the complete dataset):
[
\sigma^2 = \frac{1}{n} \sum_{t=1}^{n} \left( R_t - \bar{R} \right)^2
]
-
Sample Variance (more common in practice when data is a sample from a larger population):
[
s^2 = \frac{1}{n-1} \sum_{t=1}^{n} \left( R_t - \bar{R} \right)^2
]
5. Compute the Standard Deviation
Take the square root of the variance to obtain the standard deviation:
This value represents the volatility of the stock returns over the period you analyzed.
6. Annualizing the Standard Deviation (Optional)
If you are using daily returns and want to express the volatility on an annual basis, use the following transformation. Assume there are roughly 252 trading days in a year:
[
\sigma_{\text{annual}} = s_{\text{daily}} \times \sqrt{252}
]
Similarly, if you’re starting with weekly data and there are about 52 weeks per year:
[
\sigma_{\text{annual}} = s_{\text{weekly}} \times \sqrt{52}
]
Example Calculation
Suppose you have daily closing prices for 5 days:
- Prices: $100, $102, $101, $103, $104
-
Compute Daily Arithmetic Returns:
- Day 2: ( \frac{102-100}{100} = 0.02 ) (or 2%)
- Day 3: ( \frac{101-102}{102} \approx -0.0098 ) (approximately -0.98%)
- Day 4: ( \frac{103-101}{101} \approx 0.0198 ) (about 1.98%)
- Day 5: ( \frac{104-103}{103} \approx 0.0097 ) (about 0.97%)
-
Calculate the Mean Return:
[
\bar{R} = \frac{0.02 + (-0.0098) + 0.0198 + 0.0097}{4} \approx \frac{0.0397}{4} \approx 0.009925 \quad (\text{or } \approx 0.99%)
]
-
Calculate the Sample Variance:
[
s^2 = \frac{1}{4-1} \left[ (0.02-0.009925)^2 + (-0.0098-0.009925)^2 + (0.0198-0.009925)^2 + (0.0097-0.009925)^2 \right]
]
Breaking it down:
- ( (0.02-0.009925)^2 \approx (0.010075)^2 \approx 0.0001015 )
- ( (-0.0098-0.009925)^2 \approx (-0.019725)^2 \approx 0.000389 )
- ( (0.0198-0.009925)^2 \approx (0.009875)^2 \approx 0.0000975 )
- ( (0.0097-0.009925)^2 \approx (-0.000225)^2 \approx 0.00000005 )
Sum these up:
[
\text{Sum} \approx 0.0001015 + 0.000389 + 0.0000975 + 0.00000005 \approx 0.00058805
]
Then:
[
s^2 \approx \frac{0.00058805}{3} \approx 0.00019602
]
-
Calculate the Standard Deviation:
[
s \approx \sqrt{0.00019602} \approx 0.014 \quad (\text{or } 1.4%)
]
This 1.4% represents the daily volatility based on your sample data. To annualize, multiply by (\sqrt{252}).
Summary
- Data Collection: Use historical non-derivative (underlying stock) prices.
- Return Calculation: Calculate daily (or weekly/monthly) returns.
- Mean & Variance: Compute the average and variance (using either population or sample formulas).
- Standard Deviation: Take the square root of the variance.
- Annualization (Optional): Multiply by the square root of the number of periods per year.
This method will give you a measure of how much the stock’s price tends to deviate from its average return, effectively quantifying its risk or volatility.
If you have any further questions or need additional calculations or clarifications, feel free to ask!