Hacker News new | past | comments | ask | show | jobs | submit login
Quantitative Economics with Julia [pdf] (quant-econ.net)
119 points by bernatfp on Feb 10, 2015 | hide | past | favorite | 22 comments



This is a really well written book, and really makes the subject matter come alive with programming. Of course, I personally also love the fact that they have a Julia version.

For those who may not know, Prof. Sargent was awarded the Nobel Prize in Economics in 2011. Also, kudos to the Sloan Foundation for funding this work. I wish there were more high quality textbooks of this kind.


I thinks it's great that 2 well known economists with household names in the academy have taken to marketing programming to economists. I just wish they would have called this venture something other than Quantitative Economics when they launched it last year. It's not that it's the wrong name, it is just misleading.

A better name would have been Quantitative Macroeconomics, because that is clearly the target market. Yes, I know there are some generic topics in there like Linear Algebra that both micro and macro economists could use, but it's not like there is a lack of numpy and scipy examples on the Internet.


Job search is not macro..it's micro


There are applications of job search in both micro and macro (I happen to have written a PhD dissertation involving a micro approach to job search).

The treatment in the book we are discussing is decidedly macro, and looks generally similar to the treatment in a previous Sargent book titled "Recursive Macroeconomic Theory."


What are you talking about? Did you even look at their section on job search? It is most definitely a macro application.

Disregarding the fact that job search is a subtopic of unemployment, one of the main concepts in macro, you'll notice their model parameters are human capital, investment, and wage. The only quasi micro flavor of that model is search effort as these variables will almost always be in equilibrium based on some kind of an optimal stopping rule. Whether that rule has to do with finding a new job or discovering information about, say, the prices in the market dictates whether it would be a micro or macro use case. Again, if you actually looked at the model, their optimal stopping rule is when the person finds another job. And once again, the idea of jobs are the main ingredient in the concept of unemployment.... a macro topic. Not to mention, whether or not I'm searching for a job dictates whether I'm factored into the unemployment rate or not.

So..... yeah, job search is definitely not micro.


From Wikipedia

In microeconomics, search theory studies buyers or sellers who cannot instantly find a trading partner, and must therefore search for a partner prior to transacting.

Search theory has been influential in many areas of economics. It has been applied in labor economics to analyze frictional unemployment resulting from job hunting by workers.

https://en.m.wikipedia.org/wiki/Search_theory


Yeah, this is why wikipedia is not always the most trustworthy source.

I definitely studied these types of models in macro classes from Pissarides, one of the pioneers in the job search field. I think he'd be amused to learn that he had become a microeconomist.

Also, if you look at the example, it is taken directly out of Sargent's textbook: Recursive Macroeconomic Theory.


I didn't imagine Julia had the maturity to have a book like this written about it. Dives in

Does anyone have anything to say about Julia's benefits vs R or even Python (SciPy, Numpy, etc)? I'm in a machine learning course this semester and we have a choice of language and I'm wondering if its worth it to try and use Julia rather than Python since its so hip. (Just kidding about it being hip, but it would be interesting to learn something with increasing developer support).


In my opinion, as a contributor to Julia and someone who teaches machine learning with R - start with R. Things will "just work" for the most part and you won't have to worry about whether your packages will work while you are learning ML. I recommend using the "caret" package in particular: it puts all the ML packages behind a nice common interface and has goodies like crossvalidation and train/test splits built in.

Python with Scikit-learn could be a good choice too from everything I hear (possibly even better, by some accounts).

To be clear, Julia is more than capable of doing ML, but I'd say that interface-wise its not quite there yet. Most of the pieces are there, everything from DataFrames to wrappers for GLMNet to random forests, and even the deep learning library Mocha.jl (check it out, its fantastic!). If you were to implement a new ML algorithm, I'd want to be doing it in Julia - it'll perform great without having to get in a multi-language scenario (like R+Rcpp or Python+???[numba?]).


Cython is usually the most best option for maintainable, high performance numerics with Python these days -- it's the option of choice for scikit-learn and pandas. Numba can be easier in some cases (no manual typing necessary) but is still pretty limited in some ways.


Is numba poised to overcome these limitations at some point?


There was the one time I created a random forest in Julia because I was frustrated with the training time in R. It completed training in less than 1/20th the time that R did.

And then 2 weeks later, it wouldn't compile. Ah, the joys of the cutting edge.


I have run into several such issues with Python and R as well. Especially with CRAN packages which are often poorly written, black boxy, and don't have intuitive syntax.


how can an R package be "black boxy"? just look at the source. all the rf packages I am aware of (randomForest, party, and randomForestSRC) are well documented.


As it happens, I recently completed a machine learning class, and I used Julia for almost all of the exercises. The core language is outstanding for this use case; IMO, where it suffers is lack of third-party libraries. I wasn't able to find a visualization library I really liked, and for the more advanced work, I wound up using PyCall[0] to call out to Python in order to use Scikit-learn.

I'd say give it a shot. Julia is a really impressive language. I find it as easy and expressive as Python, but it's blazingly fast, offering near-native performance.

[0] https://github.com/stevengj/PyCall.jl


I'm not in a position to rate Python vs. Julia, but the lecture notes were originally published using Python.

You can access the Python lectures from: quant-econ.net

It even has a comparison: http://quant-econ.net/python_or_julia.html


I took a machine learning course last spring, and I also had the choice of language to use. I thought about Julia, but I just felt I was going to be taking on to much in a short amount of time.

I ended up using Weka for parts of the class, and python using scikit-learn for the other parts.

However, I would say I am regretting not trying R. The other students in my course really liked it.



I'm not sure why the PDF was chosen as the submission. The PDF says:

> Note: You are currently viewing an automatically generated PDF version of our on- line lectures, which are located at http://quant-econ.net Please visit the website for more information on the aims and scope of the lectures and the two language options (Julia or Python). This PDF is generated from a set of source files that are orientated towards the website and to HTML output. As a result, the presentation quality can be less consistent than the website.

And, indeed, the website is very nice. It'd be nice to change the link to the website.


The Julia PDF file is 396 pages long, while the Python one is 549 pages long. Hmm :)


What are you implying?


Only Nobel price winning economists think that inflation works. Krugman and now this dude. Not to mention stuff like giving away nobel prices for "encouragement".

I feel really sorry for physics, chemistry and other researchers who must be really worth something to get this prize just to have a moron believing that printing money solves economic issues sitting next to him.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: