View Full Version : algorithmic trading
Bodhi Dharma Zen
6th January 2011, 11:17 AM
I'm currently implementing my algorithms using Tradestation, but I wonder if there is something better out there? My goal is to set up several robots, running all kind of algorithms, to trade automatically for me.
Anyone have experience in the area?
Thanks!
drkitten
6th January 2011, 01:58 PM
I'm currently implementing my algorithms using Tradestation, but I wonder if there is something better out there? My goal is to set up several robots, running all kind of algorithms, to trade automatically for me.
Anyone have experience in the area?
Thanks!
Yes. My advice is,.... don't. You don't have computers fast enough or pockets deep enough to play that game.
The Central Scrutinizer
6th January 2011, 02:43 PM
Yes. My advice is,.... don't. You don't have computers fast enough or pockets deep enough to play that game.
Ditto.
Does this have anything to do with you wanting more information on hedge funds?
A Laughing Baby
6th January 2011, 02:55 PM
I was about to say, given that he's posted information implying that he's a quant for a hedge fund, I would say it's not HIS pockets you should be worried about.
That said, anyone mind if we turn this into a discussion on algorithmic trading itself? I will withhold opinion until someone says one way or the other.
Fnord
6th January 2011, 02:59 PM
... I will withhold opinion until someone says one way or the other.
One way or the other.
A Laughing Baby
6th January 2011, 03:09 PM
One way or the other.
It's bad. Goodnight everyone.
More specifically, it's more prone to errors and weird spiral situations than normal man-to-man trading. If you bring it into speculative trading, more specifically commodities trading, then you combine two dangerous things. I really don't trust it.
Mr.D
6th January 2011, 06:39 PM
More specifically, it's more prone to errors and weird spiral situations
Just curious; Do you mean errors due to poorly implemented algorithms, errors due to markets behaving in an unexpected way, poorly created models or unexpected corner cases? (I'm guessing by "weird spiral situations," that you mean feedback loops or something similar)
Naively, I would expect simple algorithms to be straightforward to implement but perhaps not worth the effort, while complex algorithms to have potentially way too many chaotic regions in phase space to be reliable.
Fnord
6th January 2011, 07:39 PM
Chaotic regions are one thing, but when two or more powerful algorithms begin to both feed off and reinforce each other in a circular causal loop (a.k.a.: "Positive Feedback"), the system could be overloaded beyond its capacity to compensate and recover.
But then, I'm mostly familiar with algorithms used to control temperature, pressure, and fluid flow ... ever seen a polystyrene injection-molding line crash?
BobTheCoward
6th January 2011, 08:21 PM
You can't ignore Long Term Capital Management. Or, in a gambling context, bet stacking.
You probably do not have the capital to survive that 100 year economic event that runs counter to you model. Heck, LTCM was right, if they had more capital their strategy eventually worked and the bet that destroyed them did turn a profit.
piojunbabia
6th January 2011, 09:04 PM
You just got to code a good Expert Advisor for MT4 terminal trader. Many good programmers can make mql programs
A Laughing Baby
7th January 2011, 07:29 AM
Just curious; Do you mean errors due to poorly implemented algorithms, errors due to markets behaving in an unexpected way, poorly created models or unexpected corner cases? (I'm guessing by "weird spiral situations," that you mean feedback loops or something similar)
Naively, I would expect simple algorithms to be straightforward to implement but perhaps not worth the effort, while complex algorithms to have potentially way too many chaotic regions in phase space to be reliable.
When you get into high-frequency trading algorithms, you can in rare circumstances get the algorithms feeding off each other and giving each other false signals. There has been debate over whether it was this that led to the flash crash last year. As someone who makes predictive models for a living, I can tell you that there is simply too much for an algorithm to account for everything and still be perfectly safe. If I can be proved wrong on that, I'd be glad to walk that statement back. I'm not proud.
The Central Scrutinizer
7th January 2011, 07:56 AM
When you get into high-frequency trading algorithms, you can in rare circumstances get the algorithms feeding off each other and giving each other false signals. There has been debate over whether it was this that led to the flash crash last year.
I just read something a few weeks ago that pretty much concluded that as the cause.
A Laughing Baby
7th January 2011, 08:02 AM
Not to mention the danger that speculative trading already presents, but that's another topic.
Bodhi Dharma Zen
7th January 2011, 10:35 AM
TO ALL, good posts, I will tackle the ones that got my interest one by one :)
Yes. My advice is,.... don't. You don't have computers fast enough or pockets deep enough to play that game.
Guess it depends on the game, there are lots of games out there
Ditto.
Does this have anything to do with you wanting more information on hedge funds?
Yes, I'm currently giving it a try, and reading all I can, seeing which kind of software would be best to implement my algorithms, etc.
I was about to say, given that he's posted information implying that he's a quant for a hedge fund, I would say it's not HIS pockets you should be worried about.
That said, anyone mind if we turn this into a discussion on algorithmic trading itself? I will withhold opinion until someone says one way or the other.
That is an interesting discussion, algorithmic trading is, IMO, much better than DIY approaches.. of course, just if you know what you are doing...
Bodhi Dharma Zen
7th January 2011, 10:45 AM
More specifically, it's more prone to errors and weird spiral situations than normal man-to-man trading. If you bring it into speculative trading, more specifically commodities trading, then you combine two dangerous things. I really don't trust it.
I would like to understand better what you mean here.
Just curious; Do you mean errors due to poorly implemented algorithms, errors due to markets behaving in an unexpected way, poorly created models or unexpected corner cases? (I'm guessing by "weird spiral situations," that you mean feedback loops or something similar)
Naively, I would expect simple algorithms to be straightforward to implement but perhaps not worth the effort, while complex algorithms to have potentially way too many chaotic regions in phase space to be reliable.
Interesting ideas. IMO algorithms, if properly implemented, are nothing but "alter ego traders" that would do what humans do. So, if the human is a good trader, the algorithms should be able to trade faster and more instruments than humanly possible. Thats about it.
Chaotic regions are one thing, but when two or more powerful algorithms begin to both feed off and reinforce each other in a circular causal loop (a.k.a.: "Positive Feedback"), the system could be overloaded beyond its capacity to compensate and recover.
But then, I'm mostly familiar with algorithms used to control temperature, pressure, and fluid flow ... ever seen a polystyrene injection-molding line crash?
What are "chaotic regions"? and then, I believe such algorithms would pose a problem just if one have pockets deep enough to alter a particular market.. in my approximation, I want to be as transparent and invisible as possible...
You can't ignore Long Term Capital Management. Or, in a gambling context, bet stacking.
You probably do not have the capital to survive that 100 year economic event that runs counter to you model. Heck, LTCM was right, if they had more capital their strategy eventually worked and the bet that destroyed them did turn a profit.
What you mean by "bet stacking"?
Bodhi Dharma Zen
7th January 2011, 10:47 AM
You just got to code a good Expert Advisor for MT4 terminal trader. Many good programmers can make mql programs
Thank you... can you explain this a little bit more?
Bodhi Dharma Zen
7th January 2011, 10:48 AM
When you get into high-frequency trading algorithms, you can in rare circumstances get the algorithms feeding off each other and giving each other false signals. There has been debate over whether it was this that led to the flash crash last year. As someone who makes predictive models for a living, I can tell you that there is simply too much for an algorithm to account for everything and still be perfectly safe. If I can be proved wrong on that, I'd be glad to walk that statement back. I'm not proud.
Yes there are interesting insights in there... I wont be managing that kind of money, just a small hedge fund for friends... so I will not enter the high frecuency trading camp, just old fashioned algorithms to do what I already do.
Fnord
7th January 2011, 11:07 AM
... What are "chaotic regions"? ...
Hard to explain ... try this article on Chaos Theory[WP] (http://en.wikipedia.org/wiki/Chaos_theory). Scroll down to the part about "Strange Attractors". Basically, certain conditions can exist that allow for the initialization and the continuance of undesirable and unpredicatble behavior.
A single, well-designed algorithm might not have this effect, but two (or more) such algorithms working independently on the same variables might. Sorta like having two accountants working on the same dynamic spreadsheet without any knowledge of each other's actions.
The Central Scrutinizer
7th January 2011, 11:08 AM
Yes, I'm currently giving it a try, and reading all I can, seeing which kind of software would be best to implement my algorithms, etc.
Who do you expect to invest in your hedge fund? Won't they want to see a couple years of return data? Or at least know how your algorithm works?
A Laughing Baby
7th January 2011, 11:32 AM
Yes there are interesting insights in there... I wont be managing that kind of money, just a small hedge fund for friends... so I will not enter the high frecuency trading camp, just old fashioned algorithms to do what I already do.
That's a reasonable use of the concept, in my opinion. I have problems with algorithmic trading when it's used by people (in high frequencies) that have pockets deep enough to effect the market in some very strange ways.
Bodhi Dharma Zen
7th January 2011, 11:47 AM
Who do you expect to invest in your hedge fund? Won't they want to see a couple years of return data? Or at least know how your algorithm works?
Oh I have the data, I have been running my algorithms for 5 years in a row (not backtesting) and the results are very good. Now.. of course I'm not the best trader in the world, I'm learning, but I'm methodical, have a good grasp on the scientific method, and this is why I'm still learning how to be a better trader...
That's a reasonable use of the concept, in my opinion. I have problems with algorithmic trading when it's used by people (in high frequencies) that have pockets deep enough to effect the market in some very strange ways.
I share your feeling, nothing like that, I would put my knowledge to work, thats all.
Bodhi Dharma Zen
7th January 2011, 11:51 AM
Hard to explain ... try this article on Chaos Theory[WP] (http://en.wikipedia.org/wiki/Chaos_theory). Scroll down to the part about "Strange Attractors". Basically, certain conditions can exist that allow for the initialization and the continuance of undesirable and unpredicatble behavior.
A single, well-designed algorithm might not have this effect, but two (or more) such algorithms working independently on the same variables might. Sorta like having two accountants working on the same dynamic spreadsheet without any knowledge of each other's actions.
Seems like a good reading, thanks.
A Laughing Baby
7th January 2011, 11:51 AM
Just be wary of conditionals. They tend to be more strict than you would think.
Bodhi Dharma Zen
7th January 2011, 11:54 AM
Just be wary of conditionals. They tend to be more strict than you would think.
What you mean?
A Laughing Baby
7th January 2011, 01:54 PM
What you mean?
If-->then ALWAYS means if-->then, that's all!
Merko
7th January 2011, 02:25 PM
As with all forms of gambling, as long as you consider every penny you've put into the system to be lost, and any returns to be an unexpected bonus, you should be fine.
In other words, you may be the best trader/gambler in the world, but there is a significant chance that you will lose everything that you've put in due to some unfortunate (but not all that unlikely) event. You need to be sure that you can live with that eventuality.
piojunbabia
8th January 2011, 06:23 AM
Thank you... can you explain this a little bit more?
MT4 terminal has "Expert Advisor" It is a robot that do the trading depending how the "robot" has been coded... the language used is MQL for the MT4 terminals... the "better" the code has coded, the better the EA do.
*better - your strategy in trading...
piojunbabia
8th January 2011, 06:25 AM
Thank you... can you explain this a little bit more?
MT4 terminal has "Expert Advisor" It is a robot that do the trading depending how the "robot" has been coded... the language used is MQL for the MT4 terminals... the "better" the code has coded, the better the EA do.
*better - your strategy in trading...
BobTheCoward
8th January 2011, 10:12 AM
What you mean by "bet stacking"?
Take a game with close to 50-50 odds and close to 50-50 payout. Lets go with betting black on roulette. With infinite capital and a willing casino, you cant lose. First bet 10, then if you lose, bet 20, then 40, and so on. As so as you win, reset to 10. If the table has a 500 dollar limit, that is only 7 bets which is far to risky for me.
Bodhi Dharma Zen
10th January 2011, 10:23 AM
MT4 terminal has "Expert Advisor" It is a robot that do the trading depending how the "robot" has been coded... the language used is MQL for the MT4 terminals... the "better" the code has coded, the better the EA do.
*better - your strategy in trading...
I will take a look, have been using Tradestation from a while, maybe there are other programs better suited for my needs. Thanks.
Bodhi Dharma Zen
10th January 2011, 10:25 AM
As with all forms of gambling, as long as you consider every penny you've put into the system to be lost, and any returns to be an unexpected bonus, you should be fine.
In other words, you may be the best trader/gambler in the world, but there is a significant chance that you will lose everything that you've put in due to some unfortunate (but not all that unlikely) event. You need to be sure that you can live with that eventuality.
You assume it is gambling, but, it is not. Far more variables are involved, and you can control risk using a diversity of techniques. Sure, it is pretty close to gambling to be interpreted like that.. but it is not the same.
Ok, strictly and skeptically speaking, in gambling and in trading you "believe" you "know" something that will allow you to "profit" from a transaction. In both cases, the "belief" might be just in the mind of the beholder, but it is very different to believe that "next time the roulette will hit this number because for the last three years it hasn't received a hit"... than to believe that a particular stock will tend to increment its price because a positive news hit the media, and a record volume was recorded in that particular day...
NoCoPilot
10th January 2011, 10:30 AM
I have read several studies on the matter, and without exception they all conclude that program trading fares WORSE than random or totally undirected trading.
I mean, it's your money and you can do what you want, but the phrase "There's a sucker born every minute" comes to mind....
Bodhi Dharma Zen
11th January 2011, 09:58 AM
I have read several studies on the matter, and without exception they all conclude that program trading fares WORSE than random or totally undirected trading.
I mean, it's your money and you can do what you want, but the phrase "There's a sucker born every minute" comes to mind....
Ad hominem. Save it.
Fast Eddie B
11th January 2011, 10:19 AM
I don't believe that, in principle, any algorithm can consistently beat the market.
If it could, it would go into wide usage and its effects would be canceled out*.
Right?
I think the whole concept of "technical analysis" is bogus, for the same reasons. You can always look back at a chart and find patterns. Using charts to predict future moves just does not work.
*I already suspect there's a logical fallacy in there somewhere - argument from final consequences? - but I still think its valid.
roger
11th January 2011, 10:26 AM
Ok, strictly and skeptically speaking, in gambling and in trading you "believe" you "know" something that will allow you to "profit" from a transaction. In both cases, the "belief" might be just in the mind of the beholder, but it is very different to believe that "next time the roulette will hit this number because for the last three years it hasn't received a hit"... than to believe that a particular stock will tend to increment its price because a positive news hit the media, and a record volume was recorded in that particular day...It's exactly the same, until you've incorporated a risk model into the equation. Small gains, for years, compounded into a glorious pile of cash, still equals $0 when you crash.
You are playing a game against thousands of PhDs (Wall Street hired armies of Russian mathematicians back in the 90s), armed with probably a billion dollars worth of supercomputers backed by a house that does not have to pay transaction fees (because they own the computers that perform the transactions), running systems that can execute round trip trades in the microseconds. They have AI systems that read the news and trade on it, and a multitude of other things you will never hear about because they are closely guarded secrets.
Sure, it's possible that you thought of something that no one else has thought of. But, it's a heck* of a lot more possible that your boat is caught in a rising tide. As Warren Buffett says, you learn who is wearing swim trunks when the tide goes out.
* where heck = near certainty. We have a wealth of data on these schemes - they only make money in the very special conditions mentioned above - unimaginably deep pockets, no transaction or frictional costs, and the luck to not be operating during a crisis. I concede we have no data on your specific algorithm, but you made it sound like nothing special. This is neither me being mean or issuing an ad hom - but if your algorithm does not have the backing of PhD level math, you ain't even on the playing field.
roger
11th January 2011, 10:31 AM
I don't believe that, in principle, any algorithm can consistently beat the market.
If it could, it would go into wide usage and its effects would be canceled out*.
Right?That is true for any investing scheme. It's true for my beloved Graham/Dodd/Fischer/Buffett style of value investing. This at least has the advantage of having very few people using it.
But TA and/or algorithmic trading? That's the big bucks money maker on Wall Street, where they skim pennies off massive volume of trades. It all works great - until it doesn't. Those fat tails wipe out everyone, eventually.
drkitten
11th January 2011, 11:06 AM
I don't believe that, in principle, any algorithm can consistently beat the market.
If it could, it would go into wide usage and its effects would be canceled out*.
Right?
No. The whole point of a trade secret or the idea of intellectual property is to prevent this (in general, not restricted to algorithmic trading).
If I invent something and I simply use it, instead of share it, it won't necessarily get into wide use.
Of course, if I'm using an algorithm or stock screener that I found on The Motley Fool or read about in Peter Lynch, then it's quite likely that it's already in wide use. But there's a reason that Lynch only started writing books about how to value stocks using PEG ratios after he had retired from the Magellan Fund.
drkitten
11th January 2011, 11:16 AM
But TA and/or algorithmic trading? That's the big bucks money maker on Wall Street, where they skim pennies off massive volume of trades. It all works great - until it doesn't. Those fat tails wipe out everyone, eventually.
To be fair,.... it doesn't have to. If your algorithm includes "take money off the table every so often," then you won't be wiped out by the fat tails, because you've already got a huge wodge of cash you've earned.
That's one of the problems of the Wall Street model of investing. It's not really so much a problem as a misunderstanding (read the manual, guys); the guys who actually run the hedge funds understand this and so pay themselves first before they pay the investors. In theory, the investors are supposed to know to take profits away from the hedge funds and only leave the hedge funds with money they can afford to lose. In practice, too many clients see the money that is earned during good times and "let it ride" too long. $1 becomes $2 becomes $4 becomes $8 becomes $16 becomes $0.
If instead every time you won the bet you'd put it in your pocket, you'd be up 300% irreversibly, instead of reversibly up 1600% just before The Crash.
The Central Scrutinizer
11th January 2011, 11:28 AM
It's exactly the same, until you've incorporated a risk model into the equation. Small gains, for years, compounded into a glorious pile of cash, still equals $0 when you crash.
You are playing a game against thousands of PhDs (Wall Street hired armies of Russian mathematicians back in the 90s), armed with probably a billion dollars worth of supercomputers backed by a house that does not have to pay transaction fees (because they own the computers that perform the transactions), running systems that can execute round trip trades in the microseconds. They have AI systems that read the news and trade on it, and a multitude of other things you will never hear about because they are closely guarded secrets.
The big firms also try to place their computers as close as possible to the exchange computers. Every nano-second counts. Being 300 feet away means your trade beats the guy who is 1000 feet away.
As Warren Buffett says, you learn who is wearing swim trunks when the tide goes out.
The actual quote is "You learn who is swimming naked when the tide goes out". :)
The Central Scrutinizer
11th January 2011, 11:43 AM
But TA and/or algorithmic trading? That's the big bucks money maker on Wall Street, where they skim pennies off massive volume of trades. It all works great - until it doesn't. Those fat tails wipe out everyone, eventually.
I wonder if we're talking about 2 different things here? There's the high speed algorithmic trading done by the big firms, who don't care what kind of company XYZ is, or whether the stock is going up, down or sideways, they only care that they can take advantage of the 1000th of a cent difference that exists between NY and London for a fraction of a second.
The other kind of algorithm would be more akin to the stock screen mentioned elsewhere, I would think. Anyone can get in that game. The problem of course, at least with a lot of the ones I have seen, is that the people who use them filter their results through rose tinted glasses:
"My algorithm returned 80% annually from 1997-2001"
"Yes, but you have no money. Enron and Furniture.com wiped you out"
"But if we throw out those statistical anomolies, my algorithm would have returned 80% annually"
marplots
11th January 2011, 11:53 AM
If you are just trying to mimic what you do algorithmically, then you might think of testing the results against what you actually do before you come to trust the program. Shouldn't be too hard.
Once you are confident, let it run and take some time off to enjoy that new whirlpool in the backyard.
I'm a writer and I've seen some attempts at this to generate web content. Sometimes starting with human-generated prose. I haven't yet found anything close to what I do. So no whirlpool for me.
I think the best I might hope for is something like spell check or a thesaurus-based suggestion -- a tool that would make me more efficient, but not replace me.
drkitten
11th January 2011, 12:07 PM
I wonder if we're talking about 2 different things here? There's the high speed algorithmic trading done by the big firms, who don't care what kind of company XYZ is, or whether the stock is going up, down or sideways, they only care that they can take advantage of the 1000th of a cent difference that exists between NY and London for a fraction of a second.
The other kind of algorithm would be more akin to the stock screen mentioned elsewhere, I would think. Anyone can get in that game. The problem of course, at least with a lot of the ones I have seen, is that the people who use them filter their results through rose tinted glasses.
The distinction isn't as clear as you might think; a lot of the supercomputers try to buy in the spread between the big/ask when it looks like a big order is going in that will shift the spread. E.g. if Buffett wants to pick up a billion shares of Ford, I'd love to pick up a hundred thousand shares just before he does. So I might well have a computer programmed, in essence, to "watch Buffett and rudely cut in front of him."
"My algorithm returned 80% annually from 1997-2001"
"Yes, but you have no money. Enron and Furniture.com wiped you out"
"But if we throw out those statistical anomolies, my algorithm would have returned 80% annually"[/QUOTE]
roger
11th January 2011, 03:03 PM
I wonder if we're talking about 2 different things here? There's the high speed algorithmic trading done by the big firms, who don't care what kind of company XYZ is, or whether the stock is going up, down or sideways, they only care that they can take advantage of the 1000th of a cent difference that exists between NY and London for a fraction of a second. I commonly write pretty loosely on forums. You are right, Wall Street uses many different techniques - some are doing nothing but microsecond arbitrage, others are reacting to news events and trying to get in and out before everyone else does, others use nearly unimaginable times scales to them for the buy/sell decision (sometimes even holding overnight!!!!!!). I'm not in the fray, so I can't say in detail all the things that go on. I do know the amount of processing power and brain power being thrown at the problem (had a job offer once to become one of them, turned it down), and suspect that you, I, or the OP writer don't have a game when it comes to playing this way. I buttress this opinion observationally (you are trying to beat wall street at what they do best, when have fractional to nonexistent transaction costs, are making the bid/ask spread rather than paying for it, etc) and intellectually (papers have only found techniques that work for stock iff you have 0 transaction costs).
It's also worth realizing the skewed risk models Wall Street uses. If you are buying for the house, and screw up, you lose your job and go on to another firm. If you win, you become 7 to 8 figure wealthy through bonuses. That encourages swinging for the fences. It's a mess, and it's why I'll never buy a financial - who knows what skewed risk taking is going on behind the scenes?
The Central Scrutinizer
11th January 2011, 03:10 PM
I commonly write pretty loosely on forums. You are right, Wall Street uses many different techniques - some are doing nothing but microsecond arbitrage, others are reacting to news events and trying to get in and out before everyone else does, others use nearly unimaginable times scales to them for the buy/sell decision (sometimes even holding overnight!!!!!!). I'm not in the fray, so I can't say in detail all the things that go on. I do know the amount of processing power and brain power being thrown at the problem (had a job offer once to become one of them, turned it down), and suspect that you, I, or the OP writer don't have a game when it comes to playing this way. I buttress this opinion observationally (you are trying to beat wall street at what they do best, when have fractional to nonexistent transaction costs, are making the bid/ask spread rather than paying for it, etc) and intellectually (papers have only found techniques that work for stock iff you have 0 transaction costs).
It's also worth realizing the skewed risk models Wall Street uses. If you are buying for the house, and screw up, you lose your job and go on to another firm. If you win, you become 7 to 8 figure wealthy through bonuses. That encourages swinging for the fences. It's a mess, and it's why I'll never buy a financial - who knows what skewed risk taking is going on behind the scenes?
Yeah, I certainly hope he's not trying to compete with the arbitragers!
That's why I'm thinking he's writing an algorithm more along the lines of a "screen" - if a stock has a PE < 10 and trading volume > 10000 shares for 37 consecutive days and institutional ownership > 22% and a 52 week high > 46% higher than the current trading price, etc... Which was the point of my post earlier - I've seen a ton of these post spectacular returns, but only after you toss out those pesky Enrons.
roger
11th January 2011, 03:11 PM
To be fair,.... it doesn't have to. If your algorithm includes "take money off the table every so often," then you won't be wiped out by the fat tails, because you've already got a huge wodge of cash you've earned. Amen!
Sorry, I was imagining I was in a revival tent for a moment. I couldn't agree more.
The OP was asking because he plans to start a hedge fund (note to interested readers - don't invest with a hedge fund that needs to ask on a forum how to run a hedge fund. ). I've yet to hear of a hedge fund that promises diminished performance each year, which is what 'take the money off the table' amounts to. Kind of cuts into the two and twenty.
It still comes down to - show me your risk model. By not reinvesting earnings, you can reduce risk - and equally reduce multi-year compound performance. Before long you are not beating the market, but trailing it. I'm having a hard time convincing myself to invest in the stock market if my intent is to do worse than it.
The Central Scrutinizer
11th January 2011, 03:16 PM
The OP was asking because he plans to start a hedge fund (note to interested readers - don't invest with a hedge fund that needs to ask on a forum how to run a hedge fund. ).
I also hope the OP realizes this is not a game. It's one thing to take money from family - "Sure Billy, here's $100 for you to invest with your little algorithm. Hopefully you'll make me a millionaire!" - but it's another to take $50,000 from friends (soon to be ex-friends) or even worse, strangers. Strangers who have lawyers. Who they call when they find out their $50,000 is gone.
roger
11th January 2011, 03:24 PM
That's why I'm thinking he's writing an algorithm more along the lines of a "screen" - if a stock has a PE < 10 and trading volume > 10000 shares for 37 consecutive days and institutional ownership > 22% and a 52 week high > 46% higher than the current trading price, etc... Which was the point of my post earlier - I've seen a ton of these post spectacular returns, but only after you toss out those pesky Enrons.That stuff has been addressed academically. They've created a huge number of different rules based different settings (try this rule with PE < 10, try this rule with PE < 9, try this rule with ownership at 22%, at 23%, on and on for all the different permutations), and nothing has been shown to work. Oh, you can have spectacular performance for awhile, until you don't, and that awhile hits at a different place for everyone. So there are tons of people out there gloating about their 5 year returns, oblivious to the extreme likelihood that their Enron purchase is coming. Which is to say I'll happily stipulate Bodhi's self reported numbers, I just view them as useless for determing whether he has actually devised a winning strategy with low risk.
roger
11th January 2011, 03:45 PM
I also hope the OP realizes this is not a game. It's one thing to take money from family - "Sure Billy, here's $100 for you to invest with your little algorithm. Hopefully you'll make me a millionaire!" - but it's another to take $50,000 from friends (soon to be ex-friends) or even worse, strangers. Strangers who have lawyers. Who they call when they find out their $50,000 is gone.
The 506 rule rather annoyingly expects your investors to be accredited, and very well heeled. Of course, if you have more than $30MM in management, and under 15 clients, you can get around some rules. In any case, as a hedge fund you are talking about far more than a paltry 50K.
Of course Bodhi can go ahead and start an incubator fund to avoid some of the onerous registration requirements, and to be able to use play money amounts, but the government is a bit of a stickler that you actually use your own money in this case.
IANAL, and the above does not constitute legal advice.
The Central Scrutinizer
11th January 2011, 03:59 PM
The 506 rule rather annoyingly expects your investors to be accredited, and very well heeled. Of course, if you have more than $30MM in management, and under 15 clients, you can get around some rules. In any case, as a hedge fund you are talking about far more than a paltry 50K.
Of course Bodhi can go ahead and start an incubator fund to avoid some of the onerous registration requirements, and to be able to use play money amounts, but the government is a bit of a stickler that you actually use your own money in this case.
IANAL, and the above does not constitute legal advice.
As a real hedge fund you are taking a lot more than $50K. There's nothing to stop him from taking money from folks and investing it, i.e. not registering, off the books. Although at some point I suspect you will run afoul of securities law (especially if your clients start squawking). You would know more about that than I.
Like I said above, not a game.
drkitten
11th January 2011, 05:35 PM
The OP was asking because he plans to start a hedge fund (note to interested readers - don't invest with a hedge fund that needs to ask on a forum how to run a hedge fund. ). I've yet to hear of a hedge fund that promises diminished performance each year, which is what 'take the money off the table' amounts to. Kind of cuts into the two and twenty.
Hedge fund, no. Although I've seen those kind of promises from so-called "lifestyle funds," the kind of fund that promises to adjust its risk portfolio in keeping with a target retirement age (and lifestyle). E.g, the "retire in 2050" fund is heavily into all sorts of risky stuff, but will have turned into practically a bond/money market fund in 2045.
The idea, of course, is that the lifestyle funds are for people too dumb, lazy, or scared to handle their own asset allocation. If you're wealthy enough to be in a hedge fund (specifically), you should be able to handle that particular job.
But, hey, maybe there's a market niche out there to be exploited for a lifestyle hedge fund.... (I dunno, maybe something for recording artists and sports stars?)
piojunbabia
11th January 2011, 06:46 PM
I will take a look, have been using Tradestation from a while, maybe there are other programs better suited for my needs. Thanks.
I have not heard about Tradestation, I only used MT4 ever since. They have this EA or Expert Advisor in which it can be reprogrammed.
have a look at this (http://www.metaquotes.net/en/metatrader4/automated_trading)
roger
11th January 2011, 10:00 PM
As a real hedge fund you are taking a lot more than $50K. There's nothing to stop him from taking money from folks and investing it, i.e. not registering, off the books. Although at some point I suspect you will run afoul of securities law (especially if your clients start squawking). You would know more about that than I.
Like I said above, not a game.
I pretty much think that is what he means. It's highly illegal, as in the past funds took extreme advantage of the punters.You just can't take somebody's money and invest it for them. I also pretty much think he is talking about a mutual fund, in that I've seen no real mention of hedging. You'd have to be an idiot to pay hedge fund prices for mutual fund investing, but people do it. Google shows plenty of people running 'dorm room' funds and such, and bully for them. Until, you know, you blow somebody's wad and the lawyers show up and start quoting all the laws you broke. Then you are talking serious jail time.
Fast Eddie B
12th January 2011, 04:06 AM
Can I assume that any given algorithm will attempt to predict future price moves from past moves and take advantage of that with select trades going forward?
I would ask that if such a thing is possible, why not do the same thing for lottery numbers - the payoff could be much larger!
I'm being facetious, of course, but isn't the flaw in reasoning in the latter equally applicable to the former?
roger
12th January 2011, 09:45 AM
Can I assume that any given algorithm will attempt to predict future price moves from past moves and take advantage of that with select trades going forward?No, you cannot assume that. Robust algorithms (I'm not talking about "it looks like a butterfly" TA crap) are not looking so much at price but other things - debt, EOA, PE, etc. We know in fact that market prices do respond to such things. The problem is getting in before everyone else got in. Investment banks, owning the traders, the people making the bid/ask spread, and charging the commissions, have a huge advantage over joe smoe running TradeStation or whatever.
Fast Eddie B
12th January 2011, 09:55 AM
Robust algorithms (I'm not talking about "it looks like a butterfly" TA crap) are not looking so much at price but other things - debt, EOA, PE, etc.
By law, aren't those things all public knowledge?
We know in fact that market prices do respond to such things. The problem is getting in before everyone else got in.
Aye, there's the rub!
I guess as soon as that "problem" gets "solved" by a given algorithm, someone will massage it to "get in" just a tad sooner. And again and again.
I suspect there's a fundamental flaw here. If one could make even fairly small gains consistently over time, the power of compound earning could make on a gazillionaire over time. Again, I'm arguing from final consequences, but I still think there's a fundamental problem in the whole outlook.
The Central Scrutinizer
12th January 2011, 10:11 AM
By law, aren't those things all public knowledge?
No. In fact, the good ones (the ones that might actually work) are closely guarded trade secrets.
drkitten
12th January 2011, 10:17 AM
By law, aren't those things all public knowledge?
The ingredients of Coke are also public knowledge; ultimately, Coke, like everything else in the world, is composed of protons, neutrons, and electrons.
But just because you know the components doesn't mean that you know how to put them together. That's what the intellectual property involved in algorithmic trading is. Out of the universe of indicators, which ones do you use, how do you evaluate them, and how do you weight them?
I suspect there's a fundamental flaw here. If one could make even fairly small gains consistently over time, the power of compound earning could make on a gazillionaire over time.
Um,.... JP Morgan Chase has something like $2 trillion in assets. That's more than 1% of the world's assets. That's pretty close to a gazillionaire, at least where I sit.
In particular, JPMC is at the point where it can't make small gains consistently any more, because it doesn't have many spots left where it can invest enough to move the needle. Hell, even Buffett, with his mere billions, has that problem. But most investors and even most funds don't have that problem. I'd be quite delighted if someone could turn a hundred thousand of mine into a mere ten million.
A Laughing Baby
12th January 2011, 10:26 AM
Going back a bit in the thread, but if you think any sort of speculative trading is not gambling, you're deceiving yourself. You can manage risk in any sort of fashion you would like, but it is still wagering money on a certain outcome in the future.
eta: In fact, I would go so far as to say that it was this self-deception that lead to the speculative real estate bubble. Just because you have a risk hedging procedure in place (like CDOs, securitization, copula-based valuation procedures) doesn't mean that, you know, there is still risk inherent to your action. In other words, it's a gamble.
drkitten
12th January 2011, 10:46 AM
Going back a bit in the thread, but if you think any sort of speculative trading is not gambling, you're deceiving yourself. You can manage risk in any sort of fashion you would like, but it is still wagering money on a certain outcome in the future.
Only in the sense that what the casino does is also gambling.
The casino, however, has a strong statistical edge; it has confidence verging on certainty that it will make money in the long run from the patrons; the rubes at the craps table have no such confidence.
Investing in stocks can have almost that same degree of confidence.
If you offer me even money that it will snow in New York City on the 4th of July, am I "gambling" when I accept?
A Laughing Baby
12th January 2011, 10:48 AM
Only in the sense that what the casino does is also gambling.
The casino, however, has a strong statistical edge; it has confidence verging on certainty that it will make money in the long run from the patrons; the rubes at the craps table have no such confidence.
Investing in stocks can have almost that same degree of confidence.
If you offer me even money that it will snow in New York City on the 4th of July, am I "gambling" when I accept?
On the other hand, speculative trading can actually have an outcome on the very thing it's speculating against. For example, just look to the housing market 2 years ago or the commodoties index today. Bear in mind that I'm specifically referring to speculative trading, and not referring to sure-bet deals, etc.
Fast Eddie B
12th January 2011, 11:34 AM
No. In fact, the good ones (the ones that might actually work) are closely guarded trade secrets.
I think we're talking past each other.
I was replying to "Robust algorithms...are not looking so much at price but other things - debt, EOA, PE, etc."
Those (debt, EOA, PE...) are all public information, right?
I was NOT referring to the algorithms themselves.
The Central Scrutinizer
12th January 2011, 11:52 AM
I think we're talking past each other.
I was replying to "Robust algorithms...are not looking so much at price but other things - debt, EOA, PE, etc."
Those (debt, EOA, PE...) are all public information, right?
I was NOT referring to the algorithms themselves.
Yes, public information. Via stock listings and/or annual reports or other filings.
psionl0
12th January 2011, 10:25 PM
What you mean by "bet stacking"?
Take a game with close to 50-50 odds and close to 50-50 payout. Lets go with betting black on roulette. With infinite capital and a willing casino, you cant lose. First bet 10, then if you lose, bet 20, then 40, and so on. As so as you win, reset to 10. If the table has a 500 dollar limit, that is only 7 bets which is far to risky for me.I used to know that as the "Martingdale" system. Like any casino based gambling system, you can't win in the long run because casino games are designed such that on average, the casino gets a small percentage of each bet that you wager. It turns out that betting systems favour the casino because the more often you make a wager, the more often the casino gets a percentage of your bet.
I don't know of any computer systems that could pick winners in the stock exchange (you certainly wouldn't learn about them here ;)) but if your track record in picking movements in share prices is even marginally better than 50-50 then you could become effectively the casino to the mug stock market (bettor).
Suppose that you pick up a stock that you intend to close on when you either gain $x or lose $x (if you think the share price will rise, you buy and if you think it will fall then you short it). Then you are effectively betting on a 50-50 proposition like you would on baccarat or roulette except that the advantage is yours depending on your winner/loser track record.
Now all you need to do is find a dangerous betting system and use it in reverse. One system that appears to be responsible for more gambler suicides than any other is the Labouchere (http://www.fortunepalace.co.uk/labouchere.html) or cancellation system. Under this system, gamblers consistently make a profit until they hit a 2:1 losing streak which wipes them out totally. Using this system in reverse against the stock market, you will consistently make small losses until your predictions hit the magic 2:1 success ratio when you could make a killing.
The foregoing is theory of course. However, if you want to test your skills (or luck) as a day trader, then http://www.plus500.com/ is geared up so that you can test your skills and gambling systems this way.
Fast Eddie B
13th January 2011, 04:32 AM
...but if your track record in picking movements in share prices is even marginally better than 50-50 then you could become effectively the casino to the mug stock market (bettor).
I think some time spent with an Excel spreadsheet or equivalent can be illuminating.
For the sake of argument, let's assume someone claims to have a program that can, on average, flag quick transactions that result in an average net gain of 5% in and out.
If one can average that and keep reinvesting, my spreadsheet shows that in 200 trades one could turn an initial $10,000 into over 1.1 billion dollars. Keep it going for 300 trades and you're at about 390 billion dollars.
You can argue with the 5%, and this doesn't take into account the short-term capital gains taxes, but I think its illuminating nonetheless.
Many years ago - I had a friend show me a system he had for trading currency futures. This was pre-web and at that time needed an expensive means of getting near instantaneous data. It all sounded good, but I'll leave you to guess how it turned out.
psionl0
13th January 2011, 04:56 AM
I'll leave you to guess how it turned out.Ooh! Ooh! I know! Either the 5% average return proved to be too optimistic or your friend hit a bad patch. It's funny how financial advisors often prattle on about the "magic" of compound interest but fail to point out how many years can be wiped off your investment strategy even with a minor setback. You really need a fortunate life if you want to get rich just from compounding your investments.
If you are effectively doing the Martingdale system in reverse then every bad pick will put you right back at square one.
roger
13th January 2011, 08:51 AM
I don't know of any computer systems that could pick winners in the stock exchange (you certainly wouldn't learn about them here ;)) but if your track record in picking movements in share prices is even marginally better than 50-50 then you could become effectively the casino to the mug stock market (bettor).Well, not really. There are many costs you need to factor in. The bid/ask spread. Taxes. Brokerage costs. Opportunity costs (you could just put your money in an S&P index fund and average 4% for the next several decades). Catastrophic losses (company announces bankrupcy while you are holding it, etc).
To make the strategy worthwhile you have to beat all of those in addition to predicting price changes. Academic papers have revealed strategies that work in limited cases, where everything but the price swings are nonexistent. Big investment banks can make some of those disappear, but if you don't own a brokerage and trading network you cannot. The result is any trading strategy studied ends up being a loser (for example, taxes for short term trades are at 35% or so, and 15% for long term trades. That's a huge hurdle to overcome, and it alone consigns active trading to speculation). Which is not to say that there is not an unstudied or uninvented strategy that would make money, but I prefer to keep to the known set of facts when investing my $. YMMV.
edit: and, of course, the most obvious thing is that profit/losses are not symmetric. Start with $1000. lose 50%. Gain 50%. Are you back at $1000? No, not even close, you have $750 left. So if you are just slightly above 50% in predictions, you are losing money.
psionl0
13th January 2011, 09:56 AM
Well, not really. There are many costs you need to factor in. The bid/ask spread. Taxes. Brokerage costs. Opportunity costs (you could just put your money in an S&P index fund and average 4% for the next several decades). Catastrophic losses (company announces bankrupcy while you are holding it, etc).
This is true when you are buying/selling shares on the stock exchange. Brokerage alone would make day trading unviable unless you were dealing in large volumes.
However, plus500 (http://www.plus500.com/) is not a stock exchange site. It is a gambling website where you are betting on the price of shares/commodities/currencies/indexes without actually buying or selling these things. The only cost is the difference between the buying and selling price of the item (typically 0.1% to 0.2% of the buying price). You have the option of using real money or play money just like any other gambling site. It's a lot of fun.
edit: and, of course, the most obvious thing is that profit/losses are not symmetric. Start with $1000. lose 50%. Gain 50%. Are you back at $1000? No, not even close, you have $750 left. So if you are just slightly above 50% in predictions, you are losing money.
The same applies if you use this strategy at the roulette table but I am not advocating this.
roger
13th January 2011, 10:16 AM
However, plus500 (http://www.plus500.com/) is not a stock exchange site. It is a gambling website where you are betting on the price of shares/commodities/currencies/indexes without actually buying or selling these things.Oh, gotcha.
timhau
13th January 2011, 11:36 AM
(note to interested readers - don't invest with a hedge fund that needs to ask on a forum how to run a hedge fund. )
:big:
psionl0
13th January 2011, 09:27 PM
I think some time spent with an Excel spreadsheet or equivalent can be illuminating.
For the sake of argument, let's assume someone claims to have a program that can, on average, flag quick transactions that result in an average net gain of 5% in and out.
If one can average that and keep reinvesting, my spreadsheet shows that in 200 trades one could turn an initial $10,000 into over 1.1 billion dollars. Keep it going for 300 trades and you're at about 390 billion dollars.
It is also interesting to use a spreadsheet to examine the Martingale system.
If one is prepared to make N bets (doubling up each time you lose) and the probability of winning an individual bet is p then the formula for the amount of money you would make from an initial investment of 1 unit is
W = 1 - (2 - 2p)^N
If you double up each time you win then the formula becomes
W = (2p)^N - 1
When p = 0.5, it is a zero sum gain in either case (as expected) no matter how many times you double up. However, if p is just marginally less than 0.5 then the spreadsheet shows that the expected losses increase without limit if you double up each time you lose (thus debunking the theory that if there is no limit to how many times you can double up then winning your initial unit is a certainty) while if you double up every time you win, you will almost certainly lose your initial unit if you keep the system going long enough. The results are reversed if p is marginally greater than 0.5 (winning instead of losing).
The message for stock market punters is that you can't overcome poor choices by "bet stacking".
Bodhi Dharma Zen
31st May 2011, 11:14 AM
This thread was going ok, I am surprised by seeing that several members are very good and fast to express reasons about why it can't be done, without actually having tried. Guess the same is true in every field.
Is making money out from the markets difficult? yes of course. Developing a solid strategy, using scientific methods to test it, then trying it with real money, all that consumes time, brains and money. It is not for everyone? no it is not.
I have to say that I hate gambling, I have been in Vegas two times and have not gambled once, not even 100 dollars "for fun".. That said, investing can be gambling, and can be VERY profitable. Very. It all depends on the approaches one uses, the expectations, the analysis, the tools you use. I have been developing algorithms using a dedicated math software, with strange statistical approaches from fields like artificial intelligence, perceptual models and pattern recognition. It is a very interesting field.
timhau
31st May 2011, 11:19 AM
So... how's the hedge fund doing?
Bodhi Dharma Zen
31st May 2011, 11:35 AM
So... how's the hedge fund doing?
Still in research mode.
JJM 777
31st May 2011, 12:25 PM
My goal is to set up several robots, running all kind of algorithms, to trade automatically for me.
I wonder if it would be possible to scan the trading system to detect any algorithmic behaviour, then take advantage of the algorithmic agent in some way that becomes possible from understanding how it makes its decisions, automatically and blindly without any human involved.
If this is possible, the big guys probably are doing it already.
timhau
31st May 2011, 12:39 PM
Sort of like flash trading (http://en.wikipedia.org/wiki/Flash_trading), you mean?
Bodhi Dharma Zen
31st May 2011, 12:53 PM
I wonder if it would be possible to scan the trading system to detect any algorithmic behaviour, then take advantage of the algorithmic agent in some way that becomes possible from understanding how it makes its decisions, automatically and blindly without any human involved.
If this is possible, the big guys probably are doing it already.
Theoretically, you should be able, if.. you can keep track of their transactions.
JJM 777
31st May 2011, 01:27 PM
I once was asked by a devout Christian to write for him an algorithmic trading program that he would use for making money to Godīs kingdom. He had an algorithm idea in mind. I told him that trading software probably exist already, just acquire one and insert his preferred algorithms there. I never heard of him since.
Fast Eddie B
31st May 2011, 05:51 PM
I wonder if it would be possible to scan the trading system to detect any algorithmic behaviour, then take advantage of the algorithmic agent in some way that becomes possible from understanding how it makes its decisions, automatically and blindly without any human involved.
If that could be done, doesn't one rapidly get into some sort of infinite regression?
This is all slightly above my pay grade, but let's say you come up with an algorithm that will show when Apple, Inc. will tick up, and you can jump in and profit from small moves. Someone else writes an algorithm that sniffs out that algorithm and attempts to scoop it by triggering right before the other algorithm's threshold. Which works beautifully, until someone comes up with an algorithm that detects the algorithm that detected the original algorithm. Which works until...
If any of these schemes worked reliably over time, one could end up with all the money in the world (or nearly so) in a finite amount of trades. That's not happening, ergo...
...argument from final consequences*.
* which I know is a fallacy, so sue me! :p
Đ 2001-2009, James Randi Educational Foundation. All Rights Reserved.
vBulletin® v3.7.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.