# == Test that nu has a real solution before assigning == #
warning_msg = """
Hint: you probably set government spending too {}. Elect a {}
Congress and start over.
"""
disc = a0**2 - 4 * a0 * b0
if disc >= 0:
nu = 0.5 * (a0 - sqrt(disc)) / a0
else:
print "There is no Ramsey equilibrium for these parameters."
print warning_msg.format('high', 'Republican')
sys.exit(0)
# == Test that the Lagrange multiplier has the right sign == #
if nu * (0.5 - nu) < 0:
print "Negative multiplier on the government budget constraint."
print warning_msg.format('low', 'Democratic')
sys.exit(0)
This is more for already-economists who want to learn the Python toolchain for their work, I think.
I do time series analysis (non-economic). So for example having a Kalman Filter python cookbook example is useful if I know the algorithms I want to use, but not the python libraries.
I'd say the specific topics covered (macro questions like optimal savings, optimal taxation, etc) are what makes it an economics text, although you're right that much of the technical topics covered are applications of non-econ-specific algorithms and modeling techniques.
Sargent is associated with "freshwater" macroeconomics. They tend to be very rigorous to the point of dropping topics considered important by other economists from their models.
Thomas Sargent was awarded the Nobel Prize in Economics in 2011 together with Christopher A. Sims "for their empirical research on cause and effect in the macroeconomy"
Stachurski's book goes into the underlying theory more deeply with code examples. It's also got a very good/practical introduction into real analysis and measure theory. Great resource for modern computational economics.
10 comments
[ 2.9 ms ] story [ 44.0 ms ] threadFor instance, here's how many times the following words appear in it:
I'm no quantatative Economist, but in what way is this an economics text, as opposed to just an algorithms/modeling text?(I'm not saying it ISN'T an economics text... I'm just hoping someone can genuinely answer my newbie question :-)
I do time series analysis (non-economic). So for example having a Kalman Filter python cookbook example is useful if I know the algorithms I want to use, but not the python libraries.
seems like pretty good stuff... but hey we can grep it and nitpick the title if we have nothing better to do.
Fellow laureate Krugman: "S and S played a key role in developing methods that let the data speak instead": http://krugman.blogs.nytimes.com/2011/10/10/go-princeton-and...
The models here however aren't econometric, they are for theoretical economics. The Kalman filter can be used for 10001 different things.