Problems plotting the efficient frontier with fPortfolio
Hello Felipe, again, I am not a great expert with fPortfolio, but I think the problem lies in your Dataset (not the numbers themselves, but the structure of the dataset - eg. colnames, rownames,...) Did you try building the efficient portfolio with a sample set of data that works (e.g. with the sample data provided in the fPortfolio package)? I would use print(Data[1:10,1:10]) to check what the data looks like in both cases and then see whether the problem lies there. I would also suggest just using parts of your data (maybe there are some missing rows,... in between that cause trouble) - you can then locate the problem more efficient. Good luck! Lui On Tue, Jan 25, 2011 at 3:46 AM, Luis Felipe Parra
<felipe.parra at quantil.com.co> wrote:
Hello, I have some simulations of financial data, I have 17 variables simulated 1000 times to three horizons. I am tring to plot the efficient frontier which I already obtained ?using th fPortfolio package. I am using the following commands: Data=timeSeries(X[1,,]) lppSpec <- portfolioSpec() longFrontier <- portfolioFrontier(Data, lppSpec) plot(longFrontier) Selecci?n: 1 Error en dimnames(x) <- dn : ?la longitud de 'dimnames' [1] no es igual a la extensi?n del arreglo
tailoredFrontierPlot(object = longFrontier, mText = "MV Portfolio -
LongOnlyConstraints",risk = "Cov") Error en dimnames(x) <- dn : ?la longitud de 'dimnames' [1] no es igual a la extensi?n del arreglo and getting the error that appears. I also tried to do the same with the same data changing the solver to "solveRshortExact" and using the "Short" constraints and got the same error. Does anybody know what might be going on? Thank you ? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.