Calculate Variance and Standard Deviation of an Asset

After discussing the calculation of returns on investments, let’s now learn about how to measure the risks associated with these returns.

In general, the risk of an asset or a portfolio is measured in the form of the standard deviation of the returns, where standard deviation is the square root of variance. Let’s look at how standard deviation and variance is calculated.

The variance is calculated as follows. Once you have the price data, the first step is to calculate the returns. What kind of returns we have depends on the periodicity of the data. For example, if we have daily prices, then we calculate the daily returns, which is calculated as (P(t1) – P(t0))/p(t0).

Using the returns data, we calculate the mean/average returns. The variance of the asset returns will then be the average of square of the difference between the returns and the mean.

Where n is the number of observations in the data, Rt represents the returns for each time period and μ represents the mean returns.

The standard deviation will simply be the square root of the variance.

The following is a simple example that illustrates the calculation:

Related Downloads

Membership
Learn the skills required to excel in data science and data analytics covering R, Python, machine learning, and AI.
I WANT TO JOIN
JOIN 30,000 DATA PROFESSIONALS

Free Guides - Getting Started with R and Python

Enter your name and email address below and we will email you the guides for R programming and Python.

Saylient AI Logo

Take the Next Step in Your Data Career

Join our membership for lifetime unlimited access to all our data analytics and data science learning content and resources.