[GSoC-PortA] mixed integer constraints

Ross Bennett rossbennett34 at gmail.com
Fri Jul 12 21:22:31 CEST 2013


Round Lot Constraints
Just thinking through out loud how to incorporate this into fn_map. The sum
of portfolio weights would still sum to near 1 for a full investment
constraint. We would need a user input value of total wealth to calculate
the lots.
The constraint could be specified with something like:
add.constraint(portfolio, type="round_lot", total_wealth=1500000)

# randomly generate some weights
set.seed(123)
tmp <- runif(5)
w <- tmp/sum(tmp)

total_wealth <- 1200000

# round the lot values to the nearest integer
lots <- round(w * total_wealth, 0)

# calculate the new weights
new_w <- lots/sum(lots)

Am I on the right track for the round lot constraints?

Cardinality Constraints
I thought I had a good handle on cardinality constraints to set a limit on
the maximum number of positions. This is implemented in random_portfolios
by using fn_map and specifying max_pos as a position limit constraint. This
is also currently working with DEoptim by using the optional function
argument fnMap=fn_map. This is not doable with quadprog. This is supported
in rglpk. I suppose we can use the fn_map function for the other solvers,
pso and GenSA. Am I missing a different application of cardinality
constraint?

P.S. Enjoy your trip to Alaska!

Regards,
Ross


On Fri, Jul 12, 2013 at 10:49 AM, Brian G. Peterson <brian at braverock.com>wrote:

> On 07/12/2013 10:30 AM, Brian G. Peterson wrote:
>
>> I just realized that we haven't done any work on mixed integer
>> constraints, forcing weights to be round numbers.
>>
>> Trivial to do in fn_map, and supported by a handful of optimization
>> solvers, but I didn't want to forget it.
>>
>
> I suppose the other one to look at in this vein is cardinality constraints.
>
> --
> Brian
>
> ______________________________**_________________
> GSoC-PortA mailing list
> GSoC-PortA at lists.r-forge.r-**project.org<GSoC-PortA at lists.r-forge.r-project.org>
> http://lists.r-forge.r-**project.org/cgi-bin/mailman/**listinfo/gsoc-porta<http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/gsoc-porta/attachments/20130712/08d95fe4/attachment.html>


More information about the GSoC-PortA mailing list