One would also have to account for the lag in any policy executed and note the market is a discounting mechanism. Are the gains made with Democrat as president b/c the market foresee improvements coming down the line and do policy effected under Republican presidency come into effect when Democrats take over, etc. In addition, the President is there to execute the laws and not to legislate them.