Finance and Economics Use Cases


To follow up on this thread. I don’t think there is a lot of activity on this domain of the forum because our cases are not specific to economics/ finance. Maybe with more users in the future there could be some conversation on how to solve model x, but as already mentioned above: solving a model is solving a (system of) equations, so plenty of non economists have those problems.
I’m trying to say that activity on this domain of the forum might not be representative of Julia usage among economists.
We all know that Julia has all the ingredients to replace the good old ways. Whether and when that will happen is uncertain, and similar to general adoption of Julia. In economics, Getting seniors to switch is almost impossible- what works, works. That’s why this is going to change mainly at a rate of annual new students having been exposed to Julia, and that’s why I’m teaching it to our grad students.


I would expect that there must be a subset of people who program heavily in existing languages (mostly Matlab) who are sufficiently annoyed by its shortcomings to switch. This is reflected by the constant experimentation with new approaches (eg in the Python ecosystem).


I’m working on a package (DiscreteChoice.jl) for estimating discrete choice models including logit and mixed logit. Should be ready in a couple of weeks.


For me my main attachment to Stata is the panel data tools. It’s extremely convenient to be able to do:

xtset person year
reg D.wage D.X $controls


The panel data package I developed (soon to be released) has the following syntax

model = EconometricModel(formula::StatsModels.Formula,
                         options::Dict{Symbol,Any} = Dict{Symbol, Any}())
formula = @formula(y ~ a + b * c)
options = @modelops(estimator = RE, vce = hc2,
                    PID = PID, TID = TID)

The API is quite familiar


etc… It supports the StatsBase.RegressionModel API.
For fixed effects, @formula(y ~ a + b + (absorb = fe1 + fe2)),
For first-difference @modelops(estimator = FD) # Categorical variables are not differenced


For Quantlib, once 0.7 gets into release candidate stage, i plan on updating it so it is 0.7/1.0 compatible.


I really like the FinancialToolbox package:

It has exactly the same syntax as Matlab, which allows me to seamlessly translate my Matlab code into Julia code.


For example, the SQL-type logic is not fully developed in Julia. I have run into issues where DataFramesMeta and Query couldn’t complete the tasks I was doing in SAS. Conditional joins are one such example.


Personally, I’ve always felt that one of the best use cases for Julia in this general domain is for researching and developing systematic trading strategies. I think the language constructs and features show great promise for making it a highly productive language for prototyping an idea quickly, and also tuning/optimizing the parameters to a trading model. This is a problem space that can become quite computationally expensive, particularly when testing against lots of data and/or somewhat complicated trading rules.

There’s tools in competing languages to this type of work, like quantstrat in R and zipline in Python, but I’ve never found any to be very intuitive. And I think Julia could solve a lot of the deficiencies with these tools by (A) solving major performance issues with both, and (B) using language features like metaprogramming to make things more intuitive to use.

I’ve been working on some packages aimed at making things more productive in this area. (Warning: shameless plug ahead :slight_smile:). If there’s anyone else interested in this space out there, I’d be happy to discuss it more and/or work together on further building out some of the packages I’ve been working on, or else just get some feedback on how to make them better.


I was browsing the Equality of Opportunity project website and noticed they’re explicitly hiring RAs with Julia experience. They say “especially those with programming experience in Stata, SAS, R, Python, and Julia.”

I wonder what they’re using it for. They get access to really interesting data (U.S. tax, census microdata)


I suspect that’s just become part for the course. Anytime anyone is looking for data goons Julia comes up in pretty much the same breath. I’m not complaining.


Is your package already out?


QuantEcon seems a nice website both for teaching and general introduction to Julia as well. It is pretty much complete for stated contents, so I think pace of developement is not an issue now. I just wish the course had more econometrics focus as well.


Close as it is part of my dissertation which I am defending next semester. Waiting on the last few things such as StatsModels new internals.

As of QuantEcon, I am a developer for the ecosystem (package / lectures) and we released the updated Julia lectures yesterday (

We were debating on whether to include more econometrics lectures. Right now we want to prioritize maintaining and improving the current material, but I will probably contribute my material for econometrics during the next academic year. It will probably be Generalized Linear Models through Fisher Scoring covering count, categorical (nominal and ordinal), continuous, instrumental, robust vce, and panel data.

Note that the source code for the lectures is now open source and PR to the Github repository are welcome (e.g., contributing new material).