C# and NMath for Computational Finance and Econometrics
Asked Answered
L

3

5

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!

Liberalism answered 16/2, 2012 at 23:43 Comment(0)
C
1

I assume you are refering to Centerspace's NMath product?

We have recently started using them in a production application; albeit very lightly so far (performing a linear regression to determine the relationship between GJ of gas input to a gas turbine vs MW out; technically this is a feature of NMath Stats). It has been a pleasure to use so far, and their support was very quick in responding to an expired evaluation license whilst waiting for our finance department to process their invoice.

As far as performance is concerned, it does use the Intel Math Kernel Library where it can, so performance should be good; it hasn't caused any negative performance impact for our limited use.

I'm looking forward to using the library elsewhere in our application as it is appropriate!

Considering answered 16/2, 2012 at 23:51 Comment(3)
Interesting! Are you able to recommend its array features? We have a lot of large matrix and 3-d array manipulation in tight loops. I was testing their library years ago and at this time memory was exploding and array features did not exist really? I wonder, if this situation has improved since than?Gerardogeratology
@James: thanks for your input. I think I will give it a try and see how I like it. It is nice to know it is working well for you. Sounds very promising.Liberalism
You shouldn't expect any drop in runtime performance. Our product uses Intel's Math Kernel Library, as James says, and so do our competitors. The execution time is largely inside MKL for any significant computations. The linear regression function ends up doing decompositions using LAPACK (MKL).Habitat
I
10

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.

Incomprehensible answered 17/2, 2012 at 17:13 Comment(4)
Very interesting. What do you do for optimizers, random number generators, statistical distributions? Roll your own? I think have been looking at D with a very watchful eye. It seems to offer a lot of promise for computational econometricians. I would love to hear more of your experiences.Liberalism
Thus far we've mainly rolled our own or used existing C libs (there are a number of quite good FOSS ones and D uses C's ABI). We primarily work with extremely large quantities of hard data (it's what we're known for) and most of our theoretical work is directly applied, so perhaps our experience is rather different from what you're looking for.Incomprehensible
I done some more reading about D. I'm very interested in how you are using D at EMSI. Would you be willing to chat privately? Many thanks!Liberalism
Sure. You can find my email address on the D newsgroup; I've replied to the question you asked in D.learn.Incomprehensible
G
3

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.

Gerardogeratology answered 17/2, 2012 at 17:23 Comment(0)
C
1

I assume you are refering to Centerspace's NMath product?

We have recently started using them in a production application; albeit very lightly so far (performing a linear regression to determine the relationship between GJ of gas input to a gas turbine vs MW out; technically this is a feature of NMath Stats). It has been a pleasure to use so far, and their support was very quick in responding to an expired evaluation license whilst waiting for our finance department to process their invoice.

As far as performance is concerned, it does use the Intel Math Kernel Library where it can, so performance should be good; it hasn't caused any negative performance impact for our limited use.

I'm looking forward to using the library elsewhere in our application as it is appropriate!

Considering answered 16/2, 2012 at 23:51 Comment(3)
Interesting! Are you able to recommend its array features? We have a lot of large matrix and 3-d array manipulation in tight loops. I was testing their library years ago and at this time memory was exploding and array features did not exist really? I wonder, if this situation has improved since than?Gerardogeratology
@James: thanks for your input. I think I will give it a try and see how I like it. It is nice to know it is working well for you. Sounds very promising.Liberalism
You shouldn't expect any drop in runtime performance. Our product uses Intel's Math Kernel Library, as James says, and so do our competitors. The execution time is largely inside MKL for any significant computations. The linear regression function ends up doing decompositions using LAPACK (MKL).Habitat

© 2022 - 2024 — McMap. All rights reserved.