Live data from Hacker News

Show HN: I'm building an open-source, high-frequency trading system

scarcecapital.com

121–130 of 198 posts

Re: Show HN: I'm building an open-source, high-frequency trading system

#121
post #115

Earlier quoted context omitted.

HFT is like a million tiny trolls underneath the bridge trying to extract their tax.

... replacing one big troll on the bridge that used to extract more than the million tiny ones' total...

The reason spreads have come down is mostly due to better information on the part of the traders. Electronic markets made this possible.

Re: Show HN: I'm building an open-source, high-frequency trading system

#122

This is a nice little research project, and I hope you learn a lot from it. Having written algorithmic trading systems I think you are missing on a couple of central points: 1. There is no such thing as the "best" algorithmic trading platform, because algorithmic trading is such a broad term. Architectures that make sense for one class of trades does not make sense for other class of trades. 2. Contrary to popular op…

> ...truly targeting low-latency and high frequency events concurrency is your enemy, not your friend. This reminds me of the LMAX financial trading platform where they started with a concurrent model but ended up using a single-thread "...that will process 6 million orders per second..." http://martinfowler.com/articles/lmax.html

I can't recommend working with the LMAX library enough if you are interested in low latency in the JVM. Lots of people have driven to the same/similar place but LMAX was the first to just let everyone see it.

Re: Show HN: I'm building an open-source, high-frequency trading system

#123
FYI: This isn't an HFT bot but is a decent, recent Python + ncurses trading client framework for Bitcoin on MtGox. http://prof7bit.github.io/goxtool/

Even if you aren't interested in Bitcoin, it might be useful as a real-ish and cheap place to test with low barriers to entry. I've found that backtesting on historical data is usually not realistic enough since most people fail to consider liquidity.

I'm interested because I like to trade, would like to learn more, and I have had some small success. But I have trouble sticking to my plan. I let emotion get the best of me and wind up losing my gains.

Re: Show HN: I'm building an open-source, high-frequency trading system

#124

Earlier quoted context omitted.

> ...truly targeting low-latency and high frequency events concurrency is your enemy, not your friend. This reminds me of the LMAX financial trading platform where they started with a concurrent model but ended up using a single-thread "...that will process 6 million orders per second..." http://martinfowler.com/articles/lmax.html

Yes, but the concurrency has been shifted to the two disruptors at either end of the business process logic. And I suspect the business logic is fairly simple and lends itself to the straight through solution. If you want to react to a news event (say), you have to somehow send a signal to the feed requesting recent history (last 20 minutes say), have something waiting to look at it, crunch the numbers when they arri…

As your complexity curve increases, your latency expectations must go down. That is what I meant when I said there is no single trading system that can be the "best".

If what you are interested in is complex decision making then it may make sense to use a different sort of messaging technology than LMAX, but you won't be getting into anything remotely "low latency". Nothing wrong with that, just needs to be a known expectation.

Re: Show HN: I'm building an open-source, high-frequency trading system

#125
post #107

you're doing it wrong: haskell is too slow.

How much experiance do you have in programming, for claiming that?

Interestingly I had this exact conversation last week with a guy from an HFT firm that was asking about how do you write fast code in haskell. Haskell won't be as fast as C, but we are not a high frequency shop so it doesn't matter. Much time in engineering at an HFT firm is spent doing things like turning an L2 cache miss into an L1 cache miss. Haskell makes it hard to do things like that.

Our platform is fast and could be used for some slower strategies. If we replaced pieces of it with C we could be competitive but probably never less then 10 microseconds wire to wire.

Re: Show HN: I'm building an open-source, high-frequency trading system

#126

In another month or two the analytical tooling for doing stats and numerics in Haskell land are going to have a huge leap forward in capabilities. Might be worth considering going full Haskell then :-)

Whats happening then?

you know exactly what i'm up to slowly with wellposed :)

(building numerics/ data analysis tools that dont' fill me with rage and ire over terrible engineering and usability. A matrix / linear algebra kernel of tools are on track to be ready for hackage release + paid pro versions in 1-2 months)

Re: Show HN: I'm building an open-source, high-frequency trading system

#127

The industry is doing the vast majority of its HFT development in C++ or Java. Data analysis is mostly done using Python although I still see a lot of R. If you are doing this to break into the industry, I suspect the languages you used should have been the above. Also the above languages would probably have been better to attract open source developers who are also hoping to use their code and experience from this p…

I've been in the industry for too long (though not in low-latency) - I'm doing this to break out of the industry! And I think the finance game is long overdue for a good disruptive technologic event (not implying my humble project is it). R is a personal choice for data analytics (I love ggplot2). But the haskell thing is more than that. It's been done before (http://www.starling-software.com/misc/icfp-2009-cjs.pdf) and even goldman's has a thriving erlang/OCaml hacker ethic (http://www.zerohedge.com/article/aleynikov-code-dump-uncover...).

Re: Show HN: I'm building an open-source, high-frequency trading system

#128

Earlier quoted context omitted.

Yes, but the concurrency has been shifted to the two disruptors at either end of the business process logic. And I suspect the business logic is fairly simple and lends itself to the straight through solution. If you want to react to a news event (say), you have to somehow send a signal to the feed requesting recent history (last 20 minutes say), have something waiting to look at it, crunch the numbers when they arri…

As your complexity curve increases, your latency expectations must go down. That is what I meant when I said there is no single trading system that can be the "best". If what you are interested in is complex decision making then it may make sense to use a different sort of messaging technology than LMAX, but you won't be getting into anything remotely "low latency". Nothing wrong with that, just needs to be a known e…

Yep, I've poured over the technology and concepts there and its awesome. So awesome I think you can increase complexity without too much of a latency penalty. Just behind the fast guys but way ahead of the straight algo guys is where I think the opportunities lie (I'm kind of answering your previous question about where the dials sit in my mind). I might be wrong but, and would like to test out all dial positionings at once before locking in. And that's where a flexible haskell version could shine.

Re: Show HN: I'm building an open-source, high-frequency trading system

#129

FYI: This isn't an HFT bot but is a decent, recent Python + ncurses trading client framework for Bitcoin on MtGox. http://prof7bit.github.io/goxtool/ Even if you aren't interested in Bitcoin, it might be useful as a real-ish and cheap place to test with low barriers to entry. I've found that backtesting on historical data is usually not realistic enough since most people fail to consider liquidity. I'm interested bec…

Isn't MtGox over as a bitcoin trading platform? I agree more generally that bitcoin could be a useful market to test out.

And your story fits exactly with a hands-off automated approach to trading. We wont ever be charting a price series in the production environment because computers don't get charts.

Re: Show HN: I'm building an open-source, high-frequency trading system

#130
post #85

Earlier quoted context omitted.

I wish I could get down to nano units. iqfeed (a good value feed) just got millisecs in so will settle for that. I'm preparing some speed tests between C++ and haskell on an identical block of processing so stay tuned! You might be surprised - haskell is way ahead of clojure on compiler smarts. The split you suggest is exactly what I think is wrong with the way things get done right now. I'd like to integrate the qua…

Keep in mind that if you're not an experienced C/C++ coder, you're going to be (largely) benchmarking your relative ability in either language rather than the intrinsic speed of each language.

This is true of any language/coder. It's what makes cross platform benchmarking so difficult for non-trivial problems.
Post reply on HN