Skip to content
All library documents

Handling Missing Asset Histories in Portfolio Optimization

Article Quant Q&A · Author: Francois Botha

Summary

The document considers how to calculate an efficient frontier when assets have different return-history lengths. A complete-case approach, using only dates shared by every asset, discards earlier observations for assets with longer histories; the question asks how to retain the available history without passing missing values into fPortfolio.

Suggested options include estimating the mean and covariance while accounting for missing data and supplying those moments to a modified or custom optimizer. Another proposal is multiple imputation: simulate plausible values for missing observations, optimize across repeated completed datasets, and average the resulting weights. The discussion also points to a portfolio optimization package whose moment-function argument allows custom moment estimation. These are high-level options rather than a worked comparison. Imputation and moment estimates depend on assumptions about missingness and return distributions, and averaging optimized weights does not by itself establish that the resulting portfolio is robust.

Key ideas

  • Using only dates shared by all assets can discard useful observations from longer histories.
  • Estimating means and covariances with missing data may allow optimization without complete return panels.
  • Multiple imputation can create completed datasets for repeated optimization, followed by aggregation of weights.
  • A customizable moment function can connect missing-data estimates to a portfolio optimizer.
  • The document does not compare the methods empirically or specify missingness assumptions.

Tags

Full text
# Calculate efficient frontier using fPortfolio with incomplete set of returns


# Calculate efficient frontier using fPortfolio with incomplete set of returns












I want to calculate the efficient frontier for a set of 140 assets using returns from the past 10 years. However, some of these assets came into existence only more recently, so for some assets I have the returns for the full 10 years, but for others I have returns only e.g. the last 3 years.

I can calculate the efficient frontier (as described in http://www.finance-r.com/s/efficient_frontier_fPortfolio/complete/ ) if I use the tail of the returns for which all returns are available. But I'd like to use the the full set of returns, where available.

Currently fPortfolio throws an exception when I input a dataset with NAs. How would I reach my goal? I suspect I'd have to tinker with the fPortfolio source.

## Answer by John (score 0, accepted)

https://quant.stackexchange.com/a/17168

I am not a particularly big fan of fPortfolio. My first thought was to estimate a mean and covariance matrix accounting for the missing data (should be discussed several times on this site or other places) and pass that. However, looking at the manual, it looks like the relevant functions only take time series data. Based on that limitation, you have a few options

- Get the fPortfolio source and re-write the relevant functions to take a mean and covariance

- Write your own portfolio optimization function doing the same thing as #1. Not really that hard.

- A more sophisticated approach might be to use multiple imputation. In this case, you'd simulate missing data for your time series and then pass the complete dataset to the fPortfolio function. Repeat this many times and take an average of the weights (following some burn-in).

## Answer by WaltS (score 0)

https://quant.stackexchange.com/a/17195

You might take a look at the `PortfolioAnalytics` package. It's `optimize.portfolio` function does require asset returns but the momentFUN argument allows you to provide your own function for using these returns to calculate the moments used in the optimization. Overall it provides a great deal of flexibility for specifying constraints and optimization methods. It's not on CRAN but is available from Return Analytics Development Page .

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.