Live data from Hacker News

Show HN: Bateman, a stock trading system I'm working on

github.com

31–40 of 53 posts

Re: Show HN: Bateman, a stock trading system I'm working on

#31

Expect a letter from a lawyer representing DC Comics demanding you to rename your product. An acquaintance of mine also launched a product (entirely unrelated to comics and toys) with the same name recently and was asked by DC Comics to change the name.

I am curious, on what basis he was asked to change the name? As per my understand, It is certainly not a trademark infringement, if not belonging to the same business domain.

I think he misread it as Batman

Re: Show HN: Bateman, a stock trading system I'm working on

#32

Expect a letter from a lawyer representing DC Comics demanding you to rename your product. An acquaintance of mine also launched a product (entirely unrelated to comics and toys) with the same name recently and was asked by DC Comics to change the name.

I think you misread the repo name as "Batman", but it's "Bateman", as in, Patrick Bateman, the character in American Psycho.

Re: Show HN: Bateman, a stock trading system I'm working on

#33

Henning, If you are going to go some computer optimisation please read Whites reality check, I applaud your effort but I think the trading strategy as described might be too simple unfortunately and historical optimisation can make anything profitable. In an ideal strategy edge would be present do to an extrapolation of platonistic assumptions and optimisation would further tune this rather than produce profits in it…

Wow, I've never seen anyone else who knew about White's reality check. Unfortunately, it is patented (US Patent 5,893,069). There's also a related thing called the test for Superior Predictive Ability (SPA), by Peter Reinhard Hansen, which is not patented (afaik). We liked it better for other reasons as well.

I didn't know that it was patented,thanks for the info. There go my plans for githubbing a small pandas(python) based version of same. Ill also look into the SPA now. People also need to consider the kelly criterion,and abandoning Technical Analysis as "not even wrong". Signal Processing is TA for grownups but even then people have to bear in mind that the assumption of a linear system (a default assumption for signal processing) is generally incorrect as far as the market is concerned. In the strange position of having a potentially very viable trading model myself and no time or funds to trade with as yet.Potentially a better position than the converse however.

Re: Show HN: Bateman, a stock trading system I'm working on

#34
That's a very interesting system you've built.

The the thing about backtesting a strategy is that it is very easy to make a mistake in your backtester. Look ahead bias is the most common mistake.

Another challenge is the data. Are you testing against a history of stocks that includes bankruptcies? If not you have survivorship bias.

I suggest you take a look at my website, www.quantopian.com. Look at our open-sourced backtester, https://github.com/quantopian/zipline. Between the two we can help you get past those two sources of error.

Re: Show HN: Bateman, a stock trading system I'm working on

#35
post #9

Writing a framework for running trading strategies is certainly an interesting idea. I too am dissatisfied with most commercial platforms due to lack of features and flexibility. Unfortunately, there seems to be a lack of open source code in this sector. Eclipse Trader looked kind of interesting but the project appears to be dormant now. So expanding on this project could fill that gap. However, from experience devel…

This man speaks the truth.

Particularly running the optimise & test routine on chunks of past data to test for robustness & over-fitting.

Re: Show HN: Bateman, a stock trading system I'm working on

#37
post #10
post #2

Interesting project. I haven't had the time to look at your project in-depth, but keep in mind most retail traders are at a disadvantage due to routing. Most orders are routed through providers such as Getco or Knight Capital, and often you are not aware of whom your counter-party is. Therefore, any expected P&L may vary by x amount of basis points, due to latency and liquidity.

alright, I don't know how many "professional" traders there are on HN but I spent a good part of my life doing prop algo-trading on Wallstreet. The assumption that most trading systems are in VBA is perhaps valid for small or retail, but I can tell you that serious algo shops (trading desks, hedgefunds) run clusters of GPU harnessing CUDA with matlab, and R plugins, C++ etc. When/If you try this with real in the real…

"slipage is the price the trade gets executed vs. where you thought it would be."

Anyone not using limit orders in an automated trading system deserves whatever they get.

Re: Show HN: Bateman, a stock trading system I'm working on

#38
post #14

Earlier quoted context omitted.

Out of interest, is that better or worse than you were expecting? You don't say when in 2013 you started, but since the start of the year the S&P is up around 6%, the NASDAQ composite is up 4.5%, and the FTSE All Share is up a similar amount. Assuming you did put the money in in January you would have probably made more profit by simply investing in an index tracker.

True, I'm losing to the market, since January. But 'the market' is unpredictable, unrealized gains on paper. Unless you sell your index tracking positions, you will, in the next couple years, see some nice unrealized losses on paper. My gains are realized. And fairly predictable. Also, I only have about $55k in capital. But my rapid buy/sell cycle (not HFT) allows me to keep 'reusing' it.

So you're up 5% on capital employed. Well, if you can sustain that, you'll be doing pretty well!

Re: Show HN: Bateman, a stock trading system I'm working on

#39
"And, in fact, every single one of our simulated trades was profitable, even while the stock overall was going up and down."

This is a huge red flag with respect to the simulation results. You show some trades like this one

> 2013-03-05 6:41,2013-03-05 7:15,14.47,14.48,LONG,5192,75145.75,52.85,100237.47

where you enter the trade and exit a penny higher. It sounds like you're just looking at the trade print and assuming you can execute at that price with a market order (or marketable limit order). Consider a stock at 14.47 bid x 14.48 ask. If I cross the spread to sell at 14.47 and then someone else crosses the spread to buy at 14.48, you will see two trades at the two different prices, without the prices on the inside having changed, this is why the midpoint between bid and ask is considered a more useful value than the last trade price.

With the system you propose, you are a price taker. You are crossing the spread with both your entering and exiting trades. Most of the trades you show are for around 5000 shares. Assuming the spread is $0.01, you are going to spend $100 just to get in and out of the position.

I don't know what kind of data Google offers about the intraday state of the order book, but I think you'll need to incorporate it into your backtesting in order to get a better picture about the profitability of your strategy.

Re: Show HN: Bateman, a stock trading system I'm working on

#40
post #37
post #10

Earlier quoted context omitted.

alright, I don't know how many "professional" traders there are on HN but I spent a good part of my life doing prop algo-trading on Wallstreet. The assumption that most trading systems are in VBA is perhaps valid for small or retail, but I can tell you that serious algo shops (trading desks, hedgefunds) run clusters of GPU harnessing CUDA with matlab, and R plugins, C++ etc. When/If you try this with real in the real…

"slipage is the price the trade gets executed vs. where you thought it would be." Anyone not using limit orders in an automated trading system deserves whatever they get.

That's common wisdom for the Jim Cramer crowd and the reason it's so well known is that it's good advice for the common person who doesn't understand the market.

Sometimes a trading system just needs to get an order done. Having too many busted pairs can really cause your system to become ineffective fast.

or put another way, limit orders are your best bet, unless they aren't:)

Post reply on HN