Skip to content

Commit

Permalink
update explantion text for create_market function
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Feb 19, 2024
1 parent 0b81954 commit 046db95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lectures/intro_supply_demand.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,16 @@ Market = namedtuple('Market', ['d_0', # demand intercept
's_0', # supply intercept
's_1'] # supply slope
)
```

The function below creates an instance of a Market namedtuple with default values.

```{code-cell} ipython3
def create_market(d_0=1.0, d_1=0.6, s_0=0.1, s_1=0.4):
return Market(d_0=d_0, d_1=d_1, s_0=s_0, s_1=s_1)
```

This `Market` namedtuple can then be used by our `inverse_demand` and `inverse_supply` functions.
This `market` can then be used by our `inverse_demand` and `inverse_supply` functions.

```{code-cell} ipython3
def inverse_demand(q, model):
Expand Down

0 comments on commit 046db95

Please sign in to comment.