If the ending started out positive then it will be negative, if it started out negative then it will be positive.
Code Geass had a negative start, hence a positve ending.
Death Note had a positive start hence the negative ending. (Well for the protagonist anywhos.)
This is how it will be unless Sunrise is aiming to make the most depressing anime after The Grave of the Fireflies.