Next: Mean variance portfolios. Up: Mean Variance Analysis. Previous: Mean Variance Analysis.   Contents   Index

# Introduction.

The mean variance choice is one of the oldest finance areas, dating back to work of Markowitz. The basic assumption is that risk is measured by variance, and that the decision criterion should be to minimize variance given expected return, or to maximize expected return for a given variance.

Mean variance analysis is very simple when expressed in vector format.

Let

be the expected return for the assets, and

be the covariance matrix.

A portfolio of assets is expressed as

To find the expected return of a portfolio:

and the variance of a portfolio:

// file mv_calc.cc
// author: Bernt A Oedegaard
// basic calculations for mean variance analysis

#include "newmat.h"
#include <cmath>

double mv_calculate_mean(const Matrix& e, const Matrix& w){
Matrix tmp = e.t()*w;
return tmp.element(0,0);
};

double mv_calculate_variance(const Matrix& V, const Matrix& w){
Matrix tmp = w.t()*V*w;
return tmp.element(0,0);
};

double mv_calculate_st_dev(const Matrix& V, const Matrix& w){
double var = mv_calculate_variance(V,w);
return sqrt(var);
};


Next: Mean variance portfolios. Up: Mean Variance Analysis. Previous: Mean Variance Analysis.   Contents   Index
Bernt Arne Odegaard
1999-09-09