Well, this isn’t really specifically about Obama. It is about whether the economy does better under Democratic presidents rather than Republican presidents. The answer is that the economy does do better under Democratic leadership rather than Republican leadership. Why? I don’t know. I think there are many factors and sometimes the presidents get caught by a bad situation or get helped by a good one. However, since they are in the office, they get the credit or blame.
Even Donald Trump said so on camera!!! (He does say he doesn’t know why.)
But if you don’t believe Trump, you can look at people who have collated the data:
From USNews.com, Which Presidents Have Been Best for the Economy?
From PoliticsThatWork.com, Which Party is Better for the Economy?
For some caveats or balance:
From Princeton University, Presidents and the US Economy: An Econometric Exploration
From Politifact, Does the economy always do better under Democratic presidents?