Opinions of new-ish TWS API for Python, versus.....

Discussion in 'App Development' started by tommcginnis, Jan 31, 2017.

  1. tommcginnis

    tommcginnis

    The Yahoo! TWS_API group has recently been moved to Groups.io.
    A new thread has just been started, seeking opinions on the new Python API versus others (and even, primarily Java).

    I have a sizable OpenOffice spreadsheet with which I analyze the option market from data off-loaded from TWS Quote Monitor pages through the EXPORT/.csv facility. I have thought that having this in real time (via a small Java tool) would be a great thing. Now, I'm wrestling with *either* making that tool in Python, or simply recreating the entire spreadsheet in Python.....

    Hence:
    https://groups.io/g/twsapi/topic/4289379

    Replies to either or both locales would be widely read. (Methinks.) (Me*hopes*!)
     
  2. rwk

    rwk

    I think a supported version of Python is an interesting development. I have been using Pascal since the first version of Delphi, and I have I would like to change to a language that is truly cross-platform and general-purpose. There is a free cross-platform version called Lazarus, but it doesn't seem to have much of a following.

    One concern I have is that according to comments I have read, it can be difficult to upgrade Python 2 code to version 3, and most of the code base (one of the biggest advantages of the language) is in Python 2. Another concern is that changing languages is not a trivial matter, and there needs to be a compelling reason.
     
  3. southall

    southall

    In 1991 i learnt Pascal, 1992 C, 1994 C++, and in 1998 Java.

    I have not needed to learn anything else to replace Java since then.
     
    Last edited: Jan 31, 2017
  4. The python API works pretty good, it is a wrapper on top of the Java.
    I've used it for sending orders and getting some quotes and contract details, curious to know how it performs under a heavier workload like the one you describe.

    You can use the ibpy package to get a head start, so you don't have to reinvent the wheel.
     

  5. I learned pascal in 99, COBOL in 01 ... python in 2012, R and matlab in 2013...
    For me python was liberating, as it allows to try new ideas very quickly and to put them into code that is easy to read and to get down to business quickly without having to spend too much time in formalities. While also being powerful enough to do most things I need to do. Nowadays I stick with python and only recourse to C when performance is critical.

    Most of the libraries have moved to python 3.5 by now, if you're picking up the language your better off starting there from day one since 2.7 is near its end of life while 3.5 is very much alive.
     
  6. tommcginnis

    tommcginnis

    Jeez, guys, you're really great and thoughtful replies ARE NOT making this any easier.

    (I crack me up.......)

    Re, IBPy -- I thought it was a neat deal, and although I have no knowledge of this, I am guessing it probably inspired the IB-sanctioned Python API
    https://www.interactivebrokers.com/en/index.php?f=2227
    But my issue with it has been why not just do Java, rather than having a wrapper? Any change in Java would likely leave a simple API (with just a couple of read+write objects) alone ("Ah! Stability!") and the resource consumption (esp. RAM) would be minimal. But any change in Java or an unsupported Python wrapper (no matter how nifty) would truly screw with stability, continuity, and backwards compatibility. Now that this Python API carries the imprimatur of IB, I'm much more interested.

    And as far as size goes, what I love about OpenOffice is its
    1) friendliness to prior versions, Excel versions, etc etc. (As opposed to Excel, which seems to invent new reasons to screw with work product at every update.)
    2) its size, in storage *and* in RAM. (MUCH smaller footprint than anything from Microbloat -- which itself is Windows-only, unless you layer in MORE crap.)

    Well! If I re-wrote everything in Python, wouldn't that remove THE TREMENDOUS but unused[!!!] functions of OpenOffice??? Wouldn't that, net, put me in a *very* small footprint?
    (OR!!!! Am I showing my ignorance of Python Panda Nutmeg Cocoabean Netbean CookieCutter PeanutButter Libraries, Procedures, and Useless Add-ons???? Probably that.)

    Thoughts??
     
    eusdaiki likes this.
  7. jj90

    jj90

    You don't say what kinds of analytics you are running off your OO spreadsheet. For me, it was pandas that sealed the deal. There wasn't a Java equivalent.
     
    eusdaiki likes this.
  8. xandman

    xandman

    Open Office seems like a big gamble in that you may find yourself missing a method from Excel down the road.

    It all depends on your mastery of the product and python programming. MS Office also lends to much customization but the best selling books are very elementary and you have do a treasurehunt via MS. RTD functionality would probably win me over.

    How is the Open Office documentation?
     
  9. Yeah... now a days when I need something on a Excel-ish looking spreadsheat... I build it in Python and then spit it out to a spreasheet...

    After about 1 million rows with calculations Excel stops working... python is just warming up ;)

     
  10. Consider that Pandas has a lot of C++ optimizations under the hood, it is not a coincidence that pandas is one of the strongest tools when it comes to data analysis... (along with the likes of R & SPARK)

    It allows you to easily manipulate large amounts of data, and perform all sorts of calculations... even complex math like a fast fourier transform...

    python in general plays very well with databases, hdf files, excel files, hadoop clusters, spark, aws, R, yahoo data, ibkr, scikit learn, tensorflow...
    not sure what kind of math you're doing, but unless it's some really bleeding edge statistics (which I have no idea how you'll do in excel...) then pandas can get the job done with little coding time and very good run time.
     
    #10     Feb 2, 2017
    tommcginnis likes this.