Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# and NMath for Computational Finance and Econometrics

Tags:

c++

c#

math

d

nmath

I am currently (mostly) using C++ for computationally intensive econometrics in my research. I have been wanting to move to a more productive environment. D sounds promising, but perhaps not mature enough for me to be fully productive currently. I came across C# and the NMath library recently. It seems very impressive. Is anyone using these to such an end? What are your experiences? I am willing to give up some run-time speed if it boosts my productivity overall (tenure clock is ticking). You thoughts and suggestions appreciated!

like image 345
TJB Avatar asked Feb 16 '12 23:02

TJB


2 Answers

I work for an economics firm (EMSI) and we use D for most of our high-performance computation needs. The native speed and efficiency are critical, but it provides a higher-level of abstraction than C and fewer gotchas than C++ (IMHO). It's very simple to interface with BLAS, Intel MKL, etc. which we use to power the massive matrix operations behind our realtime I/O models. One nice thing about D productivity-boosting that is often overlooked is the blazingly-fast compiler--I never bother with progressive builds, even on very large projects.

like image 121
Justin W Avatar answered Sep 29 '22 23:09

Justin W


My recommendation goes towards ILNumerics. It seems to be one of the fastest libraries around. It went commercial several month ago but I have been using it since years already, formerly as open source library.

We had to convert masses of Matlab code for deploying an application to customers. ILNumerics was our first (and basically the only) choice, since it uses the same syntax as Matlab. Also, its array classes can handle n dimensions and lot of subarray stuff which was important to us as well. You'll find a nice code sample here.

In my opinion, the only drawback: lack of specialized functions for engeneering and only basic statistics implmented. So it is very convenient to build your own algorithm (using std, cov, var, mean, abs etc.) then unpacking any HILO-whatever indicator out of the box.

like image 34
user492238 Avatar answered Sep 30 '22 00:09

user492238