Looking for a good off-the-shelf screener I can supplement with lots of code

Discussion in 'Programming' started by Rocko Bonaparte, Jun 18, 2012.

  1. A few years back I was looking into doing a lot of computer-assisted trading. At the time I didn't have a lot of money so I was trying to resort to free resources. So I stockpiled a lot of daily stock data and tried to work off of that. I am definitely a programmer and to some extent a good enough one that it gets me into trouble. I was writing a lot of auxiliary stuff not related to actually executing strategies. I needed it because I couldn't buy software at the time.

    It looks like I now have that money so I'm looking into what off-the-shell stuff I can utilize so I spend my time coding strategies. I'd rather not again waste time writing UI code, for example. I am approaching it from the software side, which means a lot of code, a lot of testing, and preferably not ever manually executing orders. This is more work than some other trading styles but it brings me the most satisfaction while I do it.

    What I was trying to do was write a screener; I figured this out after the fact. I know there are some things out there serving this role and I'm hoping one has enough features that I could piggy-back off of it as my platform. I thought I'd try this forum in particular since I imagine programmers have run into similar needs. Here are the things I feel I need:

    1. Runs locally. I don't want to rely on a website.
    2. Meta backtesting: Doing a backtest of a strategy that is trained/primed based on prior backtests
    3. Flexible programming APIs that let me hit it from a variety of languages. Considering Java, C#, C++, and Python. Specifically I do not want to have to use the vendor's own scripting language.
    4. Easily plug in my own algorithms to work upon the data.
    5. Do searches/screens to glance for criteria based on functions in my code.
    6. Can run my screen and execute trades against candidates, assuming I program it to behave that way. I don't expect it to be able to continually screen an entire market--at least not without a lot of network bandwidth--but I expect to be able to pick a group of ~30 items to track.
    7. Some tactile feedback for the stuff I'm writing. I'd like the develop->backtest->trade process to be pretty smooth.
    8. Can trade at least down to the 5 minute window. I can't imagine trying to go lower than 1 minute bars but...
    9. [Candy] Level 2 processing support: more for the case of making larger decisions of my own, but I don't plan to do this right away.
    10. Can handle at least equities and options with them.
    11. Can mix data between the different things I can trade. Say, write code that can take one symbol and work it against another, or more specifically option data with the underlying equity.
    12. Compose output from one strategy into another. In other words using an averaging function and a subtraction function, I should be able to click through them and make some output that looks like an MACD. This is just illustrative: I of course wouldn't ever bring up an MACD that way.

    I figure there isn't anything out there to do everything but I'd like to nail as much as possible so I don't have to try to half-ass it.

    Normal usage:

    I expect to do a lot of backtesting and strategy investigation initially. It should be easy to get my code in and updated as I toy around. I hope I could run the backtest across an entire market, assuming I've cached all the data locally. I may try strategies that train themselves based on prior performance, which means a backtest that is actually backtesting across a rolling window, making a plan, then executing trades in the backtester. So that's the metabacktesting issue.

    I imagine I'll try to play with learning algorithms again, although they kicked me in the pants last time I did this. I hope there I can export the data and some of the functions out for training the algorithms, as well as some output for fitness functions. The optimal thing of course is to use the backtester itself in training algorithms, but that's really pushing it.

    Before blowing a ton of money I'd like to do live paper trading with it, where it's just using a dummy account. I assume this has more to do with the brokerage than the software.


    I expect to leave my system on overnight to chew on stuff, and then execute during the day. Actually, if it turns out I am doing well enough I'd probably put it in a cloud node or two since that would be more robust. The licensing should be lenient for that kind of thing. The important thing in all this is having sufficient fail safe capabilities in the software--preferably as separate modular overrides. I can of course program them into my own stuff but I'd like something of an overseer that will shut off algorithms if something particularly stupid happens.
  2. > I'd rather not again waste time writing UI code, for example.

    Do you need a UI though? Or is a text interface acceptable?

    > 3. Flexible programming APIs that let me hit it from a variety of languages. Considering Java, C#, C++, and Python. Specifically I do not want to have to use the vendor's own scripting language.

    Is there anything wrong with SQL? If you already have the data and want to run strategies locally, if the signals/strategies can be implemented in SQL then it should be easy to build a backtest engine.

    Otherwise probably check out openquant and NinjaTrader. I've only toyed with NinjaTrader. Personally I use a mix of Java, C#, and SQL. If I need pretty graphs/charts I might use R or Excel.
  3. SMI

    SMI ET Sponsor

    You can have most of what you want with Tradestation. The only major piece they are missing from your list is the language issue. Otherwise, OpenQuant and RightEdge or even ModulusFE may be up your alley but I know just enough about those last three platforms to be dangerous...

  4. I would want a UI in there someplace in what I am doing. When executing I suppose it doesn't matter as much, but when I am trying out strategies I would want a lot of visualization support, and I'd rather get that with as little of my own code as possible.

    I was using SQL when I was doing my first experiments with daily price data. That was doing a decent enough job of fetching stuff out, but I never really wrote anything to represent data across different time spans. I just had daily open-close and that's what I stuck with. I'd have to write a lot more code to get more detail. To me it's another case of this being a solved problem so I didn't want to reinvent a solution if I could avoid it.

    It was a NinjaTrader trial where I first realized the kind of strategies I was applying were more suitable for intraday trading, and I give it a lot of respect there. I don't want to use Ninjascript though, and I didn't think it had the screening support I've been harping on about here. It's not the issue of learning a new language, but rather these languages usually are handicapped variants upon other languages, and I can't easily package in external libraries. But this and OpenQuant may just as well have changed a lot in the past few years, and my complaints could be irrelevant.

    I suppose you can say my preoccupation in programming is going to be in writing the code to do the strategies, and everything else is a distraction. I'm probably being too stubborn in my requirement list and there's nothing out there I can pick up to take care of all those other requirements.
  5. Buy data in flat file form and use Excel VBA or Matlab or Rplus?

    It's not crazy fast but it's infinitely customizable.
    And they all give you a decent enough "UI" to see data and to enter data.
  6. All the responses here generally imply you guys aren't, say, constantly thumbing through lots of charts and all. Am I getting that impression correctly? It makes me think I may just have the wrong approach here in the first place.
  7. Confusingly there are two applications named OpenQuant:

    C# and VB.NET

    Groovy and Java

    With NinjaTrader you can definitely use C#, it is not limited to NinjaScript.
  8. Oh that has to explain it. I think I only ever saw the OSS Java one. I was thinking, "Woah what happened here? They really moved on it! But it's not OSS anymore?!"
  9. Off topic, but where can I buy good intraday data in flat-file (CSV) format?

    I'm talking about 1-min price data stretching back a couple of years. My broker doesn't provide 1-min data that far back.
  10. Never mind. There already is a thread on it - http://www.elitetrader.com/vb/showthread.php?s=&threadid=229695
    #10     Jun 20, 2012