Video Of Day

Breaking News

Presentation At Mmt Conference

I volition endure doing a presentation at the First International Conference of Modern Monetary Theory inward Kansas City inward September 2017 (conference dates are September 21-24, website: http://www.mmtconference.org/). I volition endure presenting an introduction to my Python stock-flow consistent models packet -- sfc_models. This article is a stone oil draft of what I holler back the slides volition aspect like.

Big Picture versus Small Picture


(This department would non endure inward the presentation!)

My reading of the objective of the conference is that the wishing is to encompass the large moving painting questions: what's adjacent for MMT? My presentation is fairly deliberately "small picture," a minor flake of incremental inquiry that needs to endure done, which presumably fits into larger plans.

If I were pressed nigh what I holler back nigh the large picture, I believe that 1 needs to holler back nigh what one's objectives are.
  • Political/economic reform. The Job Guarantee existence the chief candidate; could endure others, depending upon the country. Given the lack of a Blue Planet authorities (with apologies to whatever conspiracy theorist readers), whatever reforms depend upon one's political context. My preferred political strategy is to emulate the historical Canadian Prairie Populists; whether that strategy would piece of work anywhere inward 2017 is an opened upward question. In whatever event, the telephone substitution to implementation is the formation of a feasible political coalition, too the nature of coalition edifice depends on the province or  region's political makeup.
  • Reformation of economics. From my cynical outsider perspective, the improvement of the economic science used yesteryear institutions volition endure the termination of developments exterior of academia. Obviously MMT too post-Keynesian academics are of import for pushing the theoretical agenda, but institutions volition rest captured yesteryear "mainstream" economists. The political facts on the set down require to change, at which betoken the institutions volition in 1 lawsuit to a greater extent than blow amongst the wind. (In other words, no theoretical refutation of mainstream economic science is going to modify anyone's behaviour.)
(Now: dorsum to the draft of the presentation.)

What is sfc_models?

  • sfc_models is a Python packet for edifice stock-flow consistent (SFC) models.
  • It is an opened upward source package; at the fourth dimension of writing, amongst myself every bit the sole contributor to the package.
  • Available at GitHub: https://github.com/brianr747/SFC_models/. Also every bit a Python packet at the Python Package Repository.
  • The approach is believed to endure novel: the user specifies the model construction amongst a relatively minor amount of Python code, too the framework builds upward the implied equations, too and then solves them.
  • At present, solely limited economical functionality. The objective was to construct a corporation base of operations to which it slow to add together novel behaviour.  

Advantages of sfc_models

  • Free! As an opened upward source package, the user is gratuitous to do whatever they wishing amongst the source code, so long every bit they obey the opened upward source licensing rules (Apache). (The Python linguistic communication is also opened upward source.)  You would solely require to consult your intellectual belongings lawyer if y'all desire to seek to utilization the packet inward commercial software (I believe).
  • Transparancy. All of the solution steps too equations are visible to the user, which allows them to validate output earlier using.
  • Burden reduction. The seat out of equations inward SFC models is frequently excessive; since they are generated yesteryear the framework, at that spot is no adventure of a transcription mistake that tin occur if transferring hand-derived equations to a solver.
  • Flexibility. The pattern of the organisation makes it slow to add together novel behaviour.
  • Adaptability. Python is a scripting language, too was designed to larn inward slow to interact amongst other languages.
  • Collaboration. GitHub makes collaboration easy.
  • No Math! Models tin endure examined without whatever require to delve into the mathematics.
  • Robustness. Python programming tools larn inward slow to validate that the framework is ever generating the expected output.
  • Friendly (in the future...).  Creation of a graphical "economic model builder" appears straightforward.

Relation To MMT?

  • Outside of academia, at that spot are many people interested inward developing uncomplicated models of the economy. Models built inside sfc_models can endure easily shared to the wider community -- or the model output.
  • Extends the might of researchers to create pedagogy models that tin endure seat inward the hands of the broader MMT community.
  • Can illustrate concrete economical principles using economical fourth dimension series, which is to a greater extent than familiar than looking at residuum sheets.
  • Can endure used yesteryear researchers to help the evolution of to a greater extent than complex inquiry models.
  • Provides a compressed way of sharing models safely.
  • Helps reply to the criticism "MMT has no equations!"
The ease of the presentation discusses how the packet operates, but these objectives should endure kept inward mind.

Example of Easier Presentation

Randomly chosen scenario figure generated yesteryear sfc_models.

  • It is a lot easier to give full general readers a nautical chart similar this to illustrate what happens based on a scenario rather hitting them amongst a wall of equations. The wages of scenario-based analysis similar this when compared to showing historical information is that using historical examples runs into readers' preconceptions nigh those historical scenarios.
  • In academic contexts, readers (allegedly) desire the wall of equations. This tin endure exported from sfc_models every bit needed.
  • If readers desire to dig farther into the scenarios, they tin run the model too examine the output for themselves.


Object-Oriented Programming

  • The might of the sfc_models packet is the termination of the utilization of object-oriented programming.
  • Rather than working amongst functions/subroutines, the user creates "objects" which bundle together information too functions.
  • For example, the user creates diverse Sector objects that stand upward for sectors of the economy, too insert them into a Country object. Changing the sector objects that are inserted changes the demeanour of the model.
  • New economical demeanour is unremarkably implemented yesteryear creating a novel degree of objects that stimulate got been modified from existing objects.
  • This makes it slow for the community to add together functionality; they only delve into edifice out the demeanour of 1 sector, too no require to worry how the overall framework operates.

sfc_models Workflow

The code using sfc_models volition unremarkably follow this pattern.
  • Initialisation code.
  • Create an economical model object.
  • Insert 1 or to a greater extent than Country objects into the model.
  • Insert multiple Sector objects into each country,  and specify relationships betwixt them.
  • (In a multi-country model, laid upward the unusual substitution regime.)
  • Bind the model. This measurement generates the implied equations, too and then the framework attempts to solve the equations.
  • Either examine the output inward text files, or plot the calculated fourth dimension series.

Example: Model SIM (Godley & Lavoie)



from sfc_models.objects import *
from sfc_models.examples.Quick2DPlot import Quick2DPlot

def main():
    # The adjacent business of code sets the elevate of the output files based on the code file's name.
    # This agency that if y'all glue this code into a novel file, larn a novel log name.
    register_standard_logs('output', __file__)
    # Create model, which holds all entities
    modern = Model()
    mod.EquationSolver.TraceStep = 10
    # Create get-go province - Canada. (This model solely has 1 country.)
    tin = Country(mod, 'CA', 'Canada')
    # Create sectors
    gov = ConsolidatedGovernment(can, 'GOV', 'Government')
    hh = Household(can, 'HH', 'Household')
    # Influenza A virus subtype H5N1 literally non-profit concern sector
    omnibus = FixedMarginBusiness(can, 'BUS', 'Business Sector')
    # Create the linkages betwixt sectors - taxation flow, markets - labour ('LAB'), goods ('GOOD')
    taxation = TaxFlow(can, 'TF', 'TaxFlow', .2)
    labour = Market(can, 'LAB', 'Labour market')
    goods = Market(can, 'GOOD', 'Goods market')
    # Need to laid the exogenous variable - Government demand for Goods ("G" inward economist symbology)
    mod.AddExogenous('GOV', 'DEM_GOOD', '[0.,]*5 + [20.,] * 105')
    # Build the model
    mod.main()
    CUT = 30
    k = mod.GetTimeSeries('k', cutoff=CUT)
    goods_produced = mod.GetTimeSeries('BUS__SUP_GOOD', cutoff=CUT)
    Quick2DPlot(k, goods_produced, 'Goods Produced (National Output)')

if __name__ == '__main__':
    main()

sfc_gui: Influenza A virus subtype H5N1 Simple Graphical Interface

  • I stimulate got also developed sfc_gui, which provide a graphical interface for model running.
  • It runs the model, too allows y'all to encounter equations generated, too persuasion the output fourth dimension series.
  • Aimed at model development.
  • Code is at a "use at ain risk" criterion at present.

Comparison to Existing Packages

  • These comments are based on a real limited exam of other packages. (I may whorl upward my sleeves ahead of the conference too expand this...)
  • The R linguistic communication SFC models packet maintained yesteryear Antoine Godin at https://github.com/S120/PKSFC. This packet takes inward equations that are supplied yesteryear the user, too plant amongst them. It would endure possible for sfc_models to generate output that tin endure used yesteryear the R packet (and thence leverage the existing R code).
  • The Minsky package, designed yesteryear Steve Keen. Link:  http://www.debtdeflation.com/blogs/minsky/. The Minsky packet has a lot of features that overlap amongst sfc_models, such every bit ease of use, too automated equation generation. One telephone substitution divergence is that sfc_models is discrete time, piece Minsky appears to endure continuous time.  This fourth dimension scale divergence agency that it would endure extremely hard to interact amongst the Minsky code.

Equation Creation

  • Equations are ultimately text strings of the form:
    [VARIABLE] = [Text right manus side that is a Python string to endure evaluated.].
  • For example,
    DEM_GOODS = 0.7 * DISPOSABLE_INCOME
    {Variable names inward the framework are clunkier.}
  • Equations are built upward every bit damage are added to equations.
  • In companionship to permit algorithmic equation generation, at that spot is a large seat out of redundant equations. These are pruned earlier solving.
  • Limits the potential cast of equations; volition hash out inward floating currency section.

State of the Package

  • Calibrated against a alternative of models from Godley too Lavoie's Monetary Economics.
  • Known model outputs (generated yesteryear the Eviews software package) are used inward "unit tests" to ensure that the framework generates the right solution to these models.
  • Covers the simplified expectations (SIMEX), portfolio allotment (model PC), too fixed currency regimes. 
  • Introductory majority inward preparation (finished yesteryear conference?).

Floating Currency Models

The work amongst floating currency models is that nosotros desire to specify the supply/demand human relationship inside the currency marketplace as:
  • Demand for Currency = f(currency level, other variables);
  • Supply of Currency = g(currency level, other variables);
  • Demand for Currency = Supply of Currency.
This breaks the equation construction employed; nosotros are somehow attempting to assign 2 unlike right-hand sides to the same variable.

The solution is to process the supply/demand equations inward a especial manner; nosotros iterate on the currency storey until the supply/demand variables equal each other. I stimulate got non looked at the literature...

Once implemented, it volition endure slow to do "contrast too compare" exercises of floating versus fixed policy infinite (explaining the MMT preferences regarding floating currency).

sfc_models And the Community

  • Being able to generate fourth dimension serial for pedagogy models is a much to a greater extent than attractive way of presenting macro logic than presenting equations inward an informal environment. (Economic textbooks volition differ.)
  • Can supplement residuum canvass analysis.
  • Easy to acquaint results (in charts), too readers tin examine the total model simulation information at their leisure.
  • Replaces the require to derive the authorities spending multiplier human relationship inward spider web log posts.
  • Provides a venue for those amongst programming/technical skills to participate.

Aside: Mathematics inward Economics

  • Although my academic grooming is inward the analysis of mathematical models, I am skeptical nigh their utilization inward economic science (outside of pedagogy models).
  • Based on what I telephone yell upward the "Forecasting Futility Conjecture." The declaration is that if nosotros stimulate got a realistic macro model, nosotros tin demo that nosotros cannot realistically await to forecast model outcomes.
  • Key driver: fixed investment is a source of profits, too investment is predicated on the outlook for profits.
  • My interpretation of parts of Keynes' General Theory. Seems similar to post-Keynesian theory; perhaps expressed differently.

Next Steps

  • Find collaborators.
  • Business bike models.
  • Floating currency models.
Questions?

(c) Brian Romanchuk 2017

No comments