[GSoC-PortA] mixed integer constraints

Doug Martin martinrd at comcast.net
Fri Jul 12 21:39:11 CEST 2013


Because solve.QP does not have MIP but Rglpk_solve_LP does, my plan has been
to use the latter for illustrating MIP (unless we find a good QP solver that
does MIP and integrate it, which seems unlikely in the near term).

 

Doug

 

P.S.  I have a project started to do a careful comparison of global minimum
variance portfolios and global minimum ETL portfolios, with a focus on the
impact of their different sources of estimation error (covariance matrix in
the former and ETL in the latter, which are not directly comparable).  In
large samples they both give the same results for normally distributed asset
returns, so their finite sample differences arise from their estimation
errors differences (large dimensions produce more covariance estimation
error and small tail probabilities produce more ETL estimation error).  

 

 

From: gsoc-porta-bounces at lists.r-forge.r-project.org
[mailto:gsoc-porta-bounces at lists.r-forge.r-project.org] On Behalf Of Ross
Bennett
Sent: Friday, July 12, 2013 12:23 PM
To: PortfolioAnalytics
Subject: Re: [GSoC-PortA] mixed integer constraints

 

 

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
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/17d619ec/attachment-0001.html>


More information about the GSoC-PortA mailing list