[R-SIG-Finance] fPortfolio question: is it possible to optimize a portfolio when you've got missing (returns) data for a subset of your total assets?

Jorgy Porgee jorgy.porgee at gmail.com
Thu Feb 4 13:45:21 CET 2010


Good day all,

I'm trying to create a MV portfolio using a bunch of stock returns.
However, the length of the historic data is not uniform (some stocks
have 12 month historics say while the bulk have 24 which is what I'm
interested in).

Is there a way of creating a portfolio (so far I've tried a
feasiblePortfolio()) without dropping the subset with short histories?

So far I get this error:

> setWeights(ewSpec)<-rep(1/nAssets,times=nAssets)
> ewPortfolio<-feasiblePortfolio(
	data = asset.returns,
	spec = ewSpec,
	constraints = "LongOnly"
	)

Error in quantile.default(returns, alpha, type = 1) :
  missing values and NaN's not allowed if 'na.rm' is FALSE

Thanking you in advance,

Jorgy.



More information about the R-SIG-Finance mailing list