! Style Analysis of a Fund Portfolio;
! Can the performance of a fund be explained as a simple
 weighted average of a small number of indices?
 If a fund claims to mimic a given index, then the
 weight assigned to that index should be close to 1;
!Keywords: Portfolio selection, Style analysis, Matching portfolio;
SETS:
 PORTF: wgt;
 OBS: wgf, errup, errdn;
 OXP( OBS, PORTF): GF;
ENDSETS
DATA: ! Last item is the fund whose style we want to analyze; PORTF = LG LV SG SV CASH FUND; GF= 1.0214 1.0466 1.0216 1.0249 1.01 1.0254 0.9821 0.9638 0.9967 0.9977 1.01 0.9825 0.9538 0.9589 0.9258 0.9469 1.01 0.9671 1.0045 1.0211 0.9974 1.0148 1.01 1.0222 1.0163 1.0166 0.9735 0.9868 1.01 1.0217 0.9787 0.9723 0.9492 0.975 1.01 0.9938 1.0319 1.0338 1.0094 1.0159 1.01 1.0281 1.0534 1.0283 1.0824 1.0522 1.01 1.042 0.9857 0.9648 1.0055 0.985 1.01 0.9985 1.0233 1.0218 1.0041 0.9747 1.01 1.0063 0.9672 0.9595 0.9603 0.9641 1.01 0.952 1.0173 1.0123 1.0271 1.0208 1.01 1.0119 1.0248 1.0271 0.9743 0.9975 1.01 1.0158; ENDDATA NP = @SIZE( PORTF); ! Index of the fund to analyze; MIN = @SUM( OBS(i): (errup(i)+errdn(i))^2); @FOR( OBS(i): wgf(i) = @SUM( PORTF(j) | j #NE# NP: wgt(j)*GF(i,j)); errup(i) - errdn(i) = GF(i,NP)- wgf(i); ); ! Weights must sum to 1; @SUM( PORTF(j) | j #NE# NP: wgt(j)) = 1;