What causes people to feel depressed without there being a problem? I have noticed that some people have lives that appear perfectly fine, yet they feel depressed. In my specific case the feeling typically  lasts for a few days and then magically disappears, only to reappear a couple of weeks later.


In the absence of a real problem (e.g., loss of a close friend, physical sickness, etc), what causes these periods of negative affect?
"Their lives are perfectly fine" is a hard to test thing. Hard to compare. How people feel and respond is deeply contextual.

However there are several potential reasons:


They may be 'wired' to feel stress or respond emotionally (i.e. Due to the way their brain has developed). 
A feeling of not being in control (This is often hard to perceive from outside and removed from concrete factors). The causes and triggers of this are varied and complex.
A physical response. e.g. Things like a sensitivity to Gluten can cause incredible changes to our emotions and physiology. Often this manifests in good and bad periods. 
Negativity can be a reflection of the context or surroundings. Those same people may appear positive in a different context.
Mental illness can manifest in uneven patterns. This spans from mild (common) to severe symptoms.