Project to port Bloomberg API to D
Laeeth Isharc via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Sun Nov 9 06:49:31 PST 2014
About Bloomberg
--------------
Bloomberg provides a platform for market data, news, analytics,
and messaging to financial services firms and other organisations
with an interest in markets. There are some interesting
developments on the horizon but, for the time being, for
investment banks and hedge funds it remains the standard platform
for such.
Their API is public, and they provide implementations for C++, C,
Python, Java, and .Net amongst others.
Interesting for D?
------------------
The financial services space might be an interesting domain for D
because it's an economically important area where performance,
safety and productivity all matter, and none of the existing
solutions (mostly C, C++, Java, Python) are particularly
satisfactory. At the same time, people in finance do not tend to
be in the business of taking big technology risks with a product
not yet widely seen as industry standard because the costs of
messing up may be especially high (and messing up for creative
reasons is much less acceptable than if you follow the herd).
Perhaps in the face of new emerging realities regarding data set
sizes, memory speed, and single core processing power that
creates opportunity for more entrepreneurial participants to use
the best tool for the job. I certainly hope so.
People often want to see results quickly, so even if it's not
really much work to do the port, there might be a big difference
in the chance someone might consider trying (and then learning to
appreciate) D.
Beyond a mature numpy/pandas equivalent, the other missing piece
is an analytical library for derivative pricing and risk
management. QuantLib is the main open source project - it is
written in C++ but has D SWIG wrappers. (There is the Java
Opengamma too, but I am not so familiar with it). SWIG is not
great though, and I don't think the wrappers cover all the
functionality. (There was a project to port QuantLib to D but I
am not sure it ever got started, and it is now defunct).
It is super appealing to be able to rapidly prototype and explore
ideas about largeish data sets and have the results be fast,
knowing also that the code one has written can serve as the basis
for something used in production (thanks to strong typing,
elegant language design, etc). So I think there is a chance for
D to take off within finance for some uses.
Project status
--------------
So for my own purposes - but I hope they might benefit others - I
have ported the C headers and C examples to D. It's pre-alpha
status - everything compiles, but I need to start up a Windows
machine with Bloomberg to get it linking and get any bugs out of
the port.
I thought of holding back posting till they were perfect, but
decided to just post what I have in case anyone else should have
an interest. It may be that the C++ headers create a more
appealing interface, but I do not know the current status of C++
vs D interface as the dlang.org docs are stale. For the time
being the examples are just an ugly direct translation, with lots
of casts and not much attention paid to beauty and elegance. But
it's something, and a start.
Link
----
https://github.com/Laeeth/d-bloombergapi
Laeeth.
More information about the Digitalmars-d-announce
mailing list