DENVER, Feb. 17 — Warning that its passage into law “does not mark the end of our economic troubles,” President Obama on Tuesday signed the $787 billion stimulus package, a measure he called the most sweeping financial legislation enacted in the nation’s history.