Posted by
Hurd, Matthew on
Sep 07, 2004; 5:56pm
URL: http://quantlib.414.s1.nabble.com/random-generation-of-constrained-portfolio-allocation-weights-tp3309p3318.html
> -----Original Message-----
> From:
[hidden email]
[mailto:quantlib-users-
>
[hidden email]] On Behalf Of ML
> Sent: Tuesday, 7 September 2004 8:58 PM
> To:
[hidden email]
> Subject: [Quantlib-users] RE: random generation of constrained
portfolio
> allocation weights
>
> > I need to generate random weights for a
> > portfolio allocation, with max constraints
> > on the weights, no short sale allowed (e.g.
> > 3 assets, each one in the [0%, 40%] range)
>
> Generally you have 2N+1 inequalities:
>
> 0 <= x_i, i=1..N
> x_i <= M_i, i=1..N
> Sum[x_i, {i,1,N}] = 1
>
> These inequalities define 2N+1 hyperplanes in the N-dimensional space.
The
> volume enclosed by these hyperplanes is called a polytope (polygone in
the
> planar case N=2).
>
> Generating uniformly distributed random numbers on a multidimensional
polytope
> is a rather difficult problem. See for instance
>
http://citeseer.ist.psu.edu/leydold98sweepplane.html>
> If there is interest, I'm happy to work on this issue and eventually
> contribute a good algorithm. For the time being, however, I guess the
> rejection method is a moderately good solution.
>
> -Mario
>
Intuitively you can see why as the final measure is likely to be a
biased number as it has to fit into the initial choices. A simple way
of improving the randomness is to shuffle the tuple, i.e. randomly
select the axes to constrain, before allocating the weights. That way
the bias is randomly distributed and hopefully a little nicer.
Regards,
Matt Hurd.
_________________
Matt Hurd
+61.2.8226.5029
[hidden email]
Susquehanna
_________________
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.