C# Code to get Cointegration of stocks

Discussion in 'App Development' started by lordoftrades, Sep 13, 2013.

  1. when I said slow, I meant generating an array of ints in C# passing it to R through the wrapper, perform whatever calculation you desire and return its results. You will find the time it takes till the result comes back is almost entirely taken up by passing the array into R. The library is very poorly written. I would never have done it that way but would have passed the data through an inmem db, such as Redis or the like.

     
    #21     Oct 2, 2013
  2. I'm looking at gretl right now. In addition to having a GUI front end and scripting, gretl also has a separate C library of functions that the GUI and scripting uses.

    The C library is particularly interesting and relevant to the thread. Among the many analysis functions is the Johansen cointegration test. C library functions can be easily called from C#.

    There are about a dozen mentions of gretl on ET.
     
    #22     Oct 2, 2013
  3. mark_mm

    mark_mm

    I did this last year, I initially used R (D)COM Interface to call R. However once I looked into R language I realised that it could do everything C# could do using packages. So I ended up writing it in R completely on a ubuntu box (using urca package). It's always better to reuse code written by experts than try and implementing it yourself.
     
    #23     Oct 12, 2013
  4. My trading software is called IQBroker :)
     
    #24     Oct 15, 2013
  5. #25     Mar 23, 2015