
Hi,

 

 

Point 1:

I am not yet familiar with fPortfolio, but there is a document on rmetrics website (from which fPortfolio is a module) named "Portfolio Optimization with R/Rmetrics". Only part is available free online, you must pay to get the whole document. It is pretty comprehensive (I hope with 455 pages) but just screening through I saw they cover mean CVar optimization. I doubt they do not cover mean-Var optimization as well. 
 

Point 2: 

As I understand your question it is just optimizing the portfolio, once you get the optimal weights it is a matter to run a historical simulation on your portfolio for the desired period. As far as I am aware these are 1 step optimizations, so using annual data optimizes your portfolio for a 1 year horizon - not for 6 months or 2 years. Now once you have the weights, you can run a historical simulation on the time period you want but it would not make sense I believe (There may be a way to twist this?). For the two years period, I would optimize (assuming you use these annual data) on t=0, simulate performance between t=0 and t=1, optimize again on t=1 (with horizon t=2) and finally simulate between t=1 and t=2.

 

 

Hope this help somehow

 

 

Rgds,

Julien

 

 

 
> Date: Fri, 11 Sep 2009 04:59:13 -0700
> From: jon.wanxian@gmail.com
> To: r-sig-finance@stat.math.ethz.ch
> Subject: [R-SIG-Finance] [R-sig-finance] Newbie Question: Portfolio Optimization with MV, LPM and CVaR constraints
> 
> 
> Hi there,
> 
> I'd start of by apologizing if the following has been answered in previous
> discussions or materials, so far my searches haven't been resourceful.
> 
> I have a project on portfolio optimization to track performances of
> portfolios created under different constraints (mean-variance, LPM, VaR and
> CVaR). I've used monthly data (for 12 years) for a couple of shares, and I
> stumbled on fPortfolio which I've been trying out for the last 2 weeks.
> 
> I'm having trouble figuring out a couple of things.
> 
> 1. Is it possible for fPortfolio to optimize a portfolio constrained by the
> VaR?
> 
> 2. Would it be possible to use the first 10 years of my data to optimize the
> portfolios and track performances at 6 months, 1 year and 2 years after
> that?
> 
> 3. I'm having some trouble with the LPM method of optimization. It's
> spitting out the error below, but only on monthly data, it works fine with
> weekly data.
> 
> Here's my codes:
> 
> dataset <-read.table("Portfolio1.csv",header=T,sep=",") 
> data <- timeSeries(dataset)
> data <- returns(data, type = "continuous")
> 
> mvspec = portfolioSpec()
> 
> lpmspec = portfolioSpec()
> setEstimator(lpmspec) <- "lpmEstimator"
> setType(lpmspec) <- "QLPM"
> lpmspec@model$param$a <- 2
> lpmspec@model$param$tau <- "colMeans"
> 
> cvarspec = portfolioSpec()
> setType(cvarspec) = "CVaR"
> setAlpha(cvarspec) = 0.05
> setSolver(cvarspec) = "solveRsymphony"
> 
> tangencyPortfolio(data, mvspec)
> 
> tangencyPortfolio(data, cvarspec)
> 
> tangencyPortfolio(data, lpmspec)
> 
> which is spitting out the following error:
> 
> Execution stopped:
> The maximum ratio portfolio could not be computed.
> Possible Reason:
> Your portfolio constraints may be too restrictive.
> Status Information:
> status=2 from solver solveRquadprog.
> Error: 
> returned from Rmetrics
> In addition: There were 15 warnings (use warnings() to see them)
> 
> However, it works on weekly data..?
> 
> dataset2 <-read.table("weeklydata.csv",header=T,sep=",")
> weeklydata <- timeSeries(dataset2)
> 
> tangencyPortfolio(weeklydata, lpmspec)
> 
> 
> Data
> Monthly: http://www.nabble.com/file/p25398920/Portfolio1.csv Portfolio1.csv 
> Weekly: http://www.nabble.com/file/p25398920/weeklydata.csv weeklydata.csv 
> 
> 
> If anyone is able to point me in the right direction, I'd be extremely
> grateful! Thanks~
> -- 
> View this message in context: http://www.nabble.com/Newbie-Question%3A-Portfolio-Optimization-with-MV%2C-LPM-and-CVaR-constraints-tp25398920p25398920.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
> 
> _______________________________________________
> R-SIG-Finance@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.

_________________________________________________________________
Revisa tus correos de Hotmail en tu celular - Clic Aquí

	[[alternative HTML version deleted]]

