The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun's Java site.
powered by NetLogo
view/download model file: market_and_interest_rates.nlogo
This project want to simulate an iteraction in a simple market between buyers and sellers especially observing in which way the single supply and demand operate to generate an aggregated model. Remember that aggregate demand and supply functions are then generated and the model evaluates equilibrium price and quantity at every step. Therefore we proceed to define the agents with linear aggregate single demand and supply functions while implying the variable time day by day. By using a switch you can turn on/off the effect of interest rate into the model by importing the file "interest_rate.txt" that include the historical interest rates caluclated for every working day(256).
For every turtles (agents) was generated a single linear demand or supply function. Day by day every agent randomly choses to be buyer or seller.
Linear functions are generated according to the equation:
y = a - bx : demand function
y = c + dx : supply function
where y is the quantity and x is the price.
Single demand (supply) function is defined choosing values a,b (c,d) representing intercept and slope of the line.
These values were choosen by the user for every agent, and they were generated through uniformly distributed shocks in the parameters:
set a (alfa + (random-normal 0 1) * i)
set b (-10 + (random-normal 0 1) * y)
for demand function, and
set c (beta + (random-normal 0 1) * m)
set d (10 + (random-normal 0 1) * j)
for supply function.
To aggregate the functions, specifically in the functioner procedure, given two prices (in the model 50 and 150), sums single quantities to obtain two points of the aggregate demand and supply. The curve is obtained by interpolation of these points. Setting aggregate demand equal to aggregate supply through a linear system, we obtain equilibrium price and quantity.
1) Before SETUP it is possible to manage the following parameters with the appropriate sliders:
NOT INSTITUTIONAL INVESTOR: number of agents defined as "Not Institutional Investor"
INSTITUTIONAL INVESTOR: number of agents defined as "Institutional Investor"
ALFA: constant of demand function intercept
BETA: constant supply function intercept
i: to increase range of variation in single demand intercept
y: to increase range of variation in single demand slope
m: to increase range of variation in single supply intercept
j: to increase range of variation in single supply slope
DAY: number of steps day by day
LIMIT-SPEED?: wait the given number of seconds (if the switch is "on")
SHOW-INTEREST-RATE?: (if the switch is on) the program import the file "interest rate.txt" that modify the initial price
2) Playing SETUP turtles are created, and they don't assume any position (sellers or buyers).
3) Playing GO it will start the simulation. Equilibrium price and quantity are plotted every day.
Modifying parameters which influence intercepts, the equilibrium price and quantity have an increase in volatility, and a major increment in quantity is noticed.
This parameter has been kept intentionally high to have variability in prices (but intercepts of some buyers or sellers could be negative).
During the simulation, the variation of parameters alfa and beta could be interpreted as a "shock" in aggregated demand and aggregated supply, which modify the equilibrium price.
Increasing beta, the main component for single supply functions, the function of aggregated supply is shifted up generating a decrease in the equilibrium price and an increase in equilibrium quantity.
In the same way increasing alfa the aggregated demand function is shifted up, generating an increase in equilibrium price and equilibrium quantity.
The switch "show-int_rates?" show how the initial price can change with the use of the Euribor rates.