!Keywords: Downside Risk / Financial / Markowitz / Portfolio / Risk Free Asset / Stocks;
! The Markowitz model with a risk free asset
! PBUD and PRET are the dual prices or LaGrange multipliers
! on the BUDGET and RETURN constraints;
! The MIN row simply gives the order of the variables;
 MIN ATT + GMC + USX + TBILL + PBUD + PRET
ST
! The first order conditions, essentially,
!     2 * COV * X + PBUD + Return * X;
 FATT) .0216150 ATT + .0248144 GMC + .0261502 USX
       + PBUD - 1.089083 PRET >= 0
 FGMC) .0248144 ATT + .1167834 GMC + .1108528 USX
       + PBUD - 1.213667 PRET >= 0
 FUSX) .0261502 ATT + .1108528 GMC + .1884536 USX
       + PBUD - 1.234583 PRET >= 0
 FTBILL)   PBUD - 1.05 PRET >= 0
! The actual constraints;
! The Budget constraint;
  BUD) ATT + GMC + USX + TBILL = 1
! The target Return constraint;
  RET) 1.089083 ATT + 1.213667 GMC + 1.234583 USX 
       + 1.05 TBILL >= 1.15
END
! Tell LINDO that this is a quadratic problem with
!  first real constraint being row 6;
QCP 6