experienced prop trader details his custom Python algo trading setup

Discussion in 'Automated Trading' started by Jack_Larkin, Mar 31, 2019.

  1. It's fuggin awesome and has made connecting different platforms (which might use different languages) so easy. I recommend it to most people struggling with network programming or IPC issues.
     
    #11     Apr 1, 2019
  2. dinn13

    dinn13

    Nice, python is a great way to go given the rich ecosystem. I use python for pretty much all my research now with a little kdb. If the signal isn't latency sensitive (using broker algos or open/close orders) then I run python in prod and have it send orders directly. If latency sensitive then gets rewritten in Java or C++ and goes through FPGA order entry. I last considered ZeroMQ like 8 years ago now (while previously using tibco) and managed to easily break it during capacity testing so ended up just using raw UDP sockets with solarflare cards. Also use redis/mongodb as part of the stack for a variety of purposes but other than that pretty much write everything from scratch.
     
    #12     Apr 1, 2019
    peechu likes this.
  3. sle

    sle

    Ugh, "it's complicated". I trade a relatively small set of underlying securities, but once these have been mapped out into actual traded instruments the complexity explodes and I end up using discretionary inputs to deal with that (e.g. picking the strikes for options). Plus, to make it further annoying, strategies are vertically integrated across time frames, so some things are traded intraday and some stuff is held for weeks or months. For longer time frames I have a "rough" concurrent backtest assuming some conservative execution costs. For latency-sensitive stuff I usually check if alpha is still there but do not compare anything in terms of execution since I don't really have a proper book/que simulatior.
     
    #13     Apr 1, 2019
  4. bogitrade

    bogitrade

    The real issue here is whether after all this work you are making even close to what a Vanguard passive investor is making this year.

    Surprising you mentioned that you got your ideas from a vendor that doesn't offer a demo trial of the software you claim you used as I just checked and appears to be trying indicators randomly until something works. Have you made any money after all this good work reinventing in Python what successful platforms like Tradestation have been doing for many years? I highly doubt it. You described an exercise of reinventing the wheel while guys that check their account at the end of every month are making good returns.
     
    #14     Apr 2, 2019
  5. sle

    sle

    That's just silly. Did passive Vanguard investors do "oh so well" last quarter too? Passive investing has a very different profile and it does not make sense to compare the two.
     
    #15     Apr 2, 2019
    Jack_Larkin, qlai and digitalnomad like this.
  6. Ive been trading for the better part (and worse part) of 2.5years and have found that algorithms are the way to go. While i do not YET possess the knowledge or understanding of python yet, i will be looking into your work to make some sort of sense of it all. Since making the switch to algorithms but still lackjmg the programming skills, ive found it immensely challenging to do proper backtesting. I have multiple strategies which range from tops and bottoms, to momentum based strategies. All of which further require backtesting for optimalisation. Is this something you could help me with or be interested in collaborating on?
     
    #16     Apr 6, 2019
  7. I literally said 95% of what I do falls in the 2nd category of that post, not the 1st where I mentioned that one commercial software title. Further, giving an example of 3rd party software is different than saying I "got [all] my ideas" from it.

    Not a plug for said software, but you're able to write your own signals for their backtest engine in python, import your own custom data sets to be used, and use their analytics tools on the result. None of this requires you to use their indicator signals or the like... it's a tool that can be used in different ways.

    Yes... the majority of which employs features that Tradestation can't or won't offer.

    You're resentful for something that has nothing to do with my post. Please take your haste and anger somewhere else. Cheers!
     
    #17     Apr 7, 2019
  8. Sprout

    Sprout

    #18     Apr 7, 2019
  9. bogitrade

    bogitrade

    There is so much free Python stuff around - why do you have to buy something just to run python? Unless you have to plug it. That is what you did. Don't hide...
     
    #19     Apr 29, 2019
  10. istavnit

    istavnit

    The reason why I use python, is because I day-trade using Machine Learning based models. C# is an objectively non-suitable language for that. Even "more-cross-platform" ML libraries have very poor C# support. I actually execute my trades in NinjaTrader by means of integration. I write a file into a watched folder and NT executes a trade.

    I can also appreciate why an non-ML, but algo-trader would like python: it has great many libraries for anything you can imagine and then some. Of specific interest to an algo person would be pythons Data manipulation libraries that essentially combine flexibility of Excel and SQL in working with tabular and/or multidimensional data.

    So my pipeline in LIVE DEPLOYMENT: IB [Brokerage + Live Data] -> [My Python Code Running night-before prepared models]-> [Produces a Trade Instruction file containing Entry Limit, Target and Stop]->[NT Reads This File through custom C# strategies]->fork here to two destinations: [1 NT Brokerage, 2 IB Brokerage]

    NinjaTrader
    Pros:
    - an awesome charting (free)
    - quick indicator development (free),
    - dirt cheap commissions (I bought perpetual multi-platform license)
    - Great Trade-Handling API
    Cons:
    - C# does not support python
    - No easy way to export technical studies

    IB comments:
    - Good Python API for hooking into live data, reasonable data fees
    - Poor Trade Handling especially if you have multiple instruments in play. What specifically weak is complexity of order/position lifecycle events (ninja is so much easier in that regard)
    - Awesome and knowledgeable support that you will have to use little too much for my liking.
     
    #20     May 1, 2019
    honest-trader and fan27 like this.