# Documentation

## Sample and Expected Lower Partial Moments

### Introduction

Use lower partial moments to examine what is colloquially known as "downside risk." The main idea of the lower partial moment framework is to model moments of asset returns that fall below a minimum acceptable level of return. To compute lower partial moments from data, use lpm to calculate lower partial moments for multiple asset return series and for multiple moment orders. To compute expected values for lower partial moments under several assumptions about the distribution of asset returns, use elpm to calculate lower partial moments for multiple assets and for multiple orders.

### Sample Lower Partial Moments

The following example demonstrates lpm to compute the zero-order, first-order, and second-order lower partial moments for the three time series, where the mean of the third time series is used to compute MAR (with the so-called risk-free rate).

Returns = tick2ret(TestData);
Assets
MAR = mean(Returns(:,3))
LPM = lpm(Returns, MAR, [0 1 2])

which gives the following results:

Assets =
'Fund'    'Market'    'Cash'
MAR =
0.0017
LPM =
0.4333    0.4167    0.6167
0.0075    0.0140    0.0004
0.0003    0.0008    0.0000

The first row of LPM contains zero-order lower partial moments of the three series. The fund and market index fall below MAR about 40% of the time and cash returns fall below its own mean about 60% of the time.

The second row contains first-order lower partial moments of the three series. The fund and market have large expected shortfall returns relative to MAR by 75 and 140 basis points per month. On the other hand, cash underperforms MAR by about only four basis points per month on the downside.

The third row contains second-order lower partial moments of the three series. The square root of these quantities provides an idea of the dispersion of returns that fall below the MAR. The market index has a much larger variation on the downside when compared to the fund.

### Expected Lower Partial Moments

To compare realized values with expected values, use elpm to compute expected lower partial moments based on the mean and standard deviations of normally distributed asset returns. The elpm function works with the mean and standard deviations for multiple assets and multiple orders.

Returns = tick2ret(TestData);
MAR = mean(Returns(:,3))
Mean = mean(Returns)
Sigma = std(Returns, 1)
Assets
ELPM = elpm(Mean, Sigma, MAR, [0 1 2])

which gives the following results:

Assets =
'Fund'    'Market'    'Cash'
ELPM =
0.4647    0.4874    0.5000
0.0082    0.0149    0.0004
0.0002    0.0007    0.0000

Based on the moments of each asset, the expected values for lower partial moments imply better than expected performance for the fund and market and worse than expected performance for cash. This function works with either degenerate or nondegenerate normal random variables. For example, if cash were truly riskless, its standard deviation would be 0. You can examine the difference in expected shortfall.

RisklessCash = elpm(Mean(3), 0, MAR, 1)

which gives the following result:

RisklessCash =
0