[R-SIG-Finance] fPortfolio and leverage
Brian G. Peterson
brian at braverock.com
Thu Aug 21 17:16:25 CEST 2008
The Chekhlov, Uryasev, and Zabarankin paper you reference can be found here:
http://www.ise.ufl.edu/uryasev/drawdown.pdf
for anyone else who is playing along.
Note how on page 8 of the paper, which you quote, they set limits on the
total weight range to develop a particular leverage model, but not on
the alpha or performance of the model.
So, to your original example:
# Load Data and Convert to timeSeries Object:
Data = as.timeSeries(data(smallcap.ts))
Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
# Set Default Specifications:
Spec = portfolioSpec()
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 not possible to be leveraged/under invested?
This suggests that you should remove your setTargetAlpha constraint, and
see what the optimizer does only with constraints of maxsumW[1:22]=2
*and* minsumW[1:22]=0.1, which I believe can be specified in your
portfolioSpec() call.
Regards,
- Brian
giuseppe1.milicia at hsbcib.com wrote:
> Brian,
>
> You are right. But I was thinking of a slighly different setup for the
> problem. Say you want to leverage at different levels for each of the
> assets, with only a global risk target as goal. I thought that the easiest
> way out was to leave that to the portfolio optimizer. My assets are not
> equities and I assume they are traded on margin.
>
> I believe that approach was taken, for instance, in "Portfolio optimization
> with drawdown constraints" Checkhlov, Uryasec and Zabrankin.
>
> From the paper:
>
> "As for the technological constraints (8), we chose x_min = 0.2 and x_max
> =0.8 . This choice was
> dictated by the need to have the resultant margin-to-equity ratio in the
> account within admissible
> bounds, which are specific for a particular portfolio. In this futures
> trading setup, these
> constraints are analogous to the “fully-invested” condition from classical
> Sharpe-Markowitz
> theory. They define bounds on the leverage of the strategy and make an
> efficient frontier to be
> concave. If all positions are equal to the lower bound 0.2, then the sum of
> the positions equals
> 0.2 ×32 = 6.4 and the minimal leverage equals 6.4. However, if all
> positions are equal to the
> upper bound 0.8, then the sum of the positions equals 0.8× 32 = 25.6 and
> the maximal leverage
> equals 25.6. The optimal allocation of weights picks both the optimal
> leverage and proportions
> between instruments."
>
> Cheers,
>
> // Giuseppe
>> Brian G. Peterson wrote:
>> 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.
<...>
More information about the R-SIG-Finance
mailing list