ANOVA on stock market data I am doing an assignment comparing the returns of “green” stocks versus “non-green” stocks over a 10 year period - so 20 portfolios of stocks.
A stock’s “greenness” can change from one year to next, so portfolios are readjusted 
Example Stock A rating could change from 2007 to 2008 so that it could be in both “Non Green 2007” and in  “Green 2008”
Can I use ANOVA in this case, or is there an issue with independence of observations ? 
What would be a better to use for the analysis instead of ANOVA ?
 A: The assumptions of standard ANOVA are strongly violated by stocks.  There has been a significant debate since 1962 on whether stocks have a mean and a variance or not.  I am about to submit a proof for publication to end the debate that they cannot have a mean or a variance.  Regardless, even if you consider the debate unsettled, its very existence implies that the assumptions could be so badly violated that you should not use standard ANOVA anyway.
From the way that I am interpreting your question, the best choice would be the Kruskal-Wallis ANOVA. I would not use the Wikipedia entry, I would grab a book on nonparametric and distribution-free statistics from your library.  I don't think there is anything wrong with the Wiki entry, but I didn't want to verify it either.  Peter Sprent offers a good book on the topic.
The scale parameter for stocks is quite stable over the span 1925-2013 so you should have no issues about changing scales in the data.  There is no reason to believe that the distributions differ in anything other than the medians.
You take the data and rank the results.  If you have five data points and the middle three are tied then you would have ranks of $\{1,3,3,3,5\}$.  If ranks one and two were tied then your set would be $\{1.5,1.5,3,4,5\}$.  You want to set ties up like that because other assignment methods for ties could inflate the perceived variability.  You are really performing analysis of variance on the ranked data rather than the raw data.
It is a comparison of the mean ranks, which maps to the sample medians.  If you also assume the scale parameters are equal, which is reasonable in this case, then if the null hypothesis is rejected then your alternative hypothesis would become that one group of stocks have returns that first order stochastically dominates the second group of stocks.
This would be a very strong finding and as such, you would then do a more definitive Bayesian test on both the mode of returns and the scale of returns.  Because of the type of distribution involved, there is not a non-Bayesian solution to this question.  This would go beyond most undergraduate courses in statistics.
