Skip to content

Commit

Permalink
fix escapes
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Jul 17, 2024
1 parent f6a2df9 commit 04495d0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions open_cge/aggregates.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def eqSp(ssp, pf, Ff, Fsh, Trf):
Total household savings.
.. math::
Sp = ssp \cdot \left(\sum_{h}pf_{h}Ff_{h} \\right)
Sp = ssp \cdot \left(\sum_{h}pf_{h}Ff_{h} \right)
Args:
ssp (float): Fixed household savings rate
Expand All @@ -24,7 +24,7 @@ def eqKd(g, Sp, lam, pq):
Domestic capital holdings.
.. math::
K^{d} = \\frac{S^{p}}{g\sum_{i}\lambda_{i}pq_{i}}
K^{d} = \frac{S^{p}}{g\sum_{i}\lambda_{i}pq_{i}}
Args:
g (float): Exogenous long run growth rate of the economy
Expand Down Expand Up @@ -63,7 +63,7 @@ def eqKk(pf, Ff, R, lam, pq):
Capital market clearing equation.
.. math::
KK = \\frac{pf * Ff}{R \sum_{i}\lambda_{i}pq_{i}}
KK = \frac{pf * Ff}{R \sum_{i}\lambda_{i}pq_{i}}
Args:
pf (1D numpy array): The price of factor h
Expand All @@ -85,7 +85,7 @@ def eqbop(pWe, pWm, E, M, Sf, Fsh, er):
Balance of payments.
.. math::
\sum_{i}pWe_{i}E_{i} + \\frac{Sf}{\\varepsilon} = \sum_{i}pWm_{i}M_{i} + \\frac{Fsh}{\\varepsilon}
\sum_{i}pWe_{i}E_{i} + \frac{Sf}{\varepsilon} = \sum_{i}pWm_{i}M_{i} + \frac{Fsh}{\varepsilon}
Args:
pWe (1D numpy array): The world export price of good i in foreign
Expand Down Expand Up @@ -174,7 +174,7 @@ def eqpk(F, Kk, Kk0, Ff0):
r"""
Comparing capital demand in the model and data.
..math:: \sum_{i}F_{h,i} - \\frac{Kk}{\\Kk0} \cdot Ff0
..math:: \sum_{i}F_{h,i} - \frac{Kk}{\Kk0} \cdot Ff0
Args:
F (2D numpy array): The use of factor h in the production of
Expand Down
22 changes: 11 additions & 11 deletions open_cge/firms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def eqpy(b, F, beta, Y):
Production function.
.. math::
Y_{i} = b_{i}\prod_{h}F_{h,i}^{\\beta_{h,i}}
Y_{i} = b_{i}\prod_{h}F_{h,i}^{\beta_{h,i}}
Args:
b (1D numpy array): Scale parameter for each good i
Expand Down Expand Up @@ -105,7 +105,7 @@ def eqFsh(R, Kf, er):
Domestic profits that are repatriated to foreign owners of capital.
.. math::
Fsh = R \cdot Kf \cdot \\varepsilon
Fsh = R \cdot Kf \cdot \varepsilon
Args:
R (float): Real return on domestic capital
Expand All @@ -124,7 +124,7 @@ def eqpe(er, pWe):
World export price equation.
.. math::
pe_{i} = \\varepsilon \cdot pWe_{i}
pe_{i} = \varepsilon \cdot pWe_{i}
Args:
er (float): The real exchange rate (foreign/domestic)
Expand All @@ -142,7 +142,7 @@ def eqpm(er, pWm):
World import price equation.
.. math::
pm_{i} = \\varepsilon \cdot pWm_{i}
pm_{i} = \varepsilon \cdot pWm_{i}
Args:
er (float): The real exchange rate (foreign/domestic)
Expand All @@ -160,7 +160,7 @@ def eqQ(gamma, deltam, deltad, eta, M, D):
CES production function for the importing firm.
.. math::
Q(i) = \gamma_{i}\left[\delta^{m}_{i}M^{\eta_{i}}_{i} + \delta^{d}_{i}D^{\eta_{i}}_{i}\\right]^{\\frac{1}{\eta_{i}}}
Q(i) = \gamma_{i}\left[\delta^{m}_{i}M^{\eta_{i}}_{i} + \delta^{d}_{i}D^{\eta_{i}}_{i}\right]^{\frac{1}{\eta_{i}}}
Args:
gamma (1D numpy array): Scale parameter for CES production function
Expand All @@ -182,7 +182,7 @@ def eqM(gamma, deltam, eta, Q, pq, pm, taum):
Demand for imports.
.. math::
M_{i} = \left(\gamma^{\eta_{i}}_{i}\delta^{m}_{i}\\frac{pq_{i}}{(1+\\tau^{m}_{i})pm_{i}}\\right)^{\\frac{1}{1-\eta_{i}}}Q_{i}
M_{i} = \left(\gamma^{\eta_{i}}_{i}\delta^{m}_{i}\frac{pq_{i}}{(1+\tau^{m}_{i})pm_{i}}\right)^{\frac{1}{1-\eta_{i}}}Q_{i}
Args:
gamma (1D numpy array): Scale parameter for CES production function
Expand All @@ -205,7 +205,7 @@ def eqD(gamma, deltad, eta, Q, pq, pd):
Demand for domestically produced goods from importers.
.. math::
D_{i} = \left(\gamma_{i}^{\eta_{i}}\delta^{d}_{i}\\frac{pq_{i}}{pd_{i}}\\right)^{\\frac{1}{1-\eta_{i}}}Q_{i}
D_{i} = \left(\gamma_{i}^{\eta_{i}}\delta^{d}_{i}\frac{pq_{i}}{pd_{i}}\right)^{\frac{1}{1-\eta_{i}}}Q_{i}
Args:
gamma (1D numpy array): Scale parameter for CES production function
Expand All @@ -227,7 +227,7 @@ def eqpd(gamma, deltad, eta, Q, pq, D):
Price of domestically produced goods from importers.
.. math::
pd_{i} = \left(\gamma_{i}^{\eta_{i}}\delta^{d}_{i}pq_{i}\\right)\left(\\frac{D_{i}}{Q_{i}}\\right)^{\eta_{i}-1}
pd_{i} = \left(\gamma_{i}^{\eta_{i}}\delta^{d}_{i}pq_{i}\right)\left(\frac{D_{i}}{Q_{i}}\right)^{\eta_{i}-1}
Args:
gamma (1D numpy array): Scale parameter for CES production function
Expand All @@ -249,7 +249,7 @@ def eqZ(theta, xie, xid, phi, E, D):
Exporting firm production function.
.. math::
Z_{i} = \\theta_{i}\left[\\xi_{i}^{E}E_{i}^{\phi_{i}} + \\xi_{i}^{D}D_{i}^{\phi_{i}}\\right]^{\\frac{1}{\phi_{i}}}
Z_{i} = \theta_{i}\left[\xi_{i}^{E}E_{i}^{\phi_{i}} + \xi_{i}^{D}D_{i}^{\phi_{i}}\right]^{\frac{1}{\phi_{i}}}
Args:
theta (1D numpy array): Scaling coefficient of the ith good transformation from domestic output to exports
Expand All @@ -271,7 +271,7 @@ def eqE(theta, xie, tauz, phi, pz, pe, Z):
Supply of exports.
.. math::
E_{i} = \left(\\theta_{i}^{\phi_{i}}\\xi^{E}_{i}(1+\\tau^{z}_{i}\\frac{pz_{i}}{pe_{i}})\\right)^{\\frac{1}{1-\phi_{i}}}Z_{i}
E_{i} = \left(\theta_{i}^{\phi_{i}}\xi^{E}_{i}(1+\tau^{z}_{i}\frac{pz_{i}}{pe_{i}})\right)^{\frac{1}{1-\phi_{i}}}Z_{i}
Args:
theta (1D numpy array): Scaling coefficient of the ith good transformation from domestic output to exports
Expand All @@ -294,7 +294,7 @@ def eqDex(theta, xid, tauz, phi, pz, pd, Z):
Demand for domestic goods by exporters.
.. math::
D_{i} = \left(\\theta_{i}^{\phi_{i}}\\xi^{D}_{i}(1+\\tau^{z}_{i}\\frac{pz_{i}}{pd_{i}})\\right)^{\\frac{1}{1-\phi_{i}}}Z_{i}
D_{i} = \left(\theta_{i}^{\phi_{i}}\xi^{D}_{i}(1+\tau^{z}_{i}\frac{pz_{i}}{pd_{i}})\right)^{\frac{1}{1-\phi_{i}}}Z_{i}
Args:
theta (1D numpy array): Scaling coefficient of the ith good transformation from domestic output to exports
Expand Down
6 changes: 3 additions & 3 deletions open_cge/household.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def eqF(beta, py, Y, pf):
Factor demand.
.. math::
F_{h,j} = \\beta_{h,j}\\frac{py_{j}}{pf_{h}}Y_{j}
F_{h,j} = \beta_{h,j}\frac{py_{j}}{pf_{h}}Y_{j}
Args:
beta (2D numpy array): Cost share parameter for factor h in
Expand All @@ -25,7 +25,7 @@ def eqI(pf, Ff, Sp, Td, Fsh, Trf):
Total income of consumers.
.. math::
I = \left(\sum_{h}pf_{h}Ff_{h} - S^{p} - T^{d}- FSH - TRF\\right)
I = \left(\sum_{h}pf_{h}Ff_{h} - S^{p} - T^{d}- FSH - TRF\right)
Args:
pf (1D numpy array): The price of factor h
Expand All @@ -47,7 +47,7 @@ def eqXp(alpha, I, pq):
Demand for production good i by consumers.
.. math::
X^{p}_{i}= \\frac{\\alpha_{i}}{pq_{i}}I
X^{p}_{i}= \frac{\alpha_{i}}{pq_{i}}I
Args:
alpha (1D numpy array): Budget share of good i
Expand Down

0 comments on commit 04495d0

Please sign in to comment.