Anyone using Python on a large scale trading application?

Discussion in 'App Development' started by chromosome, Dec 11, 2011.

  1. mcdull

    mcdull

    Hi 6yaNYCjm5m,

    Thanks!

    Another question: Which streaming quote provider are you using? Almost all "retail grade" providers require a windows component installed and I need a pure Linux streaming quote solution. Thanks!
     
    #21     Dec 19, 2011
  2. Wow, what a rare treat. Among the literally THOUSANDS of worthless posts, a gem. Congratulations. Well written, informative, and wet my appetite to work a bit with Python to get my feet wet. I run a fully systematized platform in .NET (yes that is correct), AMQP based messaging bus, capable to run a bit more than 1 million ticks on a back test basis. I have whatever library support I need, I wrap some of the older C++ libraries to use as well. I use IB's Fix Gateway and a high speed data feed (not IB's), my engine seems to not have any issues to subscribe to several thousand symbols (essentially pretty much most developed Asian cash equity markets). I heard a lot of Python, but then I have also heard a lot of how people back test in Matlab and I used it extensively but always ended up being disappointed because of inherent limitations. To be honest I believe at this point only a capable C/C++ engine is able to beat the specs my system has in terms of data processing power, both back test and real-time.

    Am not writing to brag but to show all this can be had with .Net, the platform all programmers decry and belittle for raw speed. I beg to disagree. I am not a programmer by heart, I traded discretionary derivatives (including market making) for years before getting into pure quant space and pretty much everything I know about programming and what I have coded I learned all on my own. It can be done.

    One thing I fully agree with you, without having used Python yet, and maybe I am way too opinionated (my nature), but without being able to vectorize I would not even give Python a try. Thanks for the long post and tips on libraries, definitely helps me to get started.

    Cheers


     
    #22     Dec 20, 2011
  3. of course, but you still end up writing wrappers or converters for each broker or data service you interface with. That was, I think, what he (6y....) was complaining about and I wholeheartedly agree. It means unfortunately not much when a broker claims to have FIX connectivity, each version is different and requires code changes, adaptation, albeit less work than re-writing a complete API.

     
    #23     Dec 20, 2011
  4. of course, but you still end up writing wrappers or converters for each broker or data service you interface with. That was, I think, what he (6y....) was complaining about and I wholeheartedly agree. It means unfortunately not much when a broker claims to have FIX connectivity, each version is different and requires code changes, adaptation, albeit less work than re-writing a complete API.

     
    #24     Dec 20, 2011
  5. There is actually excellent provider, BarChart/DDF. I have tested their feed, and it looks really good, based on the limited testing time. The instrument selection is comprehensive and documentation is pretty good, simple and straightforward, no complicated bs. You have to take a look yourself if they have all data components you are looking for, i.e. bid/ask size, bla,bla....
    The feed is completely platform agnostic, historical quotes you get from web service (I guess that's the fancy name) and real-time through the plain tcp connection, which you can btw test interactively using the telnet. You can call and ask for couple of weeks of demo, they were very accommodating. This is the guy I was talking to:
    Mark Wator
    Barchart.com, Inc.
    Business Development & Sales
    (312) 506-8729

    In order to help you get started I am attaching 2 test scripts, historical quotes client test and real-time quotes client test. It should help you with some basic record structure as well. The code is geared toward testing/example/understanding rather than efficiency or production deployment. With historical quotes, you are effectively done in 2 lines of code, while real-time requires 4 steps before you hit the rt stream (connect, login, set version, request symbol). My tests were done in April,2011, I hope they didn't change anything substantial.

    Lately my focus is entirely on fx, so I have to go with the broker feed, but when I go back to futures those guys will be my first choice for data.

    Hope this helps,
    Dr. Sheldon Cooper
     
    #25     Dec 20, 2011
  6. mcdull

    mcdull

    Thanks, Dr. Cooper. Really appreciate your help.

    I seldom heard people build everything in Python because everyone says it is too slow. I thought I was alone! In fact, it is fast enough for day trading but I guess nobody uses it for trading sub-millisecond timeframe.

    I code almost everything in Python except one component which is talking to a stupid windows application for retrieving streaming quotes. My system is still in paper trade mode and it does 8-10 trades daily.
     
    #26     Dec 21, 2011
  7. ch_dupre

    ch_dupre

    Hey 6yaNYCjm5m,

    Thanks for your posts, it's nice to see somebody using Python. I've built a simple charting app which display OHLCV values on the screen using ChartDirector too.
    Does your app allow you to draw trendline? That's something I'd like to do but not sure how to go around it yet. To be more precise, I'd like to draw a line, click on it, move it, etc... I'd like to add comment to the chart and store it somewhere, and display it again when I'm viewing the same timeframe at a later stage.
    Another thing I'd like to do, is to highlight a bar when I mouse over it. As ChartDir is creating the whole image at once, I'm not sure if this is do-able.

    Regards,

    Christophe
     
    #27     Dec 21, 2011
  8. Python can be slow. If speed is a requirement, check out Cython. It is absolutely incredible.
     
    #28     Dec 22, 2011
  9. mcdull

    mcdull


    Yes, I agree. :)
    Also, python is not a compiled language, many errors won't be found until actual running of code. But given the capability of quick testing of idea, I use python for ATS.

    C/C++ is my mother tongue, Python is my secondary language. :)
     
    #29     Dec 22, 2011
  10. rosy2

    rosy2

    for those doing batch backtests this service is great. It has almost all the python modules you need and those that are not there you can create a custom environment and install them (or anything else) you need.

    https://www.picloud.com
     
    #30     Dec 22, 2011