suppose I have $N$ models, with returns $r_{n,t}$ over $1,...,T$ periods ($T>>N$). I want to find weights $w_n$ for model $n \in 1,...,N$ such the final model $p$, whose returns will be

$r_{p, t} = \sum_{n=1}^{N} w_n * r_{n, t}$

has the maximum number of positive days, i.e. I want to maximize

$\frac{\sum_{t=1}^{T} 1\{ r_{p,t} > 0\}}{T}$

Has can I solve this kind of optimization problem? Does it have a name? Are there any papers written about this?


1 Answer 1


I would solve it numerically. You are trying to solve for N variables, you'll want to specify appropriate (and realistic) constraints such that your optimization procedure converges.

  • $\begingroup$ I'm afraid I don't follow your statement "You are trying to solve for N variables, so you'll need N constraints, otherwise your optimization will be under or over-specified." As a simple example, consider the problem $\min_{x_1, x_2 \in R} x_1^2 + x_2^2$. Here we have a single objective function with $N = 2$ variables, and zero constraints. But the minimizer is clearly when $(x_1, x_2) = (0,0)$. I think OP is looking for a combinatorics solution here. $\endgroup$
    – user32416
    Sep 18, 2015 at 2:48
  • 1
    $\begingroup$ For the example you give, there is a unique solution. But for OP's problem, that may not be the case. $\endgroup$ Sep 18, 2015 at 2:53
  • $\begingroup$ I don't think the OP is asking for a unique solution. Moreover, there's no guarantee that a problem $\sup_{x \in X} g(x)$ has an unique optimizer unless there's some strong conditions on the set $X$ and the objective function $g$. That's nothing new from general nonlinear programming. In my previous example, I clearly used the fact that the objective function is strictly convex and that the variable choice set is also open and convex, and these conditions ensure unique solutions. So that's why I'm really confused about what you mean by "under or over-specified". $\endgroup$
    – user32416
    Sep 18, 2015 at 2:57
  • $\begingroup$ The comment about under or over-specification is a reference to the existence of a solution, or multiple solutions. I've updated the answer as it's not really relevant to the question. $\endgroup$ Sep 18, 2015 at 3:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.