R or Python for someone with elementary CS skills?

Discussion in 'App Development' started by ehbeehefak, Jul 5, 2015.

  1. The place where I used to work had python and a custom messaging bus. For my own personal system I did look at python plus rabbitmq (rabbitmq is pretty neat IMHO), however I don't need especially low latency so I just write everything into databases and then pick it up with another process (it needs to be in the database anyway for historical / diagnostics so why not just use that). I think python is a more natural language to manipulate data in than c++. It's more natural if you've come to systematic trading from a trading / research background, rather than from a programming background.

    Back on topic, the problem with R is it's very easy to write bad, dangerous, code in R (in particular its way to loose with type checking; and almost randomly returning stuff in different types on a whim. You need to litter your code with manual type checks and conversions. It's also really easy to write eg loops that suck up the whole memory. Okay theres a lot more I could write...).

    It's fine for research but I'd be terrified to use it for a live trading system. I've run systems running 9 figure FUM written in R, and it wasn't a pleasant experience or something I would do again.
     
    #21     Jul 15, 2015
    gonzatti, spacewiz and eusdaiki like this.
  2. 2rosy

    2rosy

    I use python for signals, research, data parsing, etc. I never used python for executing realtime trading because I use java c# c++ for that
     
    #22     Jul 16, 2015
    Bizzy Bee likes this.
  3. This is interesting. This is definitely similar to stuff I've done in the past. What exactly do you do?

    A Do you have a 'signal generation' system which then talks, somehow to the java et al (Eg using a bus?)

    B Or do you reimplement your entire prototype system (signals to execution) in java et al?

    Having done the latter B many times it always struck me as quite a lot of work, with the risk of introducing new bugs or not correctly implementing aspects of the prototype. The former (A) approach is probably better, but slightly unnerves me for other reasons.

    GAT
     
    #23     Jul 21, 2015
  4. 2rosy

    2rosy

    all execution, order handling , data feed (realtime stuff) is done in something like c++ java. Its possible Python can be used to calculate a signal or price and send that as a serialized message (protobu, json, etc) to another component. But usually its separate where python is not listening to realtime data ;its used for research analysis.
    However i have written some python trading things for fun with IB
    I guess it depends on your timeframe and markets. Quartz and athena are 2 large bank systems written in python
     
    #24     Jul 21, 2015
  5. RabbitMQ is NOT low latency. It is one of the slowest messaging buses around.

     
    #25     Jul 22, 2015
    gonzatti likes this.
  6. "is done in something like c++ java" ? Like c++ java? Are you sure you are not talking out of your arse? Why would you mix two non-complimentary languages and then add another one (Python)? Sounds like you are more addicted to technology than creating a safe, efficient, and performant trading architecture.

     
    #26     Jul 22, 2015
  7. 2rosy

    2rosy

    I'll add the or for you. C++ or java. By c++ or java i mean a statically typed , faster,and somewhat easy to use threads. I did mention python as a research and data munging tool. Its possible to use it in live trading if you want.

    Do you actually have input? What do you use? Do you have any code we can see?
     
    #27     Jul 22, 2015
  8. sure, search the site for my code contributions in the technical and coding sections. I contributed various code snippets and design ideas regarding binary data stores and tick data bases, trading architecture, and testing and design setups.

     
    #28     Jul 22, 2015
  9. Drakhades

    Drakhades

    I know python is popular in financial coding but wow it does suck. R is tiny bit better, so I think go with that if you can only choose the two.
     
    #29     Aug 1, 2015
  10. Suck why?

     
    #30     Aug 2, 2015