This is a book on stochastic dynamic macroeconomics from a Keynesian perpective. It shows that including Keynesian features in intertemporal models considerably contributes to resolve major puzzles arising in the context of the Dynamic General Equilibrium (DGE) model. It also demonstrates that including microeconomic intertemporal behavior of economic agents in macroeconomics is not inconsistent with Keynesian economics. Whereas the first two parts of the book are technically and empirically oriented by elaborating on solution and estimation methods to bring dynamic macroeconomic theory closer to the time series data, the part three of the book uses those tools and addresses major issues in contemporary dynamic macroeconomics. In pursuing those issues the book stresses--as in the New Keynesian literature--nominal and real rigidities. Yet, beyond the latter type of literature--and in contrast to the DGE model --the here presented modeling approach admits open ended dynamics and multiple equilibria, more realistic asset market features, nonclearing labor market, and explores the role of both demand and technology shocks on employment. Central for those results is a new methodological idea pertaining to adaptive optimization where agents can reoptimize once they have perceived and learned about market constraints. Overall, the book is self-contained by including the appropriate solution and estimation methods which brings the theory closer to the time series data. It contains a modern treatment of dynamic macroeconomics for first and second year graduate students.