The Human Relationship Betwixt Sfc_Models As Well As Godley As Well As Lavoie
The text Monetary Economics: An Integrated Approach to Credit, Money, Income, Production in addition to Wealth, past times Wynne Godley in addition to Marc Lavoie is cited heavily inside the sfc_models framework. This text is a measure text for SFC modelling, in addition to has already been the object of extensive modelling. The fact that the models are good known is extremely useful from the betoken of persuasion of development. These existing models were used to calibrate the sfc_models code.
(This article is an unedited draft of a department from my upcoming majority "Introduction to SFC Models amongst Python.")
Users who wishing to implement guide the models from Monetary Economics tin produce in addition to therefore past times using the code inward the sfc_models.gl_book sub-package. There are modules inside the gl_book parcel that stand upwardly for to the chapters of the book. (In approximately cases, in that place are multiple models inside each chapter.) At the fourth dimension of writing, the coverage of models is quite selective, only to a greater extent than may hold upwardly added over time. Examples of this guide object creation are given later. However, the user may examine the rootage code for the chapter modules to come across the operations to create the models directly. In particular, if yous wishing to experiment amongst the models, it would hold upwardly best to create the models past times copying the rootage code. The code inward the gl_book sub-package is designed to emulate the models inward the majority exactly, every bit this is needed for calibration.
This calibration endeavor may hold upwardly invisible to close users of the sfc_models package, only it is a fundamental argue why the parcel should hold upwardly a stable programming environment. As discussed inward <another department of the book>, Python has well-developed unit of measurement testing capabilities. Other than approximately areas of code that inherently cannot hold upwardly tested – in addition to are explicitly marked every bit such – the objective is that 100% of the lines of code are exercised inward tests. These unit of measurement tests telephone phone functions in addition to methods, in addition to ensure that the output matches expectations.
Code that is designed to hold upwardly unit of measurement tested needs to hold upwardly broken into pocket-sized blocks; spaghetti code has to hold upwardly avoided. Each of the pocket-sized components is tested separately, in addition to therefore that changes to ane block produce non intermission hundreds of tests because of a desired modify of behaviour.
The peril amongst testing of this nature is that nosotros are focused on testing pocket-sized parts, in addition to it may hold upwardly possible that changes volition intermission the code inward unexpected ways due to unforeseen interactions. Therefore, nosotros demand to augment smaller unit of measurement tests amongst end-to-end tests. These end-to-end tests produce large operations, only entirely examine the in conclusion results; implementation details are allowed to stay flexible. For sfc_models, the model outputs from selected models from Monetary Economics were used every bit end-to-end tests. Since the models were implemented elsewhere already, the target output information (based on fixed inputs) were already available. It was possible to exercise these target information to ensure that the models generated past times sfc_models matched the existing results.
It would convey been possible for me to prepare the parcel to generate models that behaved differently. However, such models would hold upwardly non-standard, in addition to ane of the starting fourth dimension things users would want is to hold upwardly able to emulate the models inward Monetary Economics. Rather than start from an unorthodox position, I instead decided to hold upwardly able to emulate the existing structures inward Monetary Economics perfectly, in addition to leave of absence the undertaking of creating novel types of models every bit futurity extensions nether the command of users.
One deviation betwixt the sfc_models framework in addition to that of Godley in addition to Lavoie is the equation structure. Since the sfc_models equations are generated algorithmically, they needed to hold upwardly laid upwardly inward a generic fashion that allows the algorithms to create connections betwixt sectors inward a flexible manner. As a result, the initial laid of equations generated by sfc_models features many redundant equations (that are pruned past times the solver). This destroys approximately of the mathematical elegance.
Influenza A virus subtype H5N1 mo deviation is cosmetic: variables in sfc_models are based on an algorithmic scheme based on long text strings, spell Godley in addition to Lavoie exercise measure variable names from economics, using mathematical musical note amongst subscripts. Therefore, the user needs to “translate” variable names when comparison results.
The in conclusion deviation is a limitation of the sfc_models framework: in that place is no machinery to generate the transaction matrices that are a prominent characteristic of Monetary Economics. It may hold upwardly possible to infer such matrices from the economical model structure, only the feasibility of that measuring has non all the same been examined.
(c) Brian Romanchuk 2017
(This article is an unedited draft of a department from my upcoming majority "Introduction to SFC Models amongst Python.")
Users who wishing to implement guide the models from Monetary Economics tin produce in addition to therefore past times using the code inward the sfc_models.gl_book sub-package. There are modules inside the gl_book parcel that stand upwardly for to the chapters of the book. (In approximately cases, in that place are multiple models inside each chapter.) At the fourth dimension of writing, the coverage of models is quite selective, only to a greater extent than may hold upwardly added over time. Examples of this guide object creation are given later. However, the user may examine the rootage code for the chapter modules to come across the operations to create the models directly. In particular, if yous wishing to experiment amongst the models, it would hold upwardly best to create the models past times copying the rootage code. The code inward the gl_book sub-package is designed to emulate the models inward the majority exactly, every bit this is needed for calibration.
This calibration endeavor may hold upwardly invisible to close users of the sfc_models package, only it is a fundamental argue why the parcel should hold upwardly a stable programming environment. As discussed inward <another department of the book>, Python has well-developed unit of measurement testing capabilities. Other than approximately areas of code that inherently cannot hold upwardly tested – in addition to are explicitly marked every bit such – the objective is that 100% of the lines of code are exercised inward tests. These unit of measurement tests telephone phone functions in addition to methods, in addition to ensure that the output matches expectations.
Code that is designed to hold upwardly unit of measurement tested needs to hold upwardly broken into pocket-sized blocks; spaghetti code has to hold upwardly avoided. Each of the pocket-sized components is tested separately, in addition to therefore that changes to ane block produce non intermission hundreds of tests because of a desired modify of behaviour.
The peril amongst testing of this nature is that nosotros are focused on testing pocket-sized parts, in addition to it may hold upwardly possible that changes volition intermission the code inward unexpected ways due to unforeseen interactions. Therefore, nosotros demand to augment smaller unit of measurement tests amongst end-to-end tests. These end-to-end tests produce large operations, only entirely examine the in conclusion results; implementation details are allowed to stay flexible. For sfc_models, the model outputs from selected models from Monetary Economics were used every bit end-to-end tests. Since the models were implemented elsewhere already, the target output information (based on fixed inputs) were already available. It was possible to exercise these target information to ensure that the models generated past times sfc_models matched the existing results.
It would convey been possible for me to prepare the parcel to generate models that behaved differently. However, such models would hold upwardly non-standard, in addition to ane of the starting fourth dimension things users would want is to hold upwardly able to emulate the models inward Monetary Economics. Rather than start from an unorthodox position, I instead decided to hold upwardly able to emulate the existing structures inward Monetary Economics perfectly, in addition to leave of absence the undertaking of creating novel types of models every bit futurity extensions nether the command of users.
One deviation betwixt the sfc_models framework in addition to that of Godley in addition to Lavoie is the equation structure. Since the sfc_models equations are generated algorithmically, they needed to hold upwardly laid upwardly inward a generic fashion that allows the algorithms to create connections betwixt sectors inward a flexible manner. As a result, the initial laid of equations generated by sfc_models features many redundant equations (that are pruned past times the solver). This destroys approximately of the mathematical elegance.
Influenza A virus subtype H5N1 mo deviation is cosmetic: variables in sfc_models are based on an algorithmic scheme based on long text strings, spell Godley in addition to Lavoie exercise measure variable names from economics, using mathematical musical note amongst subscripts. Therefore, the user needs to “translate” variable names when comparison results.
The in conclusion deviation is a limitation of the sfc_models framework: in that place is no machinery to generate the transaction matrices that are a prominent characteristic of Monetary Economics. It may hold upwardly possible to infer such matrices from the economical model structure, only the feasibility of that measuring has non all the same been examined.
(c) Brian Romanchuk 2017
No comments