6 ms·
Using an automated day trader to generate income
- iseff 18y agoI've been thinking recently about how it would be cool to have a service which allowed you to try different trading algorithms. For instance, it would have a few algorithms built in, you could choose which you want and with what parameters and then it would monitor how it performs. Also available would be the ability to see how this algorithm would have performed in the past (to see how it worked in bad markets, etc). It could also have a generic API to allow you to run your own algorithm on your end and simply make calls to BUY and SELL certain things. (In the future it could even allow _real_ trades, etc. One other cool way to make money off this would be to actually invest in the best performing strategies as they occur over time.) I'm guessing this is all available to the big firms, but haven't ever heard of anything geared to the hackers who want to try things out. Does anyone know if this sort of thing exists? Would anyone else think this is neat?
- Hates_ 18y agohttp://www.tradestation.com/platform/overview.shtm http://www.tradestation.com/platform/overview.shtm This should do the trick. I've never tried it myself but certainly looks interesting. I know of a few people who use it to try out different systems.
- keven 18y agohttp://www.portfolio123.com/ http://www.portfolio123.com/
- omarchowdhury 18y agohttp://www.collective2.com http://www.collective2.com
- fattyfatfat 18y agoI've heard good things about http://www.prophet.net/ http://www.prophet.net/ from other finance professionals. I've personally never used it. I just download raw pricing data then backtest it myself. You could learn how to do it on even yahoo data if you wanted (for day-over-day trading). Bloomberg is by far the best for intraday price information.
- steveplace 18y agoHistorical forex data here: http://ratedata.gaincapital.com/ http://ratedata.gaincapital.com/ You can pull close data from Y! Finance. Tradestation and metatrader work well for backtesting.
- mattmaroon 18y agoIf you thought something were profitable in a market, and it was easy enough to implement that any hedge fund could, why would you publish it? They'd just do it too until it was no longer profitable.
- jcl 18y agoOn the other hand, if you thought something was highly risky and likely to succeed only for a short time before blowing up, why not publish it, then bet against it? :) But seriously -- the author's comments seem to indicate that he is not totally comfortable with the technique and that he is aware it could lose, even though it didn't in this case.
- mattmaroon 18y agoI meant long-term profitable, as in +EV compared to buying a SPDR with the money. Even random trading could outperform the market in the short term. But if I thought I had a method that outperformed it for the long term (which hopefully I'll never be dumb enough to) I wouldn't tell anyone.
- fattyfatfat 18y agoyou're right. and i ran it until it started losing. I announced the day i quit running the basic moving average crossover algo. I still dabble with variations of it (made like 250 bucks last friday), but I'm now doing way more research and backtesting before I drop things into the market for real.
- fattyfatfat 18y agoon that note, i lost over 1000 bucks a day for 3 days straight, which is when i quit. and on having the "secret sauce" to beat the market. Read about Edward Thorpe. He's a badass. He wrote the book "beat the dealer" which was the bible on counting cards and beating vegas at blackjack. Then he figured out how to price options (convertibles, really) and made a killing in his own hedge fund (Princeton Newport Associates, I believe). He had the secret sauce, used it to make a killing instead of publishing it. YEARS later, black and scholes published the essentially SAME formula for price options and eventually won a nobel price for their work. But Thorpe stuck to his guns and made his fortune. Merits to both sides, I suppose.
- pjharrin 18y agoI'm actually working on a startup in this space. Nice to see some HN people share a similar interest
- drwh0 18y agothere's an entire street dedicated to people developing trading algorithms...WALL. see: quant funds...whats left of them anyway
- matt1 18y agoI have no idea what that guy is talking about with double moving averages and what not, but I'd bet that a few simple IF/THEN statements could have produced similar results over the same period of time. Say it hand done well, would you go an invest a few thousand dollars using the IF/THEN algorithm? On a similar note, say this guy did lose his $3500. Do you think you'd be reading this post on how to automate day trading? Randomness and the survivorship bias play a huge, huge role here. As far as the website ideas go, I'm pretty sure that some very smart people have demonstrated that using past performance to estimate future performance simply does not work; no amount of tweaking buy/sell algorithms will help you predict where the market is going tomorrow.
- pjharrin 18y agoWhat is investing if its not a IF/THEN statement? If price goes up then sell, if price goes down then buy. If the company meets these financial criteria then buy, if not then sell. If the price approaches a resistance level then sell. Whether your basing the investment decisions on fundamental or technical analysis, either way its an IF/THEN statement at some level.
- fattyfatfat 18y agotouche
- Prrometheus 18y ago>If price goes up then sell, if price goes down then buy By how much? Within what time period? Are there any other factors that might be pertinent? The world is not simple.
- pjharrin 18y agoHence why I said "at some level"
- byrneseyeview 18y agoIs there any decision that can't be restated as an arbitrarily complicated series of if/then statements? If you're patient, you can do addition using just if-thens (IF N1 = 1 and N2 = 5 THEN answer = 6), etc.
- Dilpil 18y agoPeople have been using computers to trade since the 80s. It is estimated that in some markets (Forex, Commodities), more than 50% of the orders are put in by machines.
- ruby_roo 18y agoHeh, so this has piqued my interest. I have absolutely no experience in online investing/day trading, although I'm pretty sure a lot of you are veterans. Any books you'd recommend to a programmer with day trading aspirations?
- pjharrin 18y agohttp://www.amazon.com/Technical-Analysis-Financial-Markets-Comprehensive/dp/0735200661 http://www.amazon.com/Technical-Analysis-Financial-Markets-C...
- fattyfatfat 18y agohttp://fattyfatfat.com/2008/10/automated-day-trader-most-technical-analysis-is-crap/ http://fattyfatfat.com/2008/10/automated-day-trader-most-tec... I still stand by my above claim that Tech Analysis (and especially LONG term trending) has no theoretical basis, except for the fact that everyone else believes in it.
- pjharrin 18y agoI agree that trend analysis has a lot smaller foundation for the long term, but in the short run its essentially analyzing the supply and demand of the stock, which can be predicted (not all of the time of course). Outside factors like news don't occur everyday, so the using technical analysis for intraday trading is very reasonable
- steveplace 18y agoThen you better not buy index funds. Those are basically trend-following systems over the long term. And there is statistical data to back up that trend following does work.
- jcl 18y agoI think he means that there is no theoretical basis for a long-term system that claims to beat the indexes. Index funds don't, by definition.
- SwellJoe 18y agoSo, the obvious question for me is where can I buy stocks for $2.40 per trade? Any day trading successes I might manage would be eaten up by transaction costs at my current broker (where trades are $9.95, I think). I'd probably be a far more active trader at $2.40 (which may not be a good thing, but cutting costs is always good).
- fallentimes 18y agoI think you can from these guys if you qualify: http://individuals.interactivebrokers.com/en/main.php http://individuals.interactivebrokers.com/en/main.php Tradeking is $4.95 per trade.
- brianr 18y agoTradeStation is $0.01 per share for equities (for the first 500 shares; $0.006 after that), $1/min per trade: http://www.tradestation.com/brokerage/commissions.shtm http://www.tradestation.com/brokerage/commissions.shtm
- fattyfatfat 18y agoI use interactive brokers. The cost of a ES mini (SP500 mini future) trade is $2.40. Stocks trade for half a penny to a penny per share with a minimum of $1.00 per transaction. I think they require 20k to start a new account these days though. IB has been by far my favorite brokerage
- kmt 18y agoFor those who use IB: How long have you been using them? Do you use their client or their API? Is it alright to use both, in parallel? People complain about their customer service; have you had any problems? Is it easy to transfer money to/from your IB account?
- steveplace 18y agoIf you're not going to daytrade, go with zecco. I use thinkorswim because I'm an options guy.
- 18y ago
- fattyfatfat 18y agoum well, hello. so thats my website. quite the site here. and quite the surprise to see that i'm getting any attention at all. a lot of very intelligent commentary.
- Prrometheus 18y agoAll successful day traders are lucky. People who give day trading advice are frauds. That's not the most polite thing to say. Some of the people who give day trading advice might even be sincere and not know that they are frauds. But it's the truth.
- fattyfatfat 18y agoAnd lastly: I wrote a lot of that just as I was figuring things out, so I don't know how much of that I still stand by. But this morning, I wrote the one thing that I'd recommend to anyone who is interested in this sort of thing. http://fattyfatfat.com/2008/12/moving-average-crossover-theory/ http://fattyfatfat.com/2008/12/moving-average-crossover-theo...
- hedgehog 18y agoI read through your posts but I didn't see whose data you used for backtesting, did you use Interactive Broker's?
- apstuff 18y agoboolean TraderAnxiety(boolean mktStatus) { if (mktStatus == FALLING) { Sell(); return true; } if (mktStatus == SURGING) { Buy(); return true; } if (mktStatus == FEAR) { Loathing(); return true; } if (mktStatus == OVERMYHEAD) { UseProfanity(); return true; } return true;
- olefoo 18y agoYour `boolean` has 4 values? Most languages I am familiar with require booleans to be either TRUE or FALSE, although I have met a few where undefined or NULL are possible values.
- steveplace 18y agoIt returns true in all 4 cases.
- blasdel 18y agoYes, there are four boolean values, at least electrically: zero, low, grey, high.
- steveplace 18y ago1. Not having a stop loss (other than the 3500 circuit breaker) is a terrible idea in black box trading. 2. Yes, it is that simple. Note that simple != easy.
- paddy_m 18y agoI'm the CTO of a startup named QuantRunner Software, where we write backtesting software, (beta coming this month) http://quantrunner.com http://quantrunner.com . I found the article interesting, but it leaves out some important details such as 1. Why did he decide to enter into this strategy at 10:45 am on October 15th? 2. What would the outcome of the same strategy have been if it was left running for the next month, for the past year, for the past 10 years. I'm curious. Questions about how the backtest was run. 1.How do you get your data? 2.you seem to have written an excel spreadsheet to run the backtest, what's going on with that? How did you design it? For other people on HN, does anyone here use backtesting tools? What do you think of the existing software you use?
- martinflack 18y agoA year ago I embarked on a project to learn Common Lisp by building a trading system, to execute with the Interactive Brokers API. I modeled the woodiescciclub.com trading strategies, primarily because the math is simple and the patterns are well defined. However since then I've seen other parties on the web talk about how the Woodies patterns actually don't make money consistently, although I didn't corroborate this. I actually found CL to be a fantastic language for this. I was writing up the Woodies patterns using a DSL I had created: (defpattern zlr "Zero Line Reject" :with-trend ((count 1) (within 100 250) (trend :up :or-opposite-invert)) ((count 1) (within 100 200) (trend :up :or-opposite-invert)) ((count 0 10) (within -50 99) (trend :up :or-opposite-invert)) ((count 1) (within -50 50) (trend :up :or-opposite-warn) (angle :down)) ((count 1) (within 0 115) (trend :up) (angle :up) (away 8))) (defpattern hfe "Hook From Extreme" :counter-trend ((count 1) (within 200 300) (trend :up)) ((count 1) (within 0 199) (trend :up) (angle :down) (away 3))) ...etc The defpattern macro was creating, for example, #'is-zlr, #'is-zlr-up, #'is-zlr-down, which were then used by a trading engine that monitored 5-minute bars on a given futures contract and launched trades. Another CL feature, restarts in the condition system, helped too. When the data feed broke or got corrupt, an exception thrown which could reload the data feed and restart back in the listening loop without forgetting any context was helpful. Also just running in a Lisp image was great because I could swap functions during a live feed without stopping the program. In the end, the programming worked great, but the trading system lost money. I had it working in backtesting over a few months and then papertrade mode for weeks, and then when I took it live, the volatility rose and it started hitting the stop all the time. I adjusted things like stops based on ATR, but I really just ran out of my little budget to play with it. It did however teach me CL. ;-) Modern trading platforms have built-in tools and programming languages and writing things from scratch in CL is really just an academic exercise. I believe it's possible to do algorithmic daytrading, but quite a bit more difficult than it seems. There are way more market behavior modes than you can appreciate at first, and the keys to success lie more in counterintuitive aspects of your system like position sizing rather than intuitive aspects like entry strategy. The best talk I heard from someone on the subject indicated that it takes years and the end result is a fairly sophisticated algorithm-switching engine, because the hard part is just to survive.
- quellhorst 18y agoSo this guy wants to automate trading with $3.5k? You need at least $25k with a cushion otherwise you can't day trade.
- known 18y agohttp://en.wikipedia.org/wiki/Fixed_income http://en.wikipedia.org/wiki/Fixed_income seems lot simpler strategy
- Tichy 18y agoLike many hackers, I often pondered the idea. The closest I got was automated trading in a stock market game run by the company I was working for. I never got round to programming a sophisticated strategy, so basically it was just "sell and buy random new stock if price has risen or fallen more than x%", where I think x was something like 15%. Even with that the algorithm was in the middle of the field (with 10000 participants), but it still lost a little money. As it was 2001, losing money was to be expected, I guess.