Alexis Montecinos (MIT) and I have worked in this book with he main goal to provide to students with the details of the main models that explain the business cycles from the point of view of the School of Real Business Cycles (RBC). Furthermore, we have tried to make whole math that involves each model, from the approach of the problem of maximization to the detail of the algebra involved in finding the steady state and the loglinearized equations. In addition, we attach detailed codes in Matlab and Dynare so that students can replicate without problems what is described in every chapter.
Book 1: Macrodynamics I (Real Business Cycles Models)
Class Notes  Link / Download 

IntroductionThe purpose of this book is to accompany the student in the stepbystep development of a DSGE (Dynamic Stochastic General Equilibrium) model. Not only from the technical and conceptual aspects but also in the simulation process of every model. 

Chapter 1: Overview of RBC modelsThe purpose of this chapter is to provide an overview of the development of the School of Real Economic Cycles (RBC) since its inception in the 1980s. The Matlab/Dynare codes are here. 

Chapter 2: Fundamentals of DynareThe purpose of this chapter is to understand the main Dynare commands that are used to perform each of the steps in the construction and simulation of a DSGE model. The Matlab/Dynare codes are here. 

Chapter 3: RBC model with analytical solutionThe goal of this chapter is to illustrate in depth each of the steps in the construction of an RBC model. The Matlab/Dynare codes are here. 

Chapter 4: RBC model with fixed workThe goal of this chapter is to understand the process of building and solution of RBC model. Furthermore, we describe the building of impulseresponse function and the simulation of variables. The Matlab/Dynare codes are here. 

Chapter 5: RBC model with variable laborThis chapter has two goals: the first is to extend the model of chapter four by considering that labor is variable. The second goal is to compare between the Long and Plosser model and Campbell model. The Matlab/Dynare codes are here. 

Chapter 6: RBC model with shock to investment and variable utilization of capitalThe goal of this chapter is to study effects of investment shock. For that, in this chapter we study two models: the first is Campbell's model with invesment shock, the second is the model of Greenwood et al (1988). The latter assumes that the utilization of capital is variable. The Matlab/Dynare codes are here. 

BookHere you can download the book. 