So what i'm guessing your leading to is something dealing with being realistic, while what i'm leading to, the position where I stand from, idealism.
Logically, whether your optimistic or pessimistic they both are subcategories of the larger category which is called attitude. Your attitude affects your behavior. An optimistic attitude would lead one to have increase positive behavior in their life, and a pessimitic one...with negative behavior.
So it pays to be both realistic (present) and idealistic (future) with an optimistic attitude that things will change for the better. Attitude influences your behaviors which influence your thoughts which influences your actions which influences your attitude which influences your behav....................
With that said, their needs to be both optimism (hope, ideals, vision) and pessimism (suspicion, scrutiny of information, questioning of authority figures, etc). But what you lend your optimism and pessimism to needs to be personally and judiciously allocated to the right arenas in your life.