File:Godley-lavoie-chapter-3-sfc-model-plot.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file (SVG file, nominally 619 × 499 pixels, file size: 78 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
English: Plot of model SIM from textbook Monetary Economics by Wynne Godley and Marc Lavoie, 2007. Initial and parameter values, see source code in python below.
Deutsch: Plot des Modells SIM aus dem Textbuch Monetary Economics von Wynne Godley und Marc Lavoie, 2007. Für Parameter und Anfangsbedingungen, siehe Quellcode in python unten.
Date
Source Own work
Author Sfcler
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

#!/usr/bin/env python

from pylab import array, plot, zeros, ones, arange, figure, NaN

tmax=50

alpha1=0.6; alpha2=0.25 # consumption parameters
theta =0.2 # tax rate

# define model SIM

H_time = zeros(tmax); H_time[0]=25
C_time = zeros(tmax); C_time[0]=NaN
G_time = ones(tmax) * 20
T_time = zeros(tmax); T_time[0]=NaN
Y_time = zeros(tmax); Y_time[0]=NaN
Yd_time = zeros(tmax); Yd_time[0]=NaN

for tstep in range(1,tmax):
    C_time[tstep] = (alpha2*H_time[tstep-1]+alpha1*G_time[tstep]*(1-theta))/(1.-alpha1*(1-theta))
    H_time[tstep] = H_time[tstep-1]+(1-theta)*G_time[tstep]-theta*C_time[tstep]
    Y_time[tstep] = C_time[tstep] + G_time[tstep]
    T_time[tstep] = theta * Y_time[tstep]
    Yd_time[tstep] = Y_time[tstep]-T_time[tstep]

# plot time evolution of stocks
fig1 = figure()
ax1 = fig1.add_subplot(111)
ax1.set_xlabel(r"$t$",fontsize=14)

ax1.plot(arange(tmax),H_time,'ok',label=r"$H_h = H_s$")
ax1.plot(arange(tmax),Y_time,'^m',label=r"$Y$")
ax1.plot(arange(tmax),Yd_time,'vw',label=r"$Y_d$")
ax1.plot(arange(tmax),C_time,'sb',label=r"$C$")
ax1.plot(arange(tmax),G_time,'<r',label=r"$G$")
ax1.plot(arange(tmax),T_time,'>y',label=r"$T$")

ax1.legend(loc="upper left", frameon=False).get_frame().set_facecolor('none')

fig1.savefig("godley-lavoie-chapter-3-sfc-model-plot.svg", bbox_inches = 'tight')

Plot generated using python (scipy, numpy, matplotlib). Source code: CC-0.

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current15:48, 12 January 2019Thumbnail for version as of 15:48, 12 January 2019619 × 499 (78 KB)Sfcler (talk | contribs)plot all variables
23:53, 10 January 2019Thumbnail for version as of 23:53, 10 January 2019619 × 499 (57 KB)Sfcler (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata