The markets tend to rise on expectations of better things to come. The election of Trump was exactly that - a signal of better things to come.
Candidate A: "I'm going to crush business with burdensome regulations and punitive taxation"
Candidate B: "I'm going to eliminate burdens, foster business growth wherever possible, cut taxes, create jobs"
When Candidate B is elected, the market rises in anticipation of the better environment.
Some of a president's policies last much longer than his term(s). The $10T increased debt is going to crush spending on virtually everything (the debt payments are projected to soon be the 2nd largest spending item in the entire budget). That's not getting paid down without a lot of deep spending cuts.
Obama's legacy is also the "
new normal." Modest employment gains (sub 300,000 per month), sluggish GDP growth (sub 2%), increases in Food Stamps and other programs to help easy the pain caused by his economic policies.
There is also the long lasting effect of a generation (millennials) who lost nearly a decade of productive employment, home ownership and wealth creating opportunities stifled by living in their parents' basements.
The GDP part is pretty interesting. If you look at GDP growth WITHOUT the borrowing, Obama's was negative and W's was positive.
To illustrate, if the economy grew from $1T to $1.2T, but you borrowed $1T, it's a net effective loss of $800B. The $1T you borrowed got spent on goods and services worth $1T. If the economy grew from $1T to $2T and you borrowed $400B, it's a net effective gain of $600B.