Best programming language for trading?

Discussion in 'App Development' started by heavenskrow, Jun 5, 2018.

  1. sprstpd

    sprstpd

    I think you have a rosy view of big firm's production applications. I've seen some god awful frontends that are complete garbage. Most likely these big firms would benefit from using more modern programming languages for a large portion of their code base and then optimize the parts that need optimizing.
     
    #101     Dec 27, 2018
    d08 likes this.
  2. Not having a stake in this ... it occurs to me that you guys are too intelligent to be having this p*ssing contest. Might just be that you are all "correct" in the environments you work in.
     
    #102     Dec 27, 2018
    a_tech_trade and Simples like this.
  3. Sure I have seen plenty garbage myself. But none of that garbage was written in vba or python.

     
    #103     Dec 27, 2018
  4. Might very well be the case, hence I outlined where interpreted languages might be used in non-research production. At banks, reputable hedge funds, and buy side firms they are not. Not by a huge margin.

    But to get back to the thread topic, I assume OP was asking about languages that retailers can use and embark on. I would put my money on C# especially now that mixed OS Net/Core has become the natural continuation of the net framework. Java looks increasingly outdated in comparison, feature wise, both for general purpose code and UI code especially. I contend that a well designed UI is as important than the backend. Nobody in the heat of the trading session is gonna play around with some Json config files and command line apps. And in that arena the clear world champion is wpf/xaml. Non UI wise of course there is always room for special purpose languages such as C++. Most other languages especially scripted and interpreted languages are great research tools. So, my vote for the average Joe goes out to C#. And I love Microsoft, after all they wrote the fastest Linux version there is aside their coming to grips with the open source community after all.

     
    #104     Dec 27, 2018
    a_tech_trade likes this.
  5. Extremely opaque, but plenty fast, and elegant.
     
    #105     Dec 27, 2018
  6. IAS_LLC

    IAS_LLC

    C#... Do "professionals" really use Windows? Also...for the python bashers above...check out numba...well written Python can be as fast as C/C++
     
    #106     Dec 27, 2018
    d08 likes this.
  7. fan27

    fan27

    On a related topic, at my previous job I shared an office with a guy in his late fifties who spent most of his career writing C and C++ code. We were on a Javascript stack project (React.js/Node.js) and there was not a day that went by where we did not have a thorough Javascript bashing session. It was usually initiated by one of us hunting down the cause of a runtime exception that would never occur in a compiled language. He was sort of grumpy by nature so it was not hard to get him riled up. Good times!
     
    #107     Dec 27, 2018
    IAS_LLC likes this.
  8. IAS_LLC

    IAS_LLC

    It would also never occur in interpreted language that was designed to "do stuff" , i.e matlab, python, etc, as opposed to languages that are meant to "display stuff" in the browser, i.e javascript. I started playing with Javascript about a year ago, out of self-driven necessity.... and I absolutely hate it. Angular 4+ makes it a little bit better, but it just doesn't make sense to write it yourself...when there are perfectly capable Russians who speak great English and take $20/hr. Almost anything front end-related, I just use upwork now. Its not worth my time to do anything non-strategy related.
     
    #108     Dec 28, 2018
    fan27 likes this.
  9. ironchef

    ironchef

    Appreciate your post and here are several VBA specific questions if you don't mind:

    1. I recently learned how to program VBA in Excel. It is convenient to link data I download from my broker into Excel but difficult to run large computations (e.g. Monte Carlo), or iterative programming (e.g. reverse BSM to determine IV) with pure Excel spreadsheet. VBA allowed me to do that. But I found my VBA macro could not compute functions like normal distributions so I was forced to toggle between Excel and VBA to do the computation which is very cumbersome. Do you have any suggestions and can you help?

    2. If I want to automate my trading algorithm from Excel, is it possible?

    3. If I learn other languages and write codes in MATLAB (which I am taking an introductory class from Coursera), or C++ for example, can I download data from Yahoo Finance into those and can I link my Excel data file with those other languages similar to VBA in Excel?

    Thank you.
     
    #109     Dec 31, 2018
  10. gaussian

    gaussian

    With reversing BSM to get IV you should be able to use Excel Solver reasonably quickly. No need to learn linear/quadratic/etc programming if you don't have to.

    For calculating distributions I would be very surprised if VBA didn't have a way to access NORMDIST or something. If not, you can always write your own function to do it. Depending on what you need it may be more work (mass function vs cumulative distribution, etc) but it's definitely doable.

    This really depends on if your broker provides an API link up you can use from VBA. You could always write an Excel plugin yourself in another language (C# for example) and use that to communicate with the broker if you're dead-set on using Excel.

    A few things:

    1. MATLAB is great if you already have the software but don't go spending $400+ dollars on it if you don't need to. R is a great substitute (though MATLAB is definitely far more refined). Python + numpy + pandas + scipy + jupyter + matplotlib is a reasonable solution as well.

    With general purpose languages you can do whatever you want. It's really limited to if your broker supports the language and (if not) what you need to write to talk to them. I'd stay away from C++ for now. You likely won't need the performance gains if you're using Yahoo data. Which brings me to my next point...

    2. Don't use free data

    You get what you pay for. If you're interested in equities you need to make sure your data is adjusted properly for splits and dividends. If you intend to trade a basket of stocks you need to make sure delisted stocks are handled as well so you don't suffer from survivorship bias.

    CSI Data is good. Quandl EOD data is great. Both are around the same price. Quandl has an API, CSI Data charges way too much for API access. If you want an API - my recommendation is Quandl. If you're really that strapped for cash go bum some cash from someone and buy adjusted historical stock data in CSV form.
     
    #110     Dec 31, 2018
    ironchef likes this.