Skip to main content

Questions tagged [python]

Python is an interpreted and general-purpose programming language

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Modelling a likely unit root process with ARMA? HAC standard errors in python time series packages?

I am working on a project to forecast Canada's GDP. One of the exogenous variables for my ARDL model that I consider is the treasury spread. By plotting its ACF and PACF, I notice that it can be ...
Jun Yang's user avatar
-4 votes
0 answers
19 views

Presenting the OLS regression results in table

everyone. Can anyone help me to present the OLS regression result in the table? You can make them in one table. I have attached 6 pictures. I would be thankful if you can.
hadley's user avatar
  • 1
1 vote
1 answer
53 views

Value function iteration savings problem not working as expected

I'm coding a program in Python to find a numerical approximation of the value function $v:\mathbb{R}\to\mathbb{R}$ that solves the Bellman equation: $$v(a)=\max\limits_{a'}\left\{\ln\left(w+(1+r)a-a'\...
manifold's user avatar
  • 843
1 vote
0 answers
34 views

Cake eating problem with income over time

I'm trying to implement a solution to a dynamic programmig exercise (cake eating) in Python. Consider the following problem. An individual lives for 20 periods. In the first 15 periods he receives an ...
Calogero Sortino's user avatar
1 vote
1 answer
31 views

Plotting a variable over terciles

I am looking to create a figure using Stata, specifically a figure depicting the median change in financial constraints over the years, categorized by terciles of total assets and operating cash flow. ...
user282815's user avatar
1 vote
1 answer
161 views

Looking for guide to Industrial Organization numerical modeling in Python

Is there some guide or GitHub repository that shows how to program numerical version of IO models? I would like to learn how to simulate the general $n$-firm Cournot competition model, but I can ...
csilvia's user avatar
  • 2,734
0 votes
0 answers
13 views

Leave-one-out mean removal stringency histogram

I am trying to construct the kind of histogram described here (https://blogs.worldbank.org/impactevaluations/judge-leniency-iv-designs-now-not-just-crime-studies). I don't really feel like my code is ...
Nazarene's user avatar
0 votes
1 answer
85 views

confidence interval for standard deviation of bitcoin price

I am actually doing some research on bitcoin for my bachelor thesis. I have daily data on the price of bitcoin from here. I calculated with python: ...
BlankerHans's user avatar
1 vote
0 answers
62 views

Can the Mahalanobis distance measure ( as defined by Bloom, Schankerman, Reenen Econometrica 2013) between a firm and itself be greater than 1?

I am currently working on estimating a Knowledge Proximity measures for firms and wanted to replicate the Mahalanobis distance measure discussed in Appendix C.2 of Bloom, Schankerman, and Van Reenen (...
Milenko Andres Fadic's user avatar
6 votes
3 answers
1k views

Does julia's speed advantage over python make any difference for DSGE modeling?

When compared to Python the main selling point of Julia is its speed as it is often argued. However, from my own personal experience I never noticed any significant difference in speed between Julia ...
1muflon1's user avatar
  • 57.1k
1 vote
1 answer
381 views

Opportunities for Computer Science Graduates in the Field of Economics [closed]

I know this question has been asked quite a few times already but I have several other different questions to ask too. So, I am asking all of them here. Let me give you a quick summary of my ...
Shahriar Tasnim's user avatar
6 votes
0 answers
113 views

Solving Rational Expectation Models Linear vs. Nonlinear

Since I am coding some linear New Keynesian models in python and solving them under rational expectations (using the method of undetermined coefficients/linear time iteration), I was wondering whether ...
Suttungr's user avatar
0 votes
0 answers
54 views

Cost-optimal p2p-trade in a community of households

I’m trying to solve the following problem and I’ve been working on it for a long time already: I want to optimize electricity-costs in a smart grid. There’s producer and consumer households in the ...
ElLl's user avatar
  • 1
5 votes
4 answers
14k views

Python vs R (vs Stata): the old battle revisited

I am an avid Python user. I know Stata but I'm not a pro. I don't know R. I do econometrics (mostly time series, but also cross-section and panel), and statistics, and Python seems quite sufficient in ...
Jay's user avatar
  • 51
0 votes
3 answers
87 views

ROI and stock rates

I'm an engineer with minimal to zero knowledge about economical topics, please be patient with me if the following question makes no sense or is too basic ... Currently I'm working through the "...
wollud1969's user avatar
2 votes
0 answers
287 views

oTree: How to have unequal groups sizes, with agents ocasionally sitting out rounds

I'm designing an experiment that investigates the result of different groups sizes on the outcomes of Nash Demand games. I already programmed this experiment once in zTree, where we then conducted ...
Aydin Mohseni's user avatar
15 votes
3 answers
42k views

Outputting Regressions as Table in Python (similar to outreg in stata)?

Anyone know of a way to get multiple regression outputs (not multivariate regression, literally multiple regressions) in a table indicating which different independent variables were used and what the ...
Rajko Radovanovic's user avatar
7 votes
2 answers
3k views

Code finding all stable matchings in one-to-one problem

Do you know of any publicly available code in python or R (or any other free high level language) that returns all the stable matchings for any one-to-one matching problem? Note: This is related but ...
Martin Van der Linden's user avatar
1 vote
0 answers
39 views

Python package for discrete preferences

Do you know of a package allowing to create objects representing agents with (strict) preferences over (a finite set of) discrete objects $A,B,C,…$, and profiles thereof. A minimal requirement would ...
Martin Van der Linden's user avatar
4 votes
2 answers
1k views

Computing Boston and TTC in Python

This is somewhat of a follow up question to Available code for computing solutions to matching algorithms?. In the above question, I got great answers, but all of them were for ...
Martin Van der Linden's user avatar