i am building a platform for portfolio analytics, part of which is a performance attribution module. Given that most individual portfolio's can never have the same number of stocks as say, a mutual fund, i was wondering how do i perform a stock weighting attribution for a portfolio. For instance if my portfolio had 6 stocks from 3 sectors (Energy , Utilities and Telecom) which have a split of 30-40-30 in my portfolio how do i compare it to the market weightage? These sectors have a weight of 8%, 3% and 2.4% in the S&P 500 ..i don't get anything by comparing 30-40-30 with 8-3-2.4 instantly ..but if i normalize 8-3-2.4 into 60-22-18 i can tell that my pf did better / worse because i was over/under weight one of the sectors. Can i use a normalized method for comparison ? most online sources and papers give a plain vanila approach assuming this can only be used by fund managers et al .. kindly correct me if i am wrong.