Maximization problem

I am supposed to choose a portfolio of 5 stocks, % daily gain in my portfolio is a. % daily gain in the S&P500 is b.

I need to maximize P where

P=E(d)-0.5Var(d)
and d=a-b

Can anybody try to solve the inequality for E(d)<0.5Var(d) in terms of a and b? Is it correct to approximate my summation of ai2 as an integral in this case? Cos my number of terms do not tend towards infinity but is fixed at 60 observations.

I am supposed to choose a portfolio of 5 stocks, % daily gain in my portfolio is a. % daily gain in the S&P500 is b.

I need to maximize P where

P=E(d)-0.5Var(d)
and d=a-b

Can anybody try to solve the inequality for E(d)<0.5Var(d) in terms of a and b? Is it correct to approximate my summation of ai2 as an integral in this case? Cos my number of terms do not tend towards infinity but is fixed at 60 observations.

Thanks again.

Off-hand I'd say that not much can be done without knowing anything about the distributions that a and b follow.