[R-SIG-Finance] fPortfolio and leverage

Brian G. Peterson brian at braverock.com
Thu Aug 21 15:31:03 CEST 2008


your example can still account for leverage.

the w vector can be interpreted as percentage allocations from your 
total dollars to invest.

Your leverage is unconstrained from the optimization.  Whether you have 
100 euros to invest or 200 million euros to invest, you will still apply 
the weights from the output of the optimization.

Regards,

   - Brian

giuseppe1.milicia at hsbcib.com wrote:
> Guys,
> 
> I'm playing a bit with fPortfolio and looking at the examples and unit
> tests, it seems that the weights returned always sum up to 1.
> 
> I was wondering whether there is a way to have a leveraged portfolio with
> weights summing up to W > 1. Say I target a certain risk level R and I want
> the weights to be totally unconstrained. From the docs I see that
> Constraints = "Short" should given me unconstrained weights:
> 
> "Short": This selection defines the case of unlimited short selling. i.e.
> each weight may range
> between -Inf and Inf. Consequently, there are no group constraints. Risk
> budget constraints are
> not included in the portfolio optimization.
> 
> But, say if I try this:
> 
> # Load Data and Convert to timeSeries Object:
> Data = as.timeSeries(data(smallcap.ts))
> Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
> Data
> 
> # Set Default Specifications:
> Spec = portfolioSpec()
> Spec
> 
> setTargetAlpha(Spec) = 0.6
> 
> # Allow for unlimiConstraints = "Short"ted Short Selling:
> Constraints = "Short"
> 
> # Compute Short Selling Minimum Variance Portfolio
> frontier = portfolioFrontier(Data, Spec, Constraint)
> 
> I seem to get always weights adding up to 1, no matter what I do...
> 
> I tried:
> 
> frontier = portfolioFrontier(Data, Spec, "maxsumW[1:22]=2")
> 
> Weights add up to 1 again.
> 
> frontier = portfolioFrontier(Data, Spec, "minsumW[1:22]=2")
> frontier = portfolioFrontier(Data, Spec, "minsumW[1:22]=0.1")
> 
> The last two calls give back no portfolio. I wonder why? Is it no possible
> to be leveraged/under invested?
> 
> I can't find anything of that sort on the unit tests either.
> 
> Cheers,
> 
> // Giuseppe



More information about the R-SIG-Finance mailing list