 All right, so before we start Two announcements as you know the the second online quiz is already available It will be available available for one month One month one week That would have been too much There are 20 questions. I hope this time all the questions are clear because last time they were There were some questions which were a bit let's say miss Written in in terms of language So that was my fault this time. I've tried to make it really really straightforward So give it a try second more. I mean the online quiz you pretty much have to do The online survey on that hand you don't have to do is the second online survey But it's very important for us to do it There are slightly different questions this time in the survey questions like Do you like more the mathematics in systems dynamics in which case? The course has to be changed accordingly in the in the in the coming semesters. Do you like more the business? examples of systems dynamics in which case The course has to be changed in some other ways. So that's important for us to know So Yeah, that's pretty much all I have to say Before we start with the new lecture I'd like to finish the few slides from last lecture remember we were talking about chaos in manufacturing systems in particular this kind of server server Set up where we have a So we abstract our manufacturing system into Buffers and a server which services these buffers So in that example, the buffers get filled with something with liquid or with parts per per per time unit This could be manufacturing lines as a matter and then they get emptied By the server. So the server's task in this example is to empty the buffers Or to service this manufacturing lines. This is what we call the server system The server system the arrival system is exactly the opposite the arrival system is The buffers get Empty by themselves. So they have a little hole for instance and they get emptied at a given rate But the server is the one supposed to To fill them and so the task here is to have all the buffers With some amount of liquid or stuff in them at all times We're going to look at the server system How how it behaves in terms of the position of the server? That's what we're interested to schedule the server position and to predict more or less the amount of liquid or the amount of Utilization of each of these buffers So this is a little bit of Yeah mathematics what we have here is All the buffers get filled with a given rate. These are a picture about that somewhere Yes, this one. We're looking at the switched server system So all the buffers get filtered their own idiosyncratic rate lambda one lambda two and so on Then they get emptied by this dot, which is the server I mean, it's kind of a to concentric circles. So they get emptied, right? And this is the inflow rate of All the buffers is simply the sum of their individual filling rates and that we postulate should be equal to the outflow rate to them to the speed of Of how fast the the server empties them right Otherwise Otherwise the server would never be able to cope with With all the buffers right if let's say the speed of the buff of the server was just lambda one Then pretty much immediately They would be filled buffers that the server couldn't be able to service because it just can't empty the buffers fast enough so what happens this is the amount of liquid in buffer I if That so this is the buffer i j is the position of the server So imagine if you have three buffers one to three The possible J's positions of the server would be one to three. So if the server is currently servicing This buffer I what would that mean that means that the buffer is being filled with this rate So this is the time interval assume it's one so it's lambda i times the time interval minus One because it's being emptied at the same time Okay, so this is how the liquid will change the liquid in the previous time interval plus What is going in minus? What is going out from the server and accordingly if there is no server there So the buffer is just being filled Until it gets full That's it and I showed you these examples These are so-called Poincaré Poincaré maps it's supposed to be French But in other words it's billard maps we saw billard maps in the self study actually on Tuesday And one of the groups presented billard maps So what what does that mean? I explained last time we have the three buffers. It's an example with three buffers We start let's say Here, okay buffer one is relatively full buffer two is Empty if you really start in in that 2d plane buffer two would be empty and buffer three is Just a little bit full. So what happens is well the server goes to buffer one and tries to empty it So the buffer is empty server emptying server one buffer one Empting emptying it in the same time buffer two gets filled and buffer three gets filled because They're not being serviced at the moment So the buffer the server reaches this position where server two Buffer two is now fuller than before And buffer three is again slightly fuller than before and this slope Is in fact given by the rates Of how the individual buffers get filled right if buffer three gets filled much faster than buffer two Then we wouldn't end up here. We would end up maybe here Where buffer three is much fuller than buffer two, but in this case buffer two gets filled much faster than buffer three Well, not much faster, but slightly faster That's why we end up here so buffer the server comes here And accordingly it goes back there. So it starts servicing buffer two We end up in a position where buffer three is now even fuller Buffer one is also a little bit fuller and then this whole thing would repeat like this right, so the position of the sort of the server is One two three one two three You know, it's perfectly regular You can always predict what the server will do and B is the capacity of the buffers one in this case But as you decrease the capacity of the buffers The server starts to behave more or less chaotically So here the position is I can't tell but it's Something like this and here it's even it's even worse. What do you also? What you what you can also see is that uh, now the The motion of the server is is restricted a lot more than here Look what the server the server couldn't do. So basically this triangle as much is kind of bigger than this one Right here the server only goes Uh, only stays for very short time at any given buffer and then immediately switches So the basically the position of the server is unpredictable In that case in the long term that is And this these are bifurcation dangerums. What we see here is uh, So the three buffers just concentrate on the solid lines. So this line this line and that line the x-axis Is the level of the liquid in the buffer When the server went to service that buffer. So for instance, this one would mean that buffer one had Was we had whatever amount of liquid equal to 0.1 Yeah, 0.1 When the buffer goes to to service it All right, so you can say as soon as the liquid gets to 0.1 I know that the server would go and service this buffer Buffer two is 0.5. I think 0.45 maybe and this one is 0.70 something Right, so it's perfectly predictable. But as you decrease your control parameter b At some point, I don't know exactly what this value is but at some point I mean, of course, this value probably also depends on the filling rates You see what happens. So basically Any server can be serviced at any given time. We just can't know I mean the liquid in the first in the first buffer could be here could be here anywhere. So that's that's what the point is here Yeah, and these are all the slides actually that I couldn't cover Last lecture Yes, I think that's all Now let's move on with the new one Um Are there any questions by the way Regarding this lecture or any any previous lectures? Yes Servers or buffers now But the load is I guess distributed By some algorithm Not to my knowledge This is not to my knowledge in disaster recovery. This the the rules of the server here are kind of local So you decide what to do Now at this given time step depending on what the Uh, what the configuration is of your buffers This sounds similar to me actually So maybe it could all right Any other questions About anything so far Exam are you interested about the exam? Maybe but uh, I don't know any details right now Yeah, I mean the exam would probably be a lot similar to last year's exam Which of course is kept private so so today's lecture is Uh, a slightly different twist to our course Yes, so I was afraid that this will happen So far we saw a lot of mathematics logistics map Um, this example with this with the manufacturing system Uh, we saw workforce inventory and stuff like that But we didn't actually talk a lot about economics about the economic dimension Of systems dynamics. So how can we model economic systems using economic terms? And and and things that actually have economic meaning for instance if you think about the Logistics map there was a control parameter r But what does it mean? I mean r of 3.8 Eight it's a chaotic behavior for 3.8. But what does it mean? Anyone there to Suggest something or it doesn't mean anything unless you put it into a context So if and that's that goes into the direction of how we model things You if you can apply your the logistics map into A situation where the mechanisms of the logistics map makes sense Then you can interpret your control parameter in the way that your real system Behaves for instance Biological systems right you can apply the logistics map For biological system the growth rate of biological systems. In fact people that's how it was developed They were studying people are studying the growth rate of bacteria And do you know what the r would be for the bacteria It's about four So that's close to the chaotic regime. So if you look at a population of bacteria The population would behave very chaotically so When we when we go into economics now, we're going to see models But the parameters of these models are b alpha gamma whatever they have economic meaning Okay, and that's that's important So I think two lectures ago. We saw the Example with adoption of new technologies and new products and we talked about a little bit about about supply and demand there We talked about production site, which is basically supply. We talked about demand site Uh or sales, which is basically demand Um I mentioned shortly at that lecture the role of marketing As a mechanism for bringing supply and demand together and there we only consider very basic forms of marketing like advertising like common source But this lecture we're going to talk about kind of an extension to marketing, which is markets So markets is bringing supply and demand together Uh, we looked a little bit at the product life cycle That was that was quite easy um, and hopefully still remember the bifurcations discussions from last lecture and control parameters stability instability fixed points and things like this I had a look at um at a few of the people who completed the quiz actually very Fast there were questions about bifurcations Which to me sounded very simple but still, um I got the impression that this idea was not clear enough So I will try to repeat again what bifurcation means bifurcation is not just having one stable solution and and then suddenly uh The system changes and we have two That's that could be a bifurcation, but it bifurcation is a lot more it could mean destruction and creation of as many stable solution fixed points as you want It could be one Forking into five unstable ones for instance, it could be two kind of bifurcating back into one could be anything It's just destruction and creation of fixed points in very simple terms It's not just from one we get two and then if from one we get four then that's like two bifurcations All right And as I mentioned today, we're going to look at the economics perspective. So our basic setup is the following We have two fundamental players in our Uh system This is this this is the supply side and the demand side So basically you can think of supply as all these firms which are producing goods and demand is Uh all the consumers which are consuming the goods Yeah in macroeconomics terminology, these are called decision-making units Because then you have to talk about how they make decisions and rationality and stuff like this But for us, they are just like firms and and and consumers And now importantly the market is Kind of the place where these two Uh decision-making units meet and exchange information mostly exchange goods Importantly The purpose of the market is too much supply and demand you probably all know this This is basic economics and and well To make things easier, we're going to be talking only about competitive markets Where the decision of any single individual cannot influence the system The market or in more precise terms cannot influence the price Obviously, you know, this is not true Especially when it comes to oil, it's definitely not true But This is what we're going to do. It simplifies things. There are many business deals which actually never enter a market As we know it So this is a very big simplification here And now, um How does the market Ensure that supply matches demand or demand matches supply through the market clearing mechanism And that's exactly what it is. It's a mechanism For changing the price in such a way that the supply matches the demand at any given time Okay, that's also kind of a strong assumption We know that in real life supply almost never matches demand exactly at any given time. There's always some adjustment period But this is again another assumption that we make um Yes, and this is this what I mentioned. So basically in In real markets, they're never in equilibrium despite Most basic economic theories about the equilibrium and stuff like this So they're always trying to get into equilibrium if you think in this way, but they never Managed at least not in the And in the markets we observe and this is the market clearing mechanism It's constantly trying to change the price so that supply and demand are matched And mind you market clearing mechanism is not the same as equilibrium Right equilibrium is just a point where supply equals demand today Tomorrow the day after tomorrow and so on and so forth if you change that equilibrium for some reason Demand decreases supply increases new policies then The market clearing mechanism would kick in and ensure that The price changes to the new equilibrium Okay, so if the system is at an equilibrium point the market clearing mechanism does not Does not work. I mean it it works, but it's kind of Idol if you'd like because there's nothing to do supply is already matched This is The market allocation mechanism where it's kind of a A picture for most of all for our visual Idea of what we're going to do in this lecture and then the coming lectures So you probably all know this figure we have firms which supply goods To the so-called output market This is the market of goods and services households buy goods and services from these output markets So this is the upper half cycle. This is the topic of the lecture today the output markets In the coming lectures, we're going to be dealing with input markets as well input markets are the markets for resources for Role labor and for capital so households offer offer their There there's themselves in a way to the firms As employees and then Firms employ Employee people they also get land and capital to produce their their products So these are the input markets and it's a cycle, right? This is in the coming lectures. This is today and just for your own information money flows in the other direction Right, so households Give money to the output markets so they pay to the to get their goods the money go to the firms Obviously the firms pay wages and so on so the money flows into the different direction How many of you have taken any course in economics? Oh, everyone. Oh, but then I can just skip these slides Everyone Yes, okay. Well really quick We know That I mean, this is the Archetypical picture in in economics We have supply we have demand So for our purposes, let's think of this as aggregate supply and aggregate demand We take the macroeconomics perspective since this is systems dynamics. We're only concerned We only study systems from kind of a bird's-eye perspective. We're not interested in individual decision making We have supply we have demand. This is the equilibrium when supply and demand are matched exactly for some reason if let's say Supply or let's say for some reason if the price changes, let's say there is a minimum price Suddenly by the government. We all know what happens. There's a surplus because Basically, obviously the suppliers would like to produce at that high price, but There's not enough demand for this and the opposite thing is the shortage Now, can you tell me what is the consumer surplus here? Who can tell me that? Yes So he this So you mean this? Yeah That's true Do you know why? No, I mean I asked everyone but yes, okay But go ahead Yes, yes, you understand. Yes, you know, so basically the No, I mean, it's right. There's nothing we shouldn't spend time on this So basically this is the price that consumers actually end up paying at the end But look at this guy He was willing to pay a lot of money to get his I don't know, maybe one unit He was willing to pay a lot of money, but now he would end up paying just this So that difference is his surplus What he was willing to pay minus what he actually ended ended up paying and the same for the for the for the suppliers Again, you know what happens when you start playing with this curse left and right In fact, this is a real case. I think the left. Yes, this is the market for eggs So what happens is from the 1970 to 2002 the demand What happened to the demand it did what? It It increased Right No, it decreased. So it decreased the supply Actually increased Right, so you would expect That the price would decrease Right demand goes down supply goes up There is a lot more stuff on the market, but not so many people want Wanted anymore, but in fact the price Where is the price? So This is 1970. Yes, right. So the price decreased This is the education market. It's the same thing. So you can you can basically understand this graph immediately elasticity's Yes Yes more more extra on agriculture being both Because The supply increased more than the demand decreased Yeah, so that is that is the kind of a Counter-intuitive thing um The demand so the demand Decreased meaning that For that particular price, let's look at that price People were willing to buy I don't know how many units, but then for the same price Well, let's say let's look at the quantity for this particular quantity people were willing to pay Whatever price But now for this quantity people Are willing to pay less Which means that more substitutes became available so people don't want to Maybe they still want x, but they don't want to pay so much for them anymore Because there are more substitutes. They become more conscious about Was there some kind of justification given? Okay, it just says that consumer preference has changed, but it may be because They still want the same amount of x, but they want to pay less for them. It's not that they don't want the x anymore Right Elasticities of supply and demand Again, you probably know this But Let me just mention it. So when we talk about elasticity at least in in this lecture in this course It's about percentage changes relative changes Meaning if the price changes by 2 percent increases by 2 percent by how many percent Would your demand decrease? Right, it's always about percentage changes or relative changes And here you have the equation. So the elasticity of demand is basically given The percentage change In the quantity demanded Divided by the percentage change In the price Okay And the same thing for the supply percentage change of quantity supply divided by the percentage change of the price So Imagine that The elasticity of demand is three This number is three. It's a dimensionless quantity What would that mean? Well, that means that If the price increases by 1 percent The demand would decrease by 3 percent All right And just as a convention, okay, this is x here, but It's better with numbers. So it's a convention If the demand Decreases More than the price change We call this demand elastic. So If the price increases by 1 percent And your quantity demanded decreases by 2 percent So 2 is larger than 1 your demand decreased more than the price changed Therefore your demand is considered to be elastic And In the opposite way it's considered to be inelastic Now when we talk about percentage changes, it's important to realize that Elasticity of supply and demand they're not constant Along the whole demand line and this is an example here Right if you have the following demand function 8 minus 2 p p is the price. This is elasticity of demand by the way ed in that notation Not e p. It's a bit confusing, but you can make a note. It's ed Right. So you see the elasticity of that of demand For very very low quantities and very high price is is almost infinite Right. So here we consider what does that mean? Well The demand is very elastic here. The demand is very inelastic Do you does everybody see why? Who saw it? Oh, okay Well Let's have a look now. Shall we? Right. This is the equation The elasticity of the demand is The percentage change of that thing So it's basically divided By that thing All right, or in other words, it's dq dp times p over q dq dp So you simply integrate this thing with respect to the price and it's minus 2 it's the slope Times p over q Right. So you see when the quantity demanded is zero This gets to minus infinity That's the point over there If the price is zero this thing is zero it's the quantity here So if quantity is four and that is two It's two divided by four one half minus one You can think of this in in in the following way and actually it's true at least for me If you go to a shop Right first of all, what does that mean? This means that if the price is very low Very very low People really don't care Right the elasticity is is very low. It's very inelastic So if the price is low and you increase a low price by one percent Your demand wouldn't change It would more or less stay the same and if you go to a shop and you look at Some good which costs, I don't know 40 rappin another one which cost 80 rappin Probably it won't make any difference to you if the same good obviously Or if you have a good which costs like 40 rappin the next day you see the good costs 60 rappin you wouldn't care so much Right, this is the meaning of that thing obviously the opposite is true here Right if suddenly your favorite I know something from 20 francs jump to 35 francs in one day. Well, you will be very sensitive to that All right, so this is the meaning the demand elasticity and the supply elasticity for that matter. They're not constant Along the whole price range And in the notes you have an example a typical example of what is perfect elasticity and whatnot So let's look at the I just noticed that something is wrong with the with the resolution And I'll get angry emails again, but okay. Well never mind We're going to look at a very popular example of This supply and demand and the market So remember we had a supply we had a demand they're governed by some equations And the price they're basically matched together by the price or the market clearing mechanism And people have tried to model the situation The model is called the cobweb dynamics. Have you ever heard of this terminology cobweb? Okay, no, that's good Um This is the well This is the setup We have um supply demand. They're linearly dependent on the price as we all know This doesn't have to be the case by the way, but I know a purpose. It's true They're linearly dependent and this is the linear dependency D Assumption here is that demand adjusts immediately to the price So if I go to the shop and I see that something has suddenly doubled its price I can immediately adjust my demand But suppliers can't really do that Right, so you need some Technological time you need some time to produce your units your your uh your production So you can't adjust your supply immediately And the popular example is with uh picks Right, so you need some time to breed the picks If the price increases suddenly You want to produce more obviously But you can't really produce more today. You have to wait Maybe a year to do this and in our model supply Lacks behind The the price by one time unit Right, so the supply here Is determined by the price in the previous time period or if you want to think about it the price here It affects the supply After one time period because people need time to adjust but demand obviously adjusts immediately And these are the familiar shapes. This is an increasing function And this is a decreasing function All right Here the parameters alpha and gamma Are the basic supply and demands at price zero. They're kind of idealized versions, of course If the price is zero, we probably won't have a market, but um In uh Here we basically assume that This is kind of a demand basic demand and supply which are always there like demand and supply for air if you'd like the beta and delta Are the so-called price derivatives of supply and demand these are the slopes of the curves, right if you differentiate this with respect to To the price you get beta and you get minus delta So these are simply the slopes These are not elasticity's right. These are absolute If you want to think about elasticity's this would be absolute elasticity's so if you change the price by one Monetary unit the demand would change by by uh delta quantity units But we're talking about percentages here for us elasticity's are percentages. Therefore The demand elasticity's are given by this right. We need the price and the demand and the same thing for the supply It's you can calculate this in the same way that I showed you right. So it's basically ds dp times p over p over s Yes Yeah, that's that's a thing The price derivatives times the price minus minus s And we want to see what happens when we start playing with With our control parameters. Now, which are our control parameters? Any ideas? We talked a lot about control parameters I tried to give you kind of an intuition Which are good candidates for control parameters? Yes Yes, that's true That's true. Yes So in other words, we're going to be using we're going to be playing with the price derivatives Or as you mentioned with the elasticity's right because this is something we can easily change not easily but It's something we can change we can change how people How elastic let's say people are to a given product by let's say promoting substitute products for instance But we can't really easily change the basic supply and demand because the assumption is that these are You know, they're basic they're They're fundamental. It's difficult to change them. So Before we actually put this into the computer it happens. It turns out that this is a very easy model to analyze. It's a very easy one You can solve it analytically in the notes. So not in my notes, but in your notes, I've included The way to solve it But yeah, so before that, let's look at this We want The market clearing mechanism to work meaning the supply matches demand at any given point of time Okay, so supply matches demand There you go supply matches demand we make these two things equal And we can express the price in time t in terms of the price In the previous time period There you go That's exactly how we got this recurrence equation This is called the recurrence equation because the price reappears on the right hand side all right You can actually solve this exactly and in the notes You have the procedure how to solve it exactly And also the solution is given there Can I get your handout really quick? Not a handout Right, so if you look in your notes, I mean you can probably look at his yes Thank you If you look in your notes, then you can see the solution for the price in time t Right, it's it's given by this quantity Right, so let's let's think about it before I'm sure before I show you how the dynamics develops We can actually think about it and and understand everything about this model So tell me just looking at the price at the solution for the price in the notes What are the possible outcomes of this model? Depending of course on our control parameters beta and And delta Don't care about all anything. I just these two parameters. What are possible outcomes? Just look at the solution Yes Oh, you you're not No, okay fine It's easy so what will happen in the long term when When The time goes to infinity. Let's say you wait for one million time steps Just look at the equation. What will happen? You have a minus beta over delta To the power of t. This is the quantity that we should focus on All right, so you have the whole break to think about this Thanks I'm going to change my my presenter So that things are a bit more visible Well, are they oh no, I have to change the Something else too. Let's see if that's going to work Should work. Yeah, so why is that thing not? Oh, it's off So somebody mentioned An important thing which I couldn't change in the slides. Unfortunately Now I tried to do it, but there was not enough time It's this thing here. Let's see. Oh, whoa, whoa, whoa How was it this? Not this. Yes so If the price increases by 1% Right demand will drop by So x percent could be a bit confusing The right thing is demand will drop by ed times 1% right, so ed Times 1% because I mean that's ed is right here. It's given here Right That's just a small thing, but let's go back to the important question. What happens to this dynamics and Can I again use this handle? So you had a 15 minute time to look into this what will happen if Look at it beta over delta Is larger than one just look at it. Yes Yes, you will have No, no, it's No, no, that's not right Just look at it. So let's let's assume it's minus two All right beta over delta is two. So minus beta over delta is minus two Let's see what happens with when we take the powers of minus two so minus two to the power of one Is minus two so minus two four minus eight 16 minus 32 64 minus 128 256 So you have exploding oscillations With increasing amplitude. So basically Going from minus infinity to plus infinity. These are exploding oscillations if beta over delta is smaller than one You have the opposite you have damping damped oscillations. So you have oscillations which actually decrease and eventually stabilize to a certain value And what will happen if beta over delta is one? No, look at it That's the kind of math that you have to know for the exam. So Think a bit No I again didn't hear Exactly Right, you have One minus one one minus one one minus one. So the sign just changes And you have two values like it's their constant oscillations And what you can also see from this thing is that let's say beta over delta is smaller than one The minus beta over delta to the power of t goes to zero as t goes to infinity And the only thing left in the long term Is this gamma minus alpha divided by delta plus beta. It's exactly Is it it's exactly this value All right, it's exactly this value that is left. So this is the stationary state Whether it's stable or not is a different thing entirely right fixed point stationary state equilibrium They all mean the same, but they don't imply anything about stability Here How we have found this this Stationary point for the price is not by solving the equation by a much simpler way and that is We know that Thanks, I'm not gonna need that we know that At equilibrium supply Equals demand so that thing here supply equals demand Um And by equalizing supply and demand so basically no, sorry at equilibrium the price today equals the price tomorrow The price the day after tomorrow and so on and so forth So just by the same procedure that I showed you last time we take the price Today equals the price tomorrow Pt equals pt minus one, but the price today also equals this thing The right-hand side So if we equate these two equations you get immediately the stationary value for the price But by solving it analytically we can talk about stability a little bit And you saw that the stability changes to exploding oscillations or damping oscillations when we change this ratio beta over delta Right. Yes and this is What happens when you put it into a computer and the cell study for today is creating a venzy model for the cobweb dynamics And probably this is the only cell study where there is a sample solution and that is the sample solution These pictures exactly So what do we see? It's exactly what we just discussed If beta over delta is smaller than one we have damped oscillations Right, so the damped oscillations the blue curve The blue curve and the green curve are supplying demand respectively And what you can notice on the figure is that supply equals demand at any given time step This was the market clearing mechanism Supply equals demand at any given time step And you see how the price develops the stationary value of the price was given by By by this by this quantity here All right And oh, sorry Why this why is this called a cobweb because if you plot A graph like the one on the right so quantity is on the x-axis prices on the y-axis It's similar to the uh logistics map actually How we plotted the development of the logistics map Um, so let's start from here The explanation is also given in the notes We have let's say a given Quantity that is desired by the population. Let's say 300 and according to According to the demand curve The price for 300 units should be whatever. I don't know 60 for instance But this price is too low For for suppliers so they don't want to produce it in the next time step The quantity Right, so the supply the the suppliers would only produce I don't know 130 units Is it no 135 So for this price only 125 135 will be produced In the next time period The people See that there are 135 Units on the market so their demand immediately shifts Here and the new price would be set to 250 I think Yes, 250 Right, so the demand immediately adapts to the price people saw the price is 60 Sorry people saw the quantity is 135 their Demand changed immediately as a result the price changed to 250 The suppliers would only see the 250 in the next time period so in the next time period Suppliers see 250 and they would produce that value here And then it goes on and on and on and if it's stable eventually we reach an equilibrium and it looks like a cobweb Because that looks like a spider net That's why it's called the cobweb it looks like a very kind of strange spider web, but I guess you can It's not stranger than the constellations that you see in the sky so yeah Yes, so this is instability If the bit of a delta is bigger than one then we get exploding oscillations and obviously In the cobweb we start with somewhere here close to the equilibrium and then we would Diverge outside eventually here it will never reach a stable point And this is what happens when it's equal to one Right constant oscillations the same two values repeat over and over again for the price and for the supply and demand This was the simple cobweb. It's a very simple model. It's very easy to implement Invencing And you saw that there is no no chaos here the the equations were very simple linear equations There was a lag in supply by one term By one time period and before I continue could you tell me how much time is left? I want to set the timer 35 minutes. All right And we saw that the only you can even collapse the two control parameters to one by taking the ratio beta over delta Right, so in that sense only one control parameter Control stability and instability, but there is no chaos here That's important thing to remember And probably you already you can already identify a lot of Problems with this simple model some of the problems are mentioned here We have linear supply and demand that may not be such a strong assumption but The the next more stronger assumption is the way suppliers form expectations right in our model suppliers were very kind of Non-intelligent they were reacting with a lag of one To whatever happens, but they were not making any kind of predictions or anticipations They were just reacting and the only thing which introduced the lag Was simply the fact that they needed time to ramp up their production to produce more to produce less The results nevertheless Kind of apply for markets which exhibit cyclical behavior So if you have a market with cyclical behavior You can try to apply this simple model and based on On the control parameter that this ratio you can probably try to create policies for these cyclical markets And try to see if if the results of these policies match your expectations But the bigger problems Are Basically the fact that it's a very simple dynamics. We only have damped oscillations exploding oscillations or regular oscillations We don't have kind of a random looking prices As you all know prices kind of look random. We don't have chaos And we have a lot of markets which Most of the markets I would say Which have for much more complicated dynamics than that We only have one Market that's another thing Especially today this assumption is very very strong and probably unreasonable Because today I mean nowadays not today in particular we have markets which influence each other all the time lots of markets coupled together in some somehow Now the gold market is somehow coupled to the foreign exchange market They all influence each other somehow But this is not captured here And in fact, I mean all these assumptions can be relaxed you can Improve the model by introducing more complex supplier expectations. So suppliers Anticipate something they don't react so kind of You know this kind of a knee-jerk reaction Here we're going to improve only the fact that there is no coupling between different markets. That's important. So we have We're going to couple basically two cobweb dynamics. And that's why Uh, we refer to this as coupled cobweb dynamics. So I have really two cobwebs Cobweb models and we just couple them together Without introducing new variables without introducing Different linear different functions for supply and demand. So this is the setup We have n producers Or n suppliers and we have two markets x and z Um at each point of time Certain fraction of the producers n Decide to either go to the x market or to the z market. And in our example, we have w x Is the fraction of produce wxt is the fraction of producers which decide to go to market x at time t And obviously one minus that Is the fraction of producers who want to go to to market z at time t And again, you can all kind of see the implicit assumption is that suppliers basically Have only two choices go to x or go to z. But you have to produce You can't just leave the game completely Each supplier individually produces x Quantity sx at time t So sx would be the amount of stuff that each supplier in market x produces and correspondingly to market z So each supplier produces the same amount s And of course the total supply would be given by That ratio n times w times s Right. So n times w is the amount of suppliers in market x Times the amount that each supply produces you get the total supply Market clearing Demand equals supply right this is the same thing as before The question is What is the price we're interested in the price remember We do the same thing as before The same analysis as before The demand in the supply in market x and z are still the same linear functions increasing or decreasing Increasing or decreasing for demand and supply they're given there And we have In the same way as the single cobweb dynamic We can get this recursive equations for the price In market x at time t is the same as before Or for the price in market z at time t So now tell me I mentioned that you know these are going to be coupled cobweb dynamics So are these two equations coupled the way you see them now? No Yes Yes Are you yes or no? Now the answer is yes This is what couples the two equations Okay, it's a w Nothing else I mean all these parameters a b d and z and so on They're kind of individual parameters for the markets But w is what couples them Come again They're not the same. That's true No, they are if you The sum of these two w x and w z is one Right, so if you set this to whatever value, I don't know 0.4, you immediately determine The other one Right, so that's that's what couples them together If you want to decouple them still You can do this and this is done in in that slide It serves as a control case kind of to see what happens if the markets are decoupled and We can easily decouple them by assuming that W is kind of constant So in that example half of the suppliers go to market x and half of the suppliers go to market z 0.5 in that case In which Case yes, the markets will be decoupled but because at any given point of time W in both markets would be 0.5. It's like a constant Markets are perfectly decoupled In the exactly same procedure as for the single cobweb dynamics We can get the recurrence equation for the price you saw it I mean, these are the recurrence equations and we can solve them In the same way that was shown in the notes For a single cobweb dynamics Right and I think in in the notes for this for this slide you have the solution for the price and market x Is that true? You have it right Yes The final solution so in the same way as I showed in the previous notes on slide 10. I believe you can find the the price How the price in market x At any given point of time Develops and obviously it's the same for market z because they're decoupled If you look at this solution there You can see that the stationary state is given by that by that quantity and again if you look at the At the solution you can see that the equivalent Of that minus beta over delta to the power of t is now this Right, it's now this So this is now Minus beta over delta and we want the absolute value of this to be obviously smaller than one just as before in order for us to get Stability of this equilibrium If you decide to normalize n times w to 1 which you can do It's simply a matter of normalization Then you are left with b over d Which is the exact equivalent of beta over delta that we had before on slide 10. I believe So it's the same dynamics as before no surprise markets are decoupled We shouldn't expect anything more And the behavior would be the same damp oscillations exploding oscillations so on but let's see what happens if we couple them The coupling is In terms of this w So basically the answer we the question we need to answer is how do suppliers choose One market over another You can probably come up with a lot of are a lot of Reasons why would one supplier choose x or z But we can probably all agree that a good kind of first step is to look at the profits Right, so suppliers would like to go into markets with higher profits So they would like to they wouldn't like to be in commodity markets. They would like to be in some kind of high-end Consumer electronics for instance Not everybody can do it though, but that's a different question so When you talk about this kind of decisions A very popular Function in a sense to model this kind of decision is the so-called logistics function You can you will probably encounter this function a lot in other courses, especially economics courses um And what it tells you is Let me see how I can explain it. So it gives you the whole spectrum of of Kind of short-sightedness if you'd like so on one end of the spectrum if you make a decision On one end of the spectrum you have the myopic Response myopic means short term Right, so you only look at the short term what happens tomorrow and you make a decision On the other hand you have the long term. So you look at You try to incorporate a lot of data from the past history In before you make a decision and this function models this This balance between short and long term sightedness in a sense. So let's let's look at it F Is This parameter which controls Where you are in this spectrum? Right f is the so-called sensitivity How fast suppliers change markets? Right So let's look at an example if f is zero F is zero meaning Suppliers so if that is zero the whole function is just one half So we have the decoupled markets again But that means that no matter what the profits are No matter what the profits are Suppliers don't care they would always be have a probability of one half to go to x or z. So in that sense They don't consider any information About the profits and this is this is what what says here. There is no response to market information You don't care at all in that sense. There is no sensitivity The the suppliers are not sensitive at all In the other extreme when f is infinite. So the sensitivity is infinite This is the myopic best response You only look in the I mean even the smallest change In the profits in one of the markets would immediately cause everybody to go there And let's take an example imagine F is infinitely big But the profits in both markets are zero Right so this would still be one half Assuming that producers would like to produce in markets where the profits are zero In fact, that's not such a strong assumption because as you know in perfect competitive markets the profits are zero So Profits are zero one half probability now imagine the profit in market x increases by just a little bit By by the smallest Unit of monetary value that you can imagine What happens then Since this is infinite that immediately becomes infinitely big that becomes infinitely big. This is still zero This is still one So that is infinitely big that is infinitely big that is one So in that sense this doesn't matter, but this ratio would be one So immediately the probability that you go to x to the market x Is one so everybody would go there. They're very sensitive The same thing for z right if z becomes if the profits in market z become just a little bit positive This is one. This is one, but this is infinity now And the whole thing would be zero so nobody would go to market x anymore right wx. This is wx All right, and this is the logistics function Yes here this one. Ah this one. Oh Yes, you're right. Uh, no Oh, yes, yes, yes, yes So it depends on the profits If if if the profits in market x Become slightly bigger Then wx would be one If the profits in market z becomes slightly bigger then x would be zero Right, but I mean this is the idea behind this this function and it's used a lot Right when f is infinite you have this myopic best response when f is not infinite It's possible to have suboptimal decisions Suboptimal meaning you don't go to the market with higher profits in the extreme when when f is zero You make wrong choices half of the time Right because the probability is one half Okay Let's look at the profits now um, the profits so all here the subscript always used to Identify both x and z markets Right, so if you want x just put x if you want z just put z always like combining them So the profits are obviously The revenue minus the cost the revenue is given by Obviously the the price Times the amount of stuff that you sell And the costs obviously are a function of Of how much you have produced in our example we suppose That the costs are quadratic Or non-linear non-linear would be a better better term The fact that they're quadratic is just one example of non-linear non-linearity So and okay, we look at I mean these are the costs And we can express the profits in in in this way These are the profits now in the two markets Question are they coupled the profits in the two markets? What do you think come again? Yes, so these are the profits in the two markets Market, uh, this is z Market z and market x Revenue minus cost revenue minus cost, you know, it's nothing nothing complicated So are they coupled the two profits? In the two markets Before we had the price but now we have the profits What do you think? No Yes It's either yes or no I mean Let's say they're independent they're individual The coefficients yes, they're individual These are the kind of questions that you should get right all the time because they Would probably be on the exam Exactly. I mean the prices are coupled We know that the prices are coupled through the w the w is this one Look the w is this one. Yeah The prices are couple the profits are coupled which means that the profits In market x influenced somehow the profits in market z And vice versa and how exactly they influence each other obviously depends on the parameters But Yes Right, so let's see what happens now When we put this into the computer and by the way the coupled cobweb dynamics would be also self-study But not today probably next week. So today is just the cobweb the normal cobweb When you get a hold of it Or hang of it how how to do it then you simply Make I mean copy paste you take the two cobwebs and you couple them with the w so it's It would be kind of a Easy self-study given the fact that you've done The cobwebs So here we choose I mean all these parameters a b c and d and and For now we assume that we have symmetric markets symmetric meaning that the sensitivity the supply and demand sense elasticity and Basic supply basic demand are all equal for both markets. They're perfectly symmetric In a sense consumers and suppliers in both markets are the same And we have chosen these parameters a is 20 b 6 c is 2 and so on doesn't matter The sensitivity though is important 0.17 Right, so it's not infinitely big. You're not Incredibly sensitive. I mean that also doesn't make sense to be incredibly sensitive, right? You wouldn't like to switch Uh in the latest change because probably have switching costs So if the profit is just increased by one rapid you probably wouldn't switch Anyway, and this is what we observe. So on here we have on the left side The left column is the price In market x and immediately to next to it is the price on market z And you can see that One relationship you can immediately uncover is When the price is high in market x It's correspondingly low in market z I mean you would expect that right if the price is high in market x That means that Uh in the next time period More suppliers would go there because the profits would be higher for high price But when more suppliers go there Uh the price would go down because you know, we would have more supply And we when we have more supply The price goes down. So in the next time period the price would go down And this is exactly what you see you see an oscillation between high low price high low high low For each single market, but obviously if the price is high in market x That means that there are not enough supply in market x most of the suppliers are in market z where the price is low Right, so they're kind of negatively correlated. It's something that that is no surprise. It makes sense The profits are correspondingly coupled In the same way. So when the profits are high in one market, they're low in the other market it's kind of trivial and The bottom most picture the weights or this w and I believe yeah, this is wx So this is the fraction of people which are a fraction of suppliers producing in market x And in market z would be one minus that so you see it kind of fluctuates We wouldn't call this chaos Would we I mean it It's not perfectly periodic, but it somehow we call it quasi periodic motion. So it's almost periodic I mean if you see like we have For the price You know, we have this one this one This one this one This one, I mean they they kind of look the same and in between this kind of Little jumps they're kind of similar So that's not perfectly periodic for sure But it's not chaos and this is what we get for The dependency on the sensitivity parameter f this is one of the most actually important parameters f the sensitivity So what we have? I mean, this is a phase space phase space plots the ones I showed in the self study so on the left most The top left corner. We have the price in market x Versus the price in market z and as I just told you they're negatively correlated Right very nicely negatively correlated very clear negative correlation, right on the market goes low High in market in in market x when the price goes high market x It goes low in market z and vice versa. So basically this dynamics would go like this like this Up down up down up down and so on This is for sensitivity 0.17. Whatever this means some sensitivity But now what happens when you increase the sensitivity by a little bit? And that means suppliers now become more sensitive to profit changes They would choose with higher probability the markets The market with higher profits and what what happens is given on the top right plot this is again price x versus price z They're still negatively correlated But not in phase anymore Not in perfect phase Right, so there would be some delay. I mean, this is why Now we have kind of an oval. It's similar to I think one of the self studies that we looked at There we had I think The population dynamics, I think rabbits and foxes Right, so there's two negatively correlated. I mean you can see If the price in market x increases So we go along this line The price in market y Sorry, this is the supply But okay, never mind. So the price in market x increases the supply In in market x would also increase. Oh, no, sorry. What is that? Yes. Oh here here We have to be looking at this plot. Sorry. So this is the price again the two prices They're still negatively correlated In phase But what is different now from the top row? Yes, the sensitivity is higher for sure. I mean that's kind of the a priori Assumption we we chose a higher sensitivity for the suppliers But how would you interpret the difference between the leftmost plot and The other one? Yes, exactly Exactly. So the amplitude of fluctuations. So this amplitude here Is higher, right? So I mean here you see the price fluctuates between what is that? I would say Um 10 maybe to I don't know 17 But here it's from 8 to 17 or even 18 Right, so there's a much larger fluctuation What is shown here is the price versus the supply in the same market market x And now these are again negatively correlated. I mean, of course when the price goes up So here So the price goes up The supply goes down I believe this should be supply in market z Yes, otherwise, it doesn't make sense Right. So if the price goes up And in market x The supply in market z should go down Because now more people come to market x because the price is larger there Yeah, so I will fix that in the notes Uh in the handout it should be supplying in in market z And again, if you increase the sensitivity what we change is simply the amplitude of these fluctuations There's still no chaos here They behave just as we would expect Just as in the previous slide Here right the price goes up in one market Profits go up in that market correspondingly the profits go down in the other market And then the whole thing changes again in the next time period But again, I mean not again, but the interesting thing is that we can get chaos And uh in the next two slides, I believe yes the next two slides We have a lot of bifurcation diagrams depending on these parameters Uh all the parameters actually so let's look at Parameter f the bottom left uh the bottom right plot This is the parameter f the sensitivity of the Of the suppliers and the price in market x So as long as the sensitivity is below Is some value 0.25 I believe The price is more or less stable, okay But as soon as the sensitivity is the price in market x but as soon as the sense sensitivity increases Past this uh bifurcation point Then the price becomes really chaotic It starts to behave really in a chaotic way And then you can see the typical stuff that you expect chaos Window in the chaos. So here we have a period Periodic oscillation with period 1 2 3 4 5 6 7 8 9 I would guess Right then again chaos then again windows in the chaos. It's a much richer Behavior than the logistics map Okay The parameter b What was the parameter b parameter b was the price derivative In fact one over b was the price derivative, but that's the slope If you think about it, it's the slope or one over b Is the slope of of the demand curve Again past some value of b The price becomes chaotic And if you look at this kind of funnel shape, right it goes like this You can also think that when we increase b The chaos increases in the sense that now The price can fluctuate not because these two values randomly But between These two values randomly so the range of fluctuation is much higher Right like this And the same thing for the parameter d, but the opposite thing parameter d was Now the one over d was the slope of the supply curve For you supply would be yeah the slope of this curve One over d. So when we decrease it actually So decreasing the slope means that it becomes more like that That's when we get chaos now Remember these are symmetric markets. So the parameter d would be the same in both markets And we get the chaos the same for the parameter c parameter c was the Supply which is always there even if we have zero price These are symmetric markets, but Obviously the markets are not symmetric We can choose different values for these parameters abc and d And in that example we've chosen d To be eight in market x and six in market z Again what we see are bifurcations, but now And that's the the thing that I'd like to close with now We have the parameter b in market z Influencing the price in market x Right. So the parameter b remember was the price derivative derivative of the demand or one over b So that's the slope of the demand curve If we increase the slope of the demand curve Suddenly we get chaotic behavior of the price in market x Right. So we changed The basic structure of one of the markets. So we kind of increased The demand slope By whatever policy we'd like and we created chaotic behavior in the price in market x The same thing for the supply the the price derivative of the supply When we decrease it in market z Again, we get chaotic behavior in market in the price in market x So what why is this important? And this is the last slide well First of all these are endogenously generated fluctuations They are generated by the structure of our system. They're not Kind of imposed from above somebody Introducing chaos into the markets They're just generated by the coupling of the two markets and the non-linearity in in the this coupling introduces And Now you can think about policies. So if you change something in one market, for example, you change you introduce whatever Let's say minimum minimum price or like Price ceiling so whatever you change this you play with the demand and supply curve somehow you change their slopes For instance in one market, this would have unexpected unforeseen consequence could have Unforeseen consequences into the coupled market Right. So if you have if you're in this regime here And you observe stable behavior of the price in market z But chaotic behavior in the price in market x One policy would be well, let's try to decrease the slope of the demand curve That would help If If you believe that the coupled cobweb describes your market, of course So this was today's lecture. The self-study is about the cobweb dynamics It's very easy. Oh Yes, there's the couple the cobweb dynamic. Where is it here? Yes, that's all see you on tuesday. Thank you