[INTRO] JuliaFinance

#1

Hi everyone,

A few of us are interested in developing financial applications using Julia.

To date, the lowest hanging fruits have been in the domains of “quant” analysis and economics and each of those have respective organizations, e.g. JuliaQuant and QuantEcon etc.

In the latter part of 2015, I established JuliaFinance as an intentionally distinct GitHub organization. It’s remained mostly dormant since then largely because I’ve been with / founded 3 different insurtech startups during this time and each one had different takes on open source (plus I’ve been crazy busy as a serial entreprenuer :sweat_smile:).

What is the difference between JuliaQuant and JuliaFinance?

The question has recently come up, so I thought I’d address it here. I am not an economist although I’ve worked with many of them, but I don’t think I’d go out on a limb to say that QuantEcon is to Economics what QuantFinance is to Finance. Adding a “Quant” prefix to both of them is almost redundant since both are so heavily quantitative in nature anyway.

However, in the world of finance, the standalone word “Quant” is short for “Quantitatve Analyst” and has some very specific connotations. I would define a “Quant” as a highly-skilled (usually having advanced degrees in maths / physics / engineering / finance) finance professional who is primarily interested in the numerical modeling of derivatives or other complex financial instruments with the ultimate goal of supporting trading activity. Trading acivity support can come from a broad range of areas including time-series analysis, arbitrage pricing, risk management, trading algorithms etc. There are several types of quants all satisfying this broad description and here is a decent description of some of them (just found via Google :sweat_smile:)

So I see JuliaQuant as an organization for “Quants” or those interested in learning about “Quant” stuff.

However, quantitative finance is much more than just about what quants do, so JuliaFinance is intended to be more encompassing.

For example, the first repo contributed to JuliaFinance comes from @fengyang.wang’s (a.k.a. TotalVerb’s) Currencies.jl. Currencies.jl is a nice building block since every financial package should involve currencies in some form.

I recently split out the key module from Currencies to CurrenciesBase. There remain some modules in Currencies pertaining to baskets of currencies and valuation of currencies via market exchange rates that are useful for more general portfolios than just currency baskets so I see these modules being split into separate portfolio / market-based packages at some point and then CurrenciesBase being renamed back to Currencies and will focus on currency as a unit of measure (which is the purpose of CurrenciesBase).

The second package contributed to JuliaFinance recently is DayCounts.jl by myself and @simonbyrne. DayCounts is another foundation package needed for pricing fixed-income securities among other things.

Roadmap

There is no clear roadmap at this time, but the general direction I would like to go with JuliaFinance pertains to issues of relevance to a global financial institution starting with accounting and financial reporting following by balance sheet projections for strategic planning and risk management.

Personally, my primary interest is capital management including asset and liability management with a focus on insurers and asset managers. I also like the philosphy of a company called OpenGamma, which is an open-source trading and risk management platform. I think most of what we build in Julia can and should be open source with revenue opportunities in the form of SaaS and consulting.

I am not a member of JuliaQuant, but I actually see some value in combining forces and maybe moving the JuliaQuant stuff into JuliaFinance and I’m happy to make the owners of JuliaQuant owners of JuliaFinance as well (and some probably already are). Up to you obviously :slight_smile: There is a chance Julia Computing will open source Miletus.jl, but then a question will be “Which organization? JuliaQuant or JuliaFinance”. My preference would be to put it in JuliaFinance, but if JuliaQuant still exists as a separate organization, it may make more sense to put it there, which I would consider slightly unfortunate, but not the end of the world :blush:

I am excited about the opportunities ahead for bringing Julia to the world of quantitative finance including quantitative analysis as well as insurance and wealth management :rocket:

8 Likes

#2

To be honest (and selfish) and ignorant (because this might totally not fit the bill), I’d be happy to see some personal or small company finance stuff :slight_smile:

4 Likes

#3

Sounds good :smiley::+1:

Personal finance is perfectly fine for JuliaFinance :blush:

0 Likes

#4

I think that would be a sensible course.

An addition, I think the name is better, as “quant” suggests a scope that is narrower than finance.

6 Likes

#5

In this regard, when I first read “quant” I thought of quantum physics :slight_smile:

5 Likes

#6

Glad that JuliaFinance has been resurrected! I’ve always been a little bummed that we didn’t have a strong financial tooling ecosystem.

0 Likes

#7

I find quantlib covers most of my needs. What is lacking is a package that can conviniently deals with tick by tick quote data and API to financial database like Bloomberg

1 Like

#8

I’m interested in this domain too. I looked primarily at JuliaQuant earlier which to me looks largely abandoned. If you want to explore models and how they perform while trading this seemed to have a nice range of features so I’m wondering whether it makes sense to resurrect it and port it to Julia 1.0 or if it should just be rewritten entirely. Maybe some of the other packages mentioned overlap significantly and are better bets for further development. It would be cool if at least there was only one org doing finance. Would also be happy to contribute. :blush: Any thoughts on this?

1 Like

#9

see this tweet https://twitter.com/JAmos125/status/1093125609084076033 by @dysonance

2 Likes

#10

I would be very interested to contribute if JuliaComputing open Miletus.jl with a liberal license. I’ve been working on a very similar idea, taking the pricing further to automatically map into Risk Factors and get portfolio risk metrics like Value-at-Risk, given just the contract definition based on the same article. cc @simonbyrne

3 Likes

#11

On Slack, Simon mentioned they are considering to open source Miletus :pray:

4 Likes

#12

I put some more thoughts on Github here.

2 Likes

#13

I think (re-)starting JuliaFinance is a great idea.

There are a couple of packages in JuliaQuant that work with v1.0, MarketData and FinancialDerivatives - MarketData is used in a couple of books (including mine) and has a download interface to Fred (Yahoo is defunct).

MilkTrader’s old Quandl.jl needs a bit of work mainly to change the HTTP request and I’m willing to do that if Dan Wlasiuk has lost interest.

The QuantLib wrapper package would be good to check on and get working too.

2 Likes

#14

Any maintainers of JuliaQuant around? Any interest in consolidating under JuliaFinance?

Any other packages? In particular, Quandl.jl would be great to have in JuliaFinance :pray:

WorldBankData.jl would also be good.

I’m thinking about creating a MarketData (or something) package akin to Plots, where you can plug in various data backends.

0 Likes

#15

I think AlphaVantage.jl would be a good addition.

1 Like

#16

What the status on this one?
I am writing a piece of code to connect to crypto-exchange and which could greatly benefit from standardized MarketData type.

0 Likes

#17

Hi @roshii,

It is a good time to pick this up :+1:

I’ve been distracted since my last update:

The next step back then was to do some work on FinancialInstruments whose pricing will depend on Markets.

Since you are interested in cryptocurrency, it is worth pointing out an important aspect of JuliaFinance we’ve discussed at length in several roadmap issues. It would be good if you can keep these in mind if you want to be compatible with our plans with JuliaFinance (which I hope you do :slight_smile: ) .

Currencies (and Countries for that matter) are a little special. On the one hand, a currency is just a label. We can use this label for various purposes, e.g. UI selections, and when currency is used just as a label, it is overkill to bring in market info such as exchange rates, FX markets, etc.

On the other hand, currencies are also tradable financial instruments. When you want to deal with cryptocurrency as a tradable financial instrument, it should be a FinancialInstrument. The good news is that once your PR is merged, all the cryptocurrencies you added to Currencies will automatically become FinancialInstruments :slight_smile:

Speaking of which, when I look at FinancialInstruments, it reminds me, we may want some special treatment for cryptocurrencies compared to traditional currencies issued by a central bank after all because the name I gave for currency as a financial instrument was “Cash”. I’m not sure that would be appropriate for a cryptocurrency though. What would you call a position in cryptocurrency? “Cash”? “Crypto”? Something else?

Once we settle how to properly deal with cryptocurrency as a financial instrument, the next thing to do would be to construct a market for cryptocurrencies. For that, off the top of my head, I imagine a Market called “Crypto”. Within that Market, you will have multiple Exchanges and each Exchange will provide buy/sell quotes for the crptocurrencies listed on that Exchange. We could make some friendly defaults, e.g. a default market with a default exchange.

It is the Exchange that would connect to the actual exchange to provide market quotes.

Now that you are making good progress and pushing things with cryptocurrencies, I’ll try to help out to ensure what you are working on can fit into a bigger picture.

Anyway, rather than bikeshed here, let’s discuss details on GitHub :slight_smile:

2 Likes