News for hackers. Stuff that matters.
Re:Algorithmic Trading: The Play-at-Home Version by chollida1 on Monday August 10, 2015 @01:34PM (#10036029)
Here's the problem with trying to create your own trading system.

How do you back test it to know that it works. If you back test over the past 5 years then you are only testing your model against a huge bull market.

If you back test over the past 20 years then I'm not sure it helps much as the market of 20 years ago didn't really have any of the major market drives of today's markets, HFT's, huge numbers of hedge funds and the money they bring, and huge passive investing via ETF's, all those factors were there 20 years ago, but they weren't the major market drivers that they are now.

So for back testing you are damned if you do and damned if you don't:(

I think I've said this before but in my experience, a decent trading system is 70%+ market insight. And there are only really 3 ways to get this insight, hard earned experience, applying new streams of data to the markets and applying math to existing streams of data to unlock new insights.

All 3 are being done every day by scores of MIT Phd's.

So if you are writing your own trading models you should start by answering the question of what's your alpha when compared to everyone else....

Re:Algorithmic Trading: The Play-at-Home Version by ericjang on Monday August 10, 2015 @01:48PM (#10036106)
One clarification - these mom & pop prop shops aren't necessarily competing against big baskets of MIT PhDs. If your book size is only $200K, the big players (i.e. scores of MIT PhDs) won't even bother competing with you on the same strategies. Alpha from these strategies may very well be orthogonal to hedge fund alpha.

That said, you're still playing a zero sum game with other mom & pop shops and the general large-scale movements of the market. You need to be confident that you have better information / forecasting ability than the others, or technology infrastructure that enables strategies no one else can execute.

Source: I work in the industry.

Re:Algorithmic Trading: The Play-at-Home Version by murbard2 on Monday August 10, 2015 @04:14PM (#10036992)
Yes and no. If it can be automated, no amount is too small to collect. A hobbyist best shot is to do... things that don't scale. Source: I do too.
Re:Algorithmic Trading: The Play-at-Home Version by tomp on Monday August 10, 2015 @08:22PM (#10038381)
I'm not sure about that. If a $2bn hedge fund finds 100 different "alpha strategies" for turning $20k into $200k, that's still just 1% to their bottom line. Probably not worth the time.
Re:Algorithmic Trading: The Play-at-Home Version by murbard2 on Monday August 10, 2015 @08:57PM (#10038498)
That's $20,000,000 which is enough to warrant at least 10 people working on it.
Re:Algorithmic Trading: The Play-at-Home Version by kittenfluff on Tuesday August 11, 2015 @04:44AM (#10039739)
Remember that a hedge fund only sees 20% of the profit that it generates on behalf of its investors, and a large part of that goes into staffing and infrastructure costs, not to mention that quant traders like to be paid sizable bonuses (and therefore would not want to work on a trade with a small upside).

I find it extremely unlikely (almost inconceivable, in fact) that a hedge fund would divert 10 researchers to work on a trade with $20m of potential upside.

Re:Algorithmic Trading: The Play-at-Home Version by sokoloff on Tuesday August 11, 2015 @07:56AM (#10040327)
"Standard" hedge fund compensation is 2-and-20 (2% of funds under management and 20% of gains), so a $2B fund would yield $40M in the 2% management fee. That's the "keep the lights on money".
Re:Algorithmic Trading: The Play-at-Home Version by murbard2 on Tuesday August 11, 2015 @09:45AM (#10040979)
Ten people, not ten researchers, but that would be towards the upper limit. Point is, $20M is nothing to sneer at, even for a billion dollar hedge fund.
Re:Algorithmic Trading: The Play-at-Home Version by exelius on Monday August 10, 2015 @02:20PM (#10036274)
Yeah, most people don't realize that finance is a zero-sum game. That leads to arms races which over time remove the lion's share of the profit (companies will spend money on a better solution to a problem until such time as a better solution costs more than the value of the opportunity).

I expect this to replicate itself on the low-end as well.

Re:Algorithmic Trading: The Play-at-Home Version by barrkel on Monday August 10, 2015 @03:31PM (#10036719)
I don't really see how finance is a zero-sum game.

I mean, trading in paper without any insight into the capital allocation the paper is abstracting, and observed over a very short time horizon, it's more or less zero-sum. Many synthetic products just distribute risk differently. Etc.

But finance more generally is helpful for efficiently allocating capital towards wealth generating industry - and by industry I mean it literally, people physically doing things, creating things, generating wealth by the sweat of their brow. When you own a share of a wealth-generating enterprise that grows in value, you're acquiring some fraction of the discounted future returns on that effort today. This isn't zero-sum; it's a slice of tomorrow's wealth, today. And it's backed by real action, actual things, products and services that you can use or exchange with other people for things you prefer more. These are things that didn't exist before the capital allocation, and may never have come about without it.

Re:Algorithmic Trading: The Play-at-Home Version by ericjang on Monday August 10, 2015 @03:41PM (#10036794)
Sorry, it was not my intention to suggest that trading is not productive, or that it's truly a zero-sum game.

You probably know this already, but I'll provide some more context for the interested:

In reality, two parties can walk away from a trade believing (in the moment) that they got the better deal. Otherwise, they wouldn't be trading in the first place. This results because people have different utility functions. A farmer might be willing to buy insurance that gives him negative expected value, because his utility function incorporates a larger risk term than the insurer. A fur trapper sells furs to a buyer because 1 pelt is not scarce to him. With derivative contracts this analogy gets a bit abstract, but the justifications hold.

Liquidity providers add liquidity to the market precisely because they think that the rebates are "worth more" than the liquidity they are providing. A liquidity taker might still fill their trade because they have a different utility function. The net gain for society would be the net gain in total utility, if we were somehow able to convert them into normalized units.

However, if the liquidity taker is a nearly identical firm with a nearly identical utility function, then that implies that the liquidity provider and taker disagree over who is on the losing side of the trade. One party has better information or luck than the other and the future eventually reveals which was the better choice.

To put it another way, I believe it is a zero sum game if players with identical utility functions (i.e. two small prop shops with $200K book) trade with each other. Both probably have identical utility functions, and future events will reveal whether buying or selling was the correct choice in terms of utility. There are quite a number of such players swimming in the market, so there is a zero-sum game of "who knows more" that goes on underneath the actual net utility provided by liquid markets.

Re:Algorithmic Trading: The Play-at-Home Version by gnaritas on Tuesday August 11, 2015 @01:42AM (#10039286)
> In reality, two parties can walk away from a trade believing (in the moment) that they got the better deal.

In reality, two parties can walk way not just believing, but actually getting the better deal. Both parties can be winners, there is not always a loser when a trade is made. One guy could be exiting a long while profiting taking while the counter party is opening a short, and they can both bank profit from the trade. Maybe one is hedging and doesn't mind if the trade goes against him because it's hedging another trade in his portfolio to keep him market neutral. The idea that one guy wins and one guy loses is simply far to simplistic.

Re:Algorithmic Trading: The Play-at-Home Version by infinite8s on Monday August 10, 2015 @03:52PM (#10036849)
Are there prop shops with books that small?
Re:Algorithmic Trading: The Play-at-Home Version by psykotic on Monday August 10, 2015 @10:22PM (#10038765)
Lots of them. "Prop shop" can be a glorified term for someone trading out of their personal funds.
Re:Algorithmic Trading: The Play-at-Home Version by ericjang on Monday August 10, 2015 @10:40PM (#10038823)
yeah, the person mentioned in the article trades a $200K pot with 3 others.
Re:Algorithmic Trading: The Play-at-Home Version by dasil003 on Monday August 10, 2015 @07:48PM (#10038240)
That's why the winning move is not to bet your own money, but instead to convince some whales to pay you fees to invest their money. From that perspective good algos are really just a marketing cost.
Re:Algorithmic Trading: The Play-at-Home Version by matiu on Monday August 10, 2015 @11:38PM (#10038966)
This is true.

As a fund owner, you know the magic formula: If your fund customers win, you win, if they loose, they loose.

It's a good position to be in.

Re:Algorithmic Trading: The Play-at-Home Version by TuringNYC on Tuesday August 11, 2015 @06:37AM (#10040071)
Not quite. There is a cost to building the system. The surrounding code could be massive. Also throw in accounting, reporting, regulatory requirements, etc and you are down quite a bit of overhead costs. Without the profit sharing, even charging a 2% expense would not cover all these -- especially your time value given someone with such skills can easily be making 200k on simple salary.
Re:Algorithmic Trading: The Play-at-Home Version by joosters on Monday August 10, 2015 @02:35PM (#10036361)
The 'zero-sum game' part is meaningless and adds no insight here. It doesn't matter whether you believe trading/gambling is zero-sum or not.

For instance, imagine you have a poker-playing bot at a poker table, where the house takes no cut of the stakes. Zero-sum? Yes. But your bot has to be better than the other players, and win more than its running costs in order to profit. Now imagine the same situation but the house does take a cut. Zero-sum? Not any more. But your bot still has to be better than the other players and its running costs in order to profit. The house 'rake' just increases your operating costs.

I think you are confusing the issue with large scale HFT (where companies pay more and more for slightly faster comms), which is a world away from the trading strategies the article is talking about.

Re:Algorithmic Trading: The Play-at-Home Version by SonicSoul on Monday August 10, 2015 @02:58PM (#10036515)
Think you missed the point. All he was saying (I believe) that no matter how good your models are it's still a race between the players to get the biggest share of the pot. The more players the less chance you have
Re:Algorithmic Trading: The Play-at-Home Version by joosters on Monday August 10, 2015 @03:21PM (#10036659)
That's true of many endeavors, and is unrelated to any 'zero-sum' argument.
Re:Algorithmic Trading: The Play-at-Home Version by jsprogrammer on Monday August 10, 2015 @03:00PM (#10036525)
Another way to look at your 'profit' is just as an increase in the operating costs of all the other players and the house.

I think the zero-sum part implies that this type of trading is not actually productive. At this point, it is literally just modifying numbers represented as fluctuations in local electro-magnetic fields instead of something useful like carrying spices from one continent to another.

Re:Algorithmic Trading: The Play-at-Home Version by fluidcruft on Monday August 10, 2015 @03:06PM (#10036557)
That's the logic suckers use when buying bitcoin mining hardware.
Re:Algorithmic Trading: The Play-at-Home Version by pjlegato on Monday August 10, 2015 @05:07PM (#10037351)
> finance is a zero-sum game

It's not, because new money is always entering the system from the real economy.

For example, there is not a fixed amount of money invested in the stock market that the players just trade among themselves in a zero-sum game. Under normal economic conditions, people make money in some other non-finance industry and invest it in stocks, increasing the total pool.

Re:Algorithmic Trading: The Play-at-Home Version by kittenfluff on Monday August 10, 2015 @01:50PM (#10036112)
> If you back test over the past 5 years then you are only testing your model against a huge bull market.

If your model is long as often as it is short (either cross-sectionally or in a time series sense) then this is less likely to be a problem.

A far bigger source of error for inexperienced researchers is incorrectly accounting (or not accounting at all) for trading costs, financing costs, roll costs, liquidity constraints, data delays, market impact etc.

Re:Algorithmic Trading: The Play-at-Home Version by vegabook on Monday August 10, 2015 @05:48PM (#10037646)
> So if you are writing your own trading models you should start by answering the question of what's your alpha when compared to everyone else....

This has been true of markets since well before computers got involved. When thousands of atomic participants are involved, what's your edge? The truth though is that participants "cluster" and "herd", and algos do too. Witness the correlation between all the algo hedge funds. Markets are prone to group psychology. Savvy, often contrarian-minded (or at the least "independent" minded) individuals always did, and still do, have a chance, and that includes algorithmic originality.

Re:Algorithmic Trading: The Play-at-Home Version by chejazi on Monday August 10, 2015 @02:49PM (#10036447)
One problem I encountered when backtesting a futures algorithm was fill rate. In real world scenarios, getting your orders filled can be a slippery slope. Latency can be a huge bust, especially as the market price accelerates away. Accounting for this is more important with HFT, where a position will only be held for a few pips.
Re:Algorithmic Trading: The Play-at-Home Version by namecast on Monday August 10, 2015 @02:09PM (#10036222)
> If you back test over the past 20 years then I'm not sure it helps much as the market of 20 years ago didn't really have any of the major market drives of today's markets

+1, and I'll add a link that argues that data pre-2009 is worthless for a great many (intraday) strategies:

http://www.priceactionlab.com/Blog/2015/07/historical-data-t...

And this is before we even start worrying about in-sample vs. out-of-sample...!

Re:Algorithmic Trading: The Play-at-Home Version by jsprogrammer on Monday August 10, 2015 @02:04PM (#10036196)
>How do you back test it to know that it works. If you back test over the past 5 years then you are only testing your model against a huge bull market.

>If you back test over the past 20 years then I'm not sure it helps much as the market of 20 years ago didn't really have any of the major market drives of today's markets, HFT's, huge numbers of hedge funds and the money they bring, and huge passive investing via ETF's, all those factors were there 20 years ago, but they weren't the major market drivers that they are now.

I imagine you wouldn't want to 'back test' over some arbitrarily selected number of years of data. You'd want an adaptive algorithm that could exploit 'trends' over any time period.

But, like someone else mentioned, backtesting is near meaningless: the only thing that matters is actual performance.

Re:Algorithmic Trading: The Play-at-Home Version by tomp on Monday August 10, 2015 @08:25PM (#10038391)
> You'd want an adaptive algorithm that could exploit 'trends' over any time period.

Of course that what you want, but how will you find it, and more importantly, how will you know you found it? In a bull market, an "adaptable general algorithm" that makes 10% in a year is statistically indistinguishable from an algorithm that buys and holds S&P500, unless you design your backtests very carefully.

Re:Algorithmic Trading: The Play-at-Home Version by jsprogrammer on Monday August 10, 2015 @09:16PM (#10038560)
Obviously it is a problem, but it will get you much further than the original suggestion to select some arbitrary number of days to go back.
Re:Algorithmic Trading: The Play-at-Home Version by baddox on Monday August 10, 2015 @02:06PM (#10036205)
You could say the same thing about starting a business, or choosing a college degree, or taking a certain job.
Re:Algorithmic Trading: The Play-at-Home Version by trhway on Monday August 10, 2015 @02:55PM (#10036491)
>If you back test over the past 20 years then I'm not sure it helps much as the market of 20 years ago didn't really have any of the major market drives of today's markets, HFT's, huge numbers of hedge funds and the money they bring, and huge passive investing via ETF's, all those factors were there 20 years ago, but they weren't the major market drivers that they are now.

well, giving the fractal nature of price movement, i'd guess one can backtest against last several days/weeks taken at very high resolution and scaled out to represent months/years :)

Re:Algorithmic Trading: The Play-at-Home Version by CPLX on Monday August 10, 2015 @01:40PM (#10036051)
> How do you back test it to know that it works.

You don't. You turn it on and see if it works. Which does have a certain degree of intellectual rigor to it.

> So if you are writing your own trading models you should start by answering the question of what's your alpha when compared to everyone else....

Well right, that's the core question isn't it. But clearly the allure of wanting to test ones own set of biases and insights for alpha is fairly understandable and appealing.

Re:Algorithmic Trading: The Play-at-Home Version by gnaritas on Tuesday August 11, 2015 @01:36AM (#10039265)
Back testing can't tell you something works, you're merely curve fitting no matter how careful you're trying to be; the role of back testing is making sure your algo trades when you expect it to. You need to forward test to see if it really works.