Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

VARIABLE ANALYSIS

Submitted By:
CHRISTINA TOM
JUNIOR RESEARCH ANALYST
STANDARD DEVIATION

The Standard Deviation is a measure of how spread out numbers are. The symbol for
Standard Deviation is σ (the Greek letter sigma).

This is the formula for Standard Deviation:

When we use the sample as an estimate of the whole population, the Standard Deviation
formula changes to this:

The formula for Sample Standard Deviation:

Calculating the standard deviation using Excel

Excel has functions to calculate the population and sample standard deviations. The appropriate
commands are entered into the formula bar towards the top of the spreadsheet and the
corresponding cells in the spreadsheet are updated to show the result.

The population standard deviation is calculated using =STDEV(VALUES).

The sample standard deviation will always be greater than the population standard deviation
when they are calculated for the same dataset. This is because the formula for the sample
standard deviation has to take into account the possibility of there being more variation in the
true population than has been measured in the sample.
VARIANCE

The Variance is defined as, “The average of the squared differences from the Mean”. It is
basically the square of standard deviation.

During the calculation, when you have "N" data values that are:

• The Population: divide by N when calculating Variance (like we did)

• A Sample: divide by N-1 when calculating Variance.

How to calculate variance in Excel

There are 6 built-in functions to do variance in Excel: VAR, VAR.S, VARP, VAR.P, VARA,
and VARPA.

Your choice of the variance formula is determined by the following factors:

• The version of Excel you are using.


• Whether you calculate sample or population variance.
• Whether you want to evaluate or ignore text and logical values.

Excel variance functions

The below table provides an overview of the variation functions available in Excel to help you
choose the formula best suited for your needs.

Name Excel version Data type Text and logical

VAR 2000 - 2019 Sample Ignored

VAR.S 2010 - 2019 Sample Ignored

VARA 2000 - 2019 Sample Evaluated

VARP 2000 - 2019 Population Ignored

VAR.P 2010 - 2019 Population Ignored

VARPA 2000 - 2019 Population Evaluated

VARA and VARPA


VARA and VARPA differ from other variance functions only in the way they handle logical
and text values in references. The following table provides a summary of how text
representations of numbers and logical values are evaluated.

VAR, VAR.S, VARA &


Argument Type
VARP, VAR.P VARPA

Evaluated
Logical values within arrays and references Ignored (TRUE=1,
FALSE=0)

Text representations of numbers within arrays and Evaluated as


Ignored
references zero

Logical values and text representations of numbers Evaluated


typed directly into arguments (TRUE=1, FALSE=0)

Empty cells Ignored

How to calculate a sample variance in Excel

A sample is a set of data extracted from the entire population. And the variance calculated
from a sample is called sample variance.

For example, if you want to know how people's heights vary, it would be technically unfeasible
for you to measure every person on the earth. The solution is to take a sample of the population,
say 1,000 people, and estimate the heights of the whole population based on that sample.

Sample variance is calculated with this formula:

Where:

• x̄ is the mean (simple average) of the sample values.

• n is the sample size, i.e. the number of values in the sample.

• There are 3 functions to find sample variance in Excel: VAR, VAR.S and VARA.
SEMI VARIANCE

Semi variance is a measurement of data that can be used to estimate the potential downside risk
of an investment portfolio. Semi variance is calculated by measuring the dispersion of all
observations that fall below the mean or target value of a set of data. Semi variance is an
average of the squared deviations of values that are less than the mean.

Semi variance is similar to variance, but it only considers observations that are below the mean.
Semi variance is a useful tool in portfolio or asset analysis because it provides a measure
for downside risk.

While standard deviation and variance provide measures of volatility, semi variance only looks
at the negative fluctuations of an asset. Semi variance can be used to calculate the average loss
that a portfolio could incur because it neutralizes all values above the mean, or above an
investor's target return.

For risk-averse investors, determining optimal portfolio allocations by minimizing semi


variance could reduce the likelihood of a large decline in the portfolio's value.

The Formula for Semi variance

Semi variance=

where:

n=The total number of observations below the mean

rt=The observed value

Average=The mean or target value of the dataset

Calculate with a Spreadsheet

To use a spreadsheet program to calculate semi variance:

• Create a column - for example, column A - that consists of all returns in the portfolio.

• Remove all returns above the mean from column A.

• In column B, subtract the returns remaining in column A from the mean.


• In column C, square the difference, find the sum, and divide the sum by the number of
returns that fall below the mean.

Different spreadsheets may have different functionality and some have easier ways or shortcuts
to do this calculation.

COEFFICIENT OF VARIATION

The coefficient of variation (CV) is a statistical measure of the dispersion of data points in a
data series around the mean. The coefficient of variation represents the ratio of the standard
deviation to the mean, and it is a useful statistic for comparing the degree of variation from one
data series to another, even if the means are drastically different from one another.

The coefficient of variation (CV) is a statistical measure of the dispersion of data points in a
data series around the mean. The coefficient of variation represents the ratio of the standard
deviation to the mean, and it is a useful statistic for comparing the degree of variation from one
data series to another, even if the means are drastically different from one another.

Coefficient of Variation Formula

Below is the formula for how to calculate the coefficient of variation:

where:

• σ=standard deviation

• μ=mean

Please note that if the expected return in the denominator of the coefficient of variation formula
is negative or zero, the result could be misleading.

Coefficient of Variation in Excel

The coefficient of variation formula can be performed in Excel by first using the standard
deviation function for a data set. Next, calculate the mean using the Excel function provided.
Since the coefficient of variation is the standard deviation divided by the mean, divide the cell
containing the standard deviation by the cell containing the mean.
COVARIANCE

Covariance is a measure of how much two random variables vary together. It’s similar
to variance, but where variance tells you how a single variable varies, co variance tells you
how two variables vary together.

Formula

The formula is:

Cov(X, Y) = Σ E((X-μ)E(Y-ν)) / n-1

where:
X is a random variable.

E(X) = μ is the expected value (the mean) of the random variable X and,

E(Y) = ν is the expected value (the mean) of the random variable Y

n = the number of items in the data set

Advantages of the Correlation Coefficient

The Correlation Coefficient has several advantages over covariance for determining strengths
of relationships:

• Covariance can take on practically any number while a correlation is limited: -1 to +1.

• Because of its numerical limitations, correlation is more useful for determining how
strong the relationship is between the two variables.

• Correlation does not have units. Covariance always has units

• Correlation isn’t affected by changes in the centre (i.e. mean) or scale of the variables

Covariance in Excel
Covariance gives you a positive number if the variables are positively related. You’ll get a
negative number if they are negatively related. A high covariance basically indicates there is a
strong relationship between the variables. A low value means there is a weak relationship.

CORRELATION COEFFICIENT

Correlation coefficients are used in statistics to measure how strong a relationship is between
two variables. There are several types of correlation coefficient, but the most popular is
Pearson’s. Pearson’s correlation (also called Pearson’s R) is a correlation
coefficient commonly used in linear regression. If you’re starting out in statistics, you’ll
probably learn about Pearson’s R first. In fact, when anyone refers to the correlation
coefficient, they are usually talking about Pearson’s.

It is calculated by the formula:

Correlation coefficient formulas are used to find how strong a relationship is between data. The
formulas return a value between -1 and 1, where:

• 1 indicates a strong positive relationship.


• -1 indicates a strong negative relationship.
• A result of zero indicates no relationship at all.
R Squared

R-squared (R2) is a statistical measure that represents the proportion of the variance for a
dependent variable that's explained by an independent variable or variables in a regression
model. Whereas correlation explains the strength of the relationship between an independent
and dependent variable, R-squared explains to what extent the variance of one variable explains
the variance of the second variable. So, if the R2 of a model is 0.50, then approximately half
of the observed variation can be explained by the model's inputs.

In investing, R-squared is generally interpreted as the percentage of a fund or security's


movements that can be explained by movements in a benchmark index. For example, an R-
squared for a fixed-income security versus a bond index identifies the security's proportion of
price movement that is predictable based on a price movement of the index. The same can be
applied to a stock versus the S&P 500 index, or any other relevant index.

The Formula for R-Squared

R-squared values range from 0 to 1 and are commonly stated as percentages from 0% to 100%.
An R-squared of 100% means that all movements of a security (or another dependent variable)
are completely explained by movements in the index (or the independent variable(s) you are
interested in).

In investing, a high R-squared, between 85% and 100%, indicates the stock or fund's
performance moves relatively in line with the index. A fund with a low R-squared, at 70% or
less, indicates the security does not generally follow the movements of the index. A higher R-
squared value will indicate a more useful beta figure. For example, if a stock or fund has an R-
squared value of close to 100%, but has a beta below 1, it is most likely offering higher risk-
adjusted returns.

Limitations of R-Squared

R-squared will give you an estimate of the relationship between movements of a


dependent variable based on an independent variable's movements. It doesn't tell you whether
your chosen model is good or bad, nor will it tell you whether the data and predictions are
biased. A high or low R-square isn't necessarily good or bad, as it doesn't convey the reliability
of the model, nor whether you've chosen the right regression. You can get a low R-squared for
a good model, or a high R-square for a poorly fitted model, and vice versa.

Calculation in Excel

The formula for R squared is quite complicated, and entering the values in a cell is prone to
errors in calculation. Fortunately, Excel has built-in functions that allow us to easily calculate
the R squared value in regression.

The correlation coefficient, r can be calculated by using the function CORREL. R squared can
then be calculated by squaring r, or by simply using the function RSQ. In order to calculate R
squared, we need to have two data sets corresponding to two variables.

BETA

A measure of a security’s or portfolio’s


volatility. A beta of 1 means that the security or portfolio is neither more nor less volatile or r
isky than the wider market. A beta of more than 1 indicates greater volatility and a beta of les
s than 1 indicates less. Beta is an important component of the capital asset pricing
model, which attempts to use volatility and risk to estimate expected returns.

Beta is a measure of an investment's relative volatility. The higher the beta, the more sharply
the value of the investment can be expected to fluctuate in relation to a market index.

For example, Standard & Poor's 500 Index (S&P 500) has a beta coefficient (or base) of 1. Th
at means if the S&P 500 moves 2% in either direction, a stock with a beta of 1 would also mo
ve 2%.

Under the same market conditions, however, a stock with a beta of 1.5 would move 3% (2% i
ncrease x 1.5 beta = 0.03, or 3%). But a stock with a beta lower than 1 would be expected to
be more stable in price and move less. Betas as low as 0.5 and as high as 4 are fairly common
, depending on the sector and size of the company.

However, in recent years, there has been a lively debate about the validity of assigning and us
ing a beta value as an accurate predictor of stock performance.

Calculating Beta in Excel

It may seem redundant to calculate beta, since it's a widely used and publicly available metric.
But there's one reason to do it manually: the fact that different sources use different time periods
in calculating returns. While beta always involves the measurement of variance and covariance
over a period, there is no universal, agreed-upon length of that period. Therefore, one financial
vendor may use five years of monthly data (60 periods over five years), while another may use
one year of weekly data (52 periods over one year) in coming up with a beta number. The
resultant differences in beta may not be huge, but consistency can be crucial in making
comparisons.

To calculate beta in Excel:

1. Download historical security prices for the asset whose beta you want to measure.

2. Download historical security prices for the comparison benchmark.

3. Calculate the percent change period to period for both the asset and the benchmark.
If using daily data, it's each day; weekly data, each week, etc.

4. Find the Variance of the asset using =VAR.S(all the percent changes of the asset).

5. Find the Covariance of asset to the benchmark using =COVARIANCE.S(all the


percent changes of the asset, all the percent changes of the benchmark).

VALUE AT RISK
Value at Risk (VaR) is a financial metric that estimates the risk of an investment. More
specifically, VaR is a statistical technique used to measure the amount of potential loss that
could happen in an investment portfolio over a specified period of time. Value at Risk gives
the probability of losing more than a given amount in a given portfolio.

Advantages of Value at Risk

• Easy to understand

Value at Risk is a single number that indicates the extent of risk in a given portfolio. Value at
Risk is measured in either price units or as a percentage. This makes the interpretation and
understanding of VaR relatively simple.

• Applicability

Value at Risk is applicable to all types of assets – bonds, shares, derivatives, currencies, etc.
Thus, VaR can be easily used by different banks and financial institutions to assess the
profitability and risk of different investments, and allocate risk based on VaR.

• Universal

The Value at Risk figure is widely used, so it is an accepted standard in buying, selling, or
recommending assets.

Limitations

• Large portfolios

Calculation of Value at Risk for a portfolio not only requires one to calculate the risk and return
of each asset but also the correlations between them. Thus, the greater the number or diversity
of assets in a portfolio, the more difficult it is to calculate VaR.

• Difference in methods

Different approaches to calculating VaR can lead to different results for the same portfolio.

Assumptions

Calculation of VaR requires one to make some assumptions and use them as inputs. If the
assumptions are not valid, then neither is the VaR figure.

Key Elements of Value at Risk

Specified amount of loss in value or percentage


Time period over which the risk is assessed

Confidence interval.

Methods Used for Calculating VaR

1. Historical Method

The historical method is the simplest method for calculating Value at Risk. Market data for the
last 250 days is taken to calculate the percentage change for each risk factor on each day. Each
percentage change is then calculated with current market values to present 250 scenarios for
future value.

Where:

vi is number of variables on day i

m is the number of days from which historical data is taken.

2. Parametric Method

The parametric method is also known as the variance-covariance method. This method assumes
a normal distribution in returns. Two factors are to be estimated – an expected return and a
standard deviation. This method is best suited to risk measurement problems where the
distributions are known and reliably estimated. The method is unreliable when the sample size
is very small.

Let loss be ‘l’ for a portfolio ‘p’ with ‘n’ number of instruments.
• Monte Carlo Method

Under the Monte Carlo method, Value at Risk is calculated by randomly creating a number of
scenarios for future rates using non-linear pricing models to estimate the change in value for
each scenario, and then calculating the VaR according to the worst losses. This method is
suitable for a great range of risk measurement problems, especially when dealing with
complicated factors.

• Marginal Value at Risk (MVaR)

The marginal value at risk (MVaR) method is the amount of additional risk that is added by a
new investment in the portfolio. MVaR helps fund managers to understand the change in a
portfolio due to the subtraction or addition of a particular investment. An investment may
individually have a high Value at Risk, but if it is negatively correlated with the portfolio, it
may contribute a relatively much lower amount of risk to the portfolio than its standalone risk.

• Incremental Value at Risk

Incremental VaR is the amount of uncertainty added to, or subtracted from, a portfolio due to
buying or selling of an investment. Incremental VaR is calculated by taking into consideration
the portfolio’s standard deviation and rate of return, and the individual investment’s rate of
return and portfolio share.

• Conditional Value at Risk (CVaR)

This is also known as the expected shortfall, average value at risk, tail VaR, mean excess loss,
or mean shortfall. CVaR is an extension of VaR. CVaR helps to calculate the average of the
losses that occur beyond the Value at Risk point in a distribution. The smaller the CVaR, the
better.

You might also like