Mantel, Rolf R. with Juan C. Rego, Pedro Goyena, "Optimal Control Modeling with Vensim: Applications to Public Finance", 1994

Online content

Fullscreen
1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

Optimal Control Modeling with Vensim: Applications to Public Finance.

Rolf R Mantel Juan C Rego
University of San Andrés, Buenos Aires Fellow of the Nat. Council of Sc. and Tech.
Fellow of the Nat. Council of Sc. and Tech. Research, Argentina

Research, Argentina

Pedro Goyena
2561 (1640) Martinez
Buenos Aires, Argentina

Abstract

The purpose of this paper is to improve the results obtained by Fernandez and Mantel (1989),
referred to the price control i i in the lication of a ilization plan for Argentina's
hyperinflation in the Eighties. First, the model's correct translation is checked, by replication of the
original experiments. Secondly, an intuitive policy suggested by the shape of the original
experiments, that proposes a timely starting of the original price control policy is tested, achieving
better results. Finally, an optimization process, currently available in Vensim p penali

on the one hand, the oscillations which are shown by the path that the instantaneous inflation follows
to reach the equilibrium inflation rate; on the other hand, the slowness to reach that equilibrium point.
Vensim's advise nearly matches previous intuitive timing for starting to control prices.

System Dynamics : Methodological and Technical Issues, page 118

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

Optimal Control Modeling with Vensim: Applications to Public Finance
1. Introduction.

Nowadays the available software can force a simulated | system to follow trajectories that optimize

Vensim's tech abilities to op allow the ion of the effects
of i imposing optimal policies on endogenous processes. It is pertinent to experiment with the
tool, while analyzing the q for the tradi 1 style of experiments in

System Dynamics.
2. The model.

For the purpose announced in the introduction a small model is used, referred to the
ineffectiveness of price controls when it is required to stabilize inflationary processes (Fernandez
and Mantel, 1989). The model, built upon two state variables, the rate of inflation "x" and the
market interest rate "i", is highly non-linear. The present section presents a rigorous translation
of the original model into System Dynamics terms.

2.a. Government budget restriction.

The sources for financing the government deficit are real monetization, "dm/dt", that is to say
the rate of change of real money balances, "m", over time, "t", and the inflation tax. The deficit
includes besides the difference between expenditures and taxes the expenses incurred in servicing
the external debt, assumed to be constant. The international inflation rate is assumed to be zero,
whereas the rate of devaluation of the exchange rate equals the domestic inflation rate. The
service of the internal debt, "bxr", is included as a separate term to take into account the effect
of the real interest rate, "r". Also the action of ve "Olivera-Tanzi" effect, due to tax collection
lags, is explicitly casiared by the product "_xm" of the impact intensity "_" times the rate of
inflation "x". Note that in effect this reduces | the revenue from the inflation tax to "(m-_)xn"
due to the fiscal lags in tax collection. Equating the sources of financing to these concepts of the
deficit, one has the government's budget restriction

dm

7h —+mnr=dt+br+an qd)
at

2.b. The money market.

The model incorporates Cagan's hypothesis on the behavior of cash balances, according to which
during a hyperinflation. the change in the yield of money is the most important factor that
explains the amount of cash that people desire to hold (Cagan, 1956). The following equation 2
introduces the demand of real money balances as a function of the market interest rate. "i". It is a
behavioral equation, where "8" means the semi elasticity of demand of money with respect to
changes in nominal interest rate:

m=qeh @
In figure 1 the proposed static relationship between the market interest rate and real money
balances can be seen. The holdings of real money "m", meaning the currency plus current account
deposits "M1" as a fraction of GDP, falls exponentially as the nominal interest rate decreases.

System Dynamics : Methodological and Technical Issues, page 119

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

Fig. 1 Cagan's hypothesis

0 5 1 15 2
market interest rate (%/Month)

real money demand

‘Tue Mar 15, 1994 8:56AM

It would be ordinary System Dynamics' practice to model the real money supply "m" as a state
variable regulated by a controlling flow, as suggested by equation 1. The latter would be ruled by
the discrepancy between money demand and supply. However, as can be expected in
hyperinflationary circumstances, the money market clears almost instantaneously. Therefore,
instead of following that line of thought, the model merges both variables into a single variable
"m", omitting the corresponding loop. This variable represents not only the demand for real
money, "md", but also the stock of money holdings, "mS", to which the inflation tax rate "1" is
to be applied to compute the tax, "mx". The model assumes that the actual inflation rate is also
the expected rate. This reduces Fisher's equation for the arbitrage between money and bonds to

i=rtax 3)

Inserting these static equations 2 and 3 into the government's budget equation, equation 1, results
one of the reduced form dynamic equation, controlling the accumulation of real money balances

”

"m",

dm log(=)
=d+b—= b-2 4
a B —(m+ ) (4)

The money differential equation 4 organizes, in control terms, a loop presented in the upper
sector of figure 2. It regulates the state stock of real money holdings. The monetization real rate
"dm/dt" secures that the monetization level of the economy will be sufficient to cover that
portion of the expenditures not satisfied with the normal tax collection.

The other nucleus of the model is the inflation rate "x". Modeling the inflation rate as a state
variable i: is inspired in Wicksell (1907). It is assumed that there is a "natural" real rate of interest,
"nA" It izes the national yy as such. This rate can be estimated by adding the
country risk premium to the long run growth rate of the economy. The discrepancy between the
real interest rate and the natural interest rate, "r-n", is an indicator of the excess of money
demand. That excess relates to a "natural" level of demand for money, harmonious with the idea

System Dynamics : Methodological and Technical Issues, page 120

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

of a natural rate of interest. The loop presented in the lower region of figure 2 dissipates such
excess of money demand, letting the inflation rate to fall. The change in prices is adjusted in an
amount that it is proportional to that excess money demand, though in the opposite direction.

The parameter "a" shows the speed of the adjustment

dn

—=a(r-n (5)

dt )
The loop controls inflation to put it in line with the natural interest rate. This was something to
be expected, given the pivotal role assigned to the natural interest rate. The above described
differential equations 4 and 5, in addition to the function presented in the figure 1, complete the
model of the system exhibited in figure 2. The strong endogenous causal structure that ties up
both state variables is marked with arrows.

Fig. 2 Causal structure of the model

real money

ae
/ tax collection lag factor
real monetization rate

/
Va *
revenue from inflation tax + market interest rate
ff 3 (Cagan's equation)
/ ~~. ;
f+ public financial exposure
/ (budget restriction)
+ operating deficit
domestic debt
— domestic debt servicing

‘ ~~ +
\ rate of change of inflation rate
a

5 + excess on money demand

rate of 5 A
inflation ad
ct natural rate of interest +

eal rate of interest
(Fischer's equation)

3. Model validation

This section presents the reproduction of main experiments with the original model, by
comparing the results of the corresponding simulations with Fernandez and Mantel's (1989)
results. The announcement of the stabilization plan in 1985 surprised Argentine economy

diately after the the plan

operating at a 30 percent monthly inflation rate. |
accomplished a reduction of the inflation to 10 percent monthly. It was accompanied by a 15

percent interest market rate. Also there was a reduction of the operating deficit "d", to 2 percent

System Dynamics : Methodological and Technical Issues, page 121

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

monthly. These are the initial conditions of the simulated system. Figure 3 exhibits the

of the appli of the plan with and without controls on the prices. Such
controls are introduced in the model manipulating the speed "a" of adjustment of the inflation
rate. It was, before the application of the program, about 0.15. The experiments assume that the
efficiency of control price policy is 90 per cent. This equals to say that adjustment speed of the
inflation decreased to the tenth part: 0.015. As it is observed in the figure, the program without
controls reaches, with oscillations, an equilibrium 5 percent inflation rate. The application of
price control also diminishes inflation, although does not check it that much. It does, though,
without oscillations. These experiments ratify the results that Fernandez and Mantel (1985)
reported.

Fig. 3 Dynamics of inflation with and without price controls
12

\ ee

06 \ QDS

0 50 100 150 200
time (months)

inflation with price controls 1/Month
inflation without price controls —— 1/Month

Optimal control policies

The purpose of the present investigation is to try to improve upon the two trajectories analyzed
by Fernandez and Mantel (1989). As mentioned above, these correspond to two situations, with
or without controls, reflected in the size of the inflation rate adjustment velocity "a". With an
effectiveness of controls of an assumed 90 % this coefficient is ten times as large in the second
situation as compared to the first. In an implementation of economic policy it does not seem to
be reasonable to decide to apply or not a given policy instrument from the beginning and then
keeping it at the same level forever. Consider the more flexible case in which controls can be
applied strictly or not at any time. Thus "a" can now attain its two extreme values in an
alternating pattern. If the objective of the Minister of Economics were to stabilize the economy
as much as possible within his tenure (some 28 months at that time in Argentina) a reasonable
measure to minimize is the distance "0" from the equilibrium attained, where the function "9d(t)"
is some measure of disequilibrium, say

S(t) = yl -7,F +10) - 2,7 (6)

No rescaling of the ‘eriables involved in equation 6 needs to be done, since "i" and "x" are of
of distance to equilibrium is shown in figure 4 for the two
constant policies vault by Fernandez and Mantel (1989).

System Dynamics : Methodological and Technical Issues, page 122

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

Fig. 4 Distance to equilibrium under constant policies

12
\
06 \
mVAN
0 50 100 150 200
Months

stabilization without price control
stabilization with price controls

A first intuitively good policy strategy seems to be to choose the high adjustment velocity when
moving in the "right" direction - for example when inflation exceeds its equilibrium value and is
falling -and the low velocity when moving in the "wrong" direction -inflation falls and is below its
equilibrium value -. the ponding policy function, at each instant, and
the resulting trajectories are shown i in figure 5.

@ = 0.0792 + 0.0648 IF THEN ELSE ((r-n) < 0,—1,1)*IF THEN ELSE ((2- 2.) <0,-1,1) 7)

Fig. 5 Distance to equilibrium

.03 | :

under an optimal policy

under a variation of previ
under an intuitively ‘good’ oer
under constant price controls

System Dynamics : Methodological and Technical Issues, page 123

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

Fig. 6 Phase's Diagram: rate of inflation vs. real money

12
.02 =
60 140
real money (%)

intuitively ‘good policy’ 1/M
optimal policy 1M
policy without price controls “ cecemmnnnnes ME
locus dpi/dt=0 a Ss SEY 1M
locus dmi/dt=0 1M

The final exercise consists in allowing Vensim (Ventana Systems 1993) to choose the timing of
the policy switches related to the application of price controls, so as to optimize the
performance criterion that has heen mentioned. Parameters "pg" and "pg", define a two-step
function, equation 8, for the behavior of the inflation rate adjustment speed, "a". The first step
switches the price control on and the second one switches it off.

a@=0.144+IF THEN

SE (Time « p .0,-0 1296) ~ IF THEN ELSE (Time < (p, + p,),0,0.1296) (8)

The objective function J iy expressed in the form of an integral over a time period. In System
Dynamics terms it is a level having nothing inside at the beginning of the simulation. The
function under the integral sizn reveals the goals of the policy maker.

y=" ffroos.-6 ) +46.

10

; je (9)

Such a measure J of the performance of the system seems reasonable since it avoids
simultaneously costly cyclical behavior and deviations from the stationary solution. The effort to

System Dynamics : Methodological and Technical Issues. page 124

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

reduce the addition of the squared difference of the instantaneous value of distance to equilibrium
to its lagged version, _Or-4.1)2, takes care of the oscillations. Minimizing the addition of the
squared distance, _@p2, leads to the equilibrium point (ig,t); the quicker the better.

Fig. 7 Timing for starting and ending price controls
2 D

0 ae

} 50 100 150 200
Months

intuitively 'good policy’ 1/Month
optimal policy —————-—————_ 1/Month

Trying to achieve different goals synchronously brings forward the issue of scaling the terms
inside the objective function. In this case this was done in two shoes. First, they were made
comparable. One hundred times the squared difference of distances and the squared distance to
equilibrium is a well matched pair. Vensim graphical capability is highly convenient to this
purpose. Once they have similar magnitudes, fine tuning lets accentuate the goal one desires to,
modifying the weights of the variables that appear in the integrand. Therefore factor 3
emphasizes the desire to achieve equilibrium as soon as possible.

The selected option for the procedure, MULTIPLE START=VECTOR, restarted optimization
multiple times from different starting points, changing only one parameter at a time. It searched
the first parameter from its minimum to maximum values and then the second. After 245
simulations, Vensim selected PARAMO = 14.14 and PARAMI = 27.281. That means that price
control starts at month 14 and ends at month 41. Enlarging the weight of term 4) to 5,
provokes a late end of price controls, flattening even more the oscillations, as can be seen in
figure 5.

Figure 6 exhibits the phase's diagram with the corresponding isoclines dm/dt=O and d7r/dt= O.
There the approach of inflation rate to equilibrium inflation rate under the above mentioned
policies can be seen, and figure 7 compares the timing of starting and ending price control under
those policies.

Conclusions.

A fitting SD version of Fernandez and Mantel's model of public finance (1989) exposes the causal
structure implied in the original reduced form. As the figure 2 tells, not only two loops are
involved, controlling both the real money stock and the inflation rate, formulated as system's
states, but other longer loops also, forming a highly non linear system. This model reproduces the
response of the system to the stabilization policies tested by Fernandez and Mantel. New
experiments with the SD version of the model show the inconvenience of trying to maintain
indefinitely both original proposals. To start the price control the moment the inflation rate is
below the equilibrium inflation rate, turns out to be very efficient, as can be seen in figures 5 and
6. This policy, suggested by the visual examination of the original experiments, in the best style

System Dynamics : Methodological and Technical Issues, page 125

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

of Systems Dynamics, could be confirmed by letting Vensim's optimizer to choose the most
convenient moment to start with the price control policy. Even though optimum control
systems are often of the open loop type, the results shown here prove the convergence of the
two criteria, optimization and intuition, when applied to closeed loop, feedback systems.

Bibliography.

Cagan, P. (1956): "The Monetary Dynamics of Hyperinflations", en M. Friedman Ned.) Studies
in the Quantity Theory of Money. Chicago: University of Chicago Press, 25-117.

Fernandez, R.B. and R.R. Mantel "Fiscal Lags and the Problem of Stabilization: Argentina's
Austral Plan", P.L. Brook, M.B. Connally and C.Gonzalez Vega, eds., Latin American Debt
and Adjustment: External Shocks and Macroeconomics Policies New York, Praeger
Publishers, 1989.

Mantel, R.R. "Politicas de Estabilizaci6n Econémica", Economica 2, La Plata, Argentina, 1971.
Vensim Reference Manual Velmont:Ventana Systems Inc. 1993.

Wicksell, K. Interest and Prices, English translation by R. Kahn, Royal Economic Society,
1936.

Wicksell, K. "The influence of the Rate of Interest on Prices", The Economic Journal, XVII,
1907.

A dix: Vensim's

absolute tolerance = 0.001
~~maximum acceptable error for Runge-Kutta 4

beta = 5.645
~~ semielasticity of demand of money to changes in nominal interest rate

content of delay = INTEG((distance from equilibrium-(lagged distance from
equilibrium)),(0.1076*time delay))
al 5
distance from equilibrium =SQRT((rate of inflation-stationary rate of inflation)*2+
(market interest rate-stationary market interest rate)*2)~ ~
|
domestic debt = 0.8
~ ~ Internal debt as proportion of the gross domestic product
|
domestic debt servicing = domestic debt*real rate of interest
~~ monthly servicing of domestic debt

excess on money demand = natural rate of interest-real rate of interest
~ ~ discrepancy between the natural interest rate and the real rate of interest, as indicator
of excess of money demand with respect to the "natural" demand of money

FINAL TIME = 200
~~ The final time for the simulation.

inflation rate adjustment speed =switch0*0.0144+

(1-switch0)*((switch 1 )*0.144+
(1-switch1)*(switch2)*(0.0792+0.0648*

IF THEN ELSE((real rate of interest-natural rate of interest)<=0,-1,1)*

IF THEN ELSE((rate of inflation-stationary rate of
inflation)<=0,-1,1))+(1-switch2)*(0.144+

IF THEN ELSE(Time<param0,0,-0.1296)+

System Dynamics ; Methodological and Technical Issues, page 126

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

of Systems Dynamics, could be confirmed by letting Vensim's optimizer to choose the most
convenient moment to start with the price control policy. Even though optimum control
systems are often of the open loop type, the results shown here prove the convergence of the
two criteria, optimization and intuition, when applied to closeed loop, feedback systems.

Bibliography.

Cagan, P. (1956): "The Monetary Dynamics of Hyperinflations", en M. Friedman Ned.) Studies
in the Quantity Theory of Money. Chicago: University of Chicago Press, 25-117.

Fernandez, R.B. and R.R. Mantel "Fiscal Lags and the Problem of Stabilization: Argentina's
Austral Plan", P.L. Brook, M.B. Connally and C.Gonzalez Vega, eds., Latin American Debt
and Adjustment: External Shocks and Macroeconomics Policies New York, Praeger
Publishers, 1989.

Mantel, R.R. "Politicas de Estabilizacion Economica", Economica 2, La Plata, Argentina, 1971.
Vensim Reference Manual Velmont:Ventana Systems Inc. 1993.

Wicksell, K. Interest and Prices, English translation by R. Kahn, Royal Economic Society,
1936.

Wicksell, K. "The influence of the Rate of Interest on Prices", The Economic Journal, XVII,
1907.

Appendix: Vensim's equations

absolute tolerance = 0.001
~ ~maximum acceptable error for Runge-Kutta 4

|
beta = 5.645
~ ~ semielasticity of demand of money to changes in nominal interest rate

|
content of delay = INTEG((distance from equilibrium-(lagged distance from
equilibrium)),(0.1076*time delay))

distance from equilibrium =SQRT((rate of inflation-stationary rate of inflation)*2+
(market interest rate-stationary market interest rate)*2)~.~

|
domestic debt = 0.8
~~ Internal debt as proportion of the gross domestic product

domestic debt servicing = domestic debt*real rate of interest
~~ monthly servicing of domestic debt

excess on money demand = natural rate of interest-real rate of interest
~ ~ discrepancy between the natural interest rate and the real rate of interest, as indicator
of excess of money demand with respect to the "natural" demand of money
|
FINAL TIME = 200
~~ The final time for the simulation.
|
inflation rate adjustment speed =switch0*0.0144+
(1-switch0)*((switch 1)*0.144+
(1-switch1)*(switch2)*(0.0792+0.0648*
IF THEN ELSE((real rate of interest-natural rate of interest)<=0,-1,1)*
IF THEN ELSE((rate of inflation-stationary rate of
inflation)<=0,-1,1))+(1-switch2)*(0.144+
IF THEN ELSE(Time<param0,0,-0.1296)+

System Dynamics : Methodological and Technical Issues, page 127

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

IF THEN ELSE(Time<param0+param1,0,0.1296)))
~~ velocity of adjustment of inflation rate to changes in real rate of interest
|
initial rate of inflation = 0.1
~~ initial value for inflation state variable
|
initial real money =q*EXP(-beta*0.15)

|
INITIAL TIME = 0
~~ The initial time for the simulation.

isocline m = (operating deficitt+domestic debt*market interest rate)/
(real moneyt+domestic debt-tax collection lag factor)

isocline pi=(LN(q/real money)/beta)-natural rate of interest

lagged distance from equilibrium=content of delay/time delay

|
market interest rate = (LN(q)-LN(real money))/beta
~~ nominal rate of interest

natural rate of interest = 0.015
~~ economy 's natural rate of growth plus the country risk
|
objective function =INTEG(100*((distance from equilibrium-lagged distance from
equilibrium)*2)+5*((distance from equilibrium)2),0)
|
operating deficit = 0.02
~~ deficit that includes, besides the government primary deficit, the service of foreign debt
and excludes service of national debt
|
public financial exposure = domestic debt servicingt+operating deficit
-revenue from inflation tax
~~ government financial balance

param0 = 0
~ ~ the time at which decision to control prices is made

param! = 0
~ ~ the time at which decision to end control prices is made is: time=param0+param1!

|
real monetization rate = public financial exposure
~-~ real money state derivative

|
real money =[NTEG(real monetization rate,initial real money)

|
real rate of interest =market interest rate- of inflation
~ ~ Remaining of nominal rate of interest after discounting inflation rate

System Dynamics : Methodological and Technical Issues, page 128

1994 INTERNATIONAL SYSTEM DYNAMICS CONFERENCE

revenue from inflation tax =(real money-tax collection lag factor)*rate of inflation
~~ government financing through inflation

real money 2 = real money*100

rate of change of inflation rate = excess on money demand*inflation rate adjustment speed
~~ inflation rate state derivative

|
rate of inflation = INTEG(rate of change of inflation rate,initial rate of inflation)
~~ monthly rate of inflation state variable

relative tolerance = 0.001
~~ maximum acceptable relative error for Runge-Kutta 4

|
SAVEPER = 0.1
~~ The frequency with which output is stored.

stationary market interest rate = 0.0584

stationary rate of inflation = 0.0434

|
switch0 =0
~ ~ switchO=1 means constant price control and switch0=0 allows other policies.

switch] = 0

~ ~ combination switch0=0, switch1=1 means absence of price control and switch1=0
indicates the application of stabilization policies with price control, either alternating or
optimal, manipulating the velocity of adjustment of inflation rate.

switch2 = 0

~ ~ combination switch0=0, switch|=0, switch2=1 means the application of alternating
pattern of price controls, and combination switch0=0, switch1=0, switch2=0 indicates the
application of stabilization policies with optimal price controls.

tax collection lag factor = 0.4
~ ~ magnitude of the reduction of taxable stock of real money due to tax collection delays
in inflationary conditions (Olivera-Tanzi)

|
time delay = 2

|
TIME STEP = 0.1

~~ The time step for the simulation.

System Dynamics Methodological and Technical Issues, page 129

Metadata

Resource Type:
Document
Rights:
Date Uploaded:
February 28, 2026

Using these materials

Access:
The archives are open to the public and anyone is welcome to visit and view the collections.
Collection restrictions:
Access to this collection is unrestricted unless otherwide denoted.
Collection terms of access:
https://creativecommons.org/licenses/by/4.0/

Access options

Ask an Archivist

Ask a question or schedule an individualized meeting to discuss archival materials and potential research needs.

Schedule a Visit

Archival materials can be viewed in-person in our reading room. We recommend making an appointment to ensure materials are available when you arrive.