From 04495d0204f4605e38fb57fdb522e66ca4176327 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Tue, 16 Jul 2024 21:57:24 -0400 Subject: [PATCH] fix escapes --- open_cge/aggregates.py | 10 +++++----- open_cge/firms.py | 22 +++++++++++----------- open_cge/household.py | 6 +++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/open_cge/aggregates.py b/open_cge/aggregates.py index f9c3245..5699ca9 100644 --- a/open_cge/aggregates.py +++ b/open_cge/aggregates.py @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/open_cge/firms.py b/open_cge/firms.py index dd6d7f8..b6fedb2 100644 --- a/open_cge/firms.py +++ b/open_cge/firms.py @@ -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 @@ -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 @@ -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) @@ -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) @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/open_cge/household.py b/open_cge/household.py index 05abd24..765f1bf 100644 --- a/open_cge/household.py +++ b/open_cge/household.py @@ -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 @@ -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 @@ -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