Settings

Theme

Using an automated day trader to generate income

fattyfatfat.com

101 points by fbbwsa 17 years ago · 97 comments

Reader

matt1 17 years ago

I 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.

  • fattyfatfat 17 years ago

    Matt1,

    you're exactly right. its just a bunch of if then statements. I played with quite a few variations of a VERY simple, primitive strategy.

    I'm the first to admit that that day's P&L was largely the product of luck. In fact, I had quite a bit of remorse after the fact and was thankful that the coin flipped my way that day.

    Regarding predictive engines, you're definitely right as well. Most educated financial professionals don't believe tat you can predict future price movement with any degree of certainty, but there IS a fairly large following up that believes that price behavior is at least price reverting in the short term.

    I got lucky, I basically flipped a coin and HAPPENED to do it on a day where the SP500 moved a LOT. moving averages do TERRIBLY in environments where the market doesn't trend hugely in one direction. I think I talked about that a bit later.

    On that note though, I still work with this, though my approach has changed dramatically. Its certainly possible to structure a trading strategy to fit your risk profile.

    Nobody can win every time, but you can design the strategy to provide losses you are comfortable with.

    Regarding tweaking buy/sell algos to predict future movement though, there's plenty of literature on that on both sides, so I won't really argue with you.

    If you're itnerested, I recommend reading about high frequency algorithmic trading. You can also read my similar blog posts about why I think technical analysis is absolute drivel and the potentical justification for running a moving average algo.

  • mixmax 17 years ago

    using past performance to estimate future performance simply does not work

    This is not always true.

    I had a theory a few years ago that went like this: The price of a stock is a direct function of the perceived price of the company multiplied by a risk factor: The more risk the less the stock is worth. On the day the yearly report is publicised for a company the risk is big just before the publication because nobody knows for sure what the numbers are, and low just after the publication because everybody now knows. So according to my theory the stock price of an arbitrary company should statistically go up on the day that the yearly report is made public.

    I, painstakingly, found some historical data on this (it wasn't easy) and found that it was spot on. A bit of statistical analysis showed thet there was a definite gap to be exploited.

    A friend of mine showed in his Masters thesis that there were certain patterns that would almost always be present in IPO's that could be exploited if you knew them.

    So there are definitely loopholes where past behaviour shows future performance, but not a lot of them.

    And professional investors aren't always as smart as they're made out to be. I know a few, and hackers are a lot smarter in regard to numbers.

    • mattmaroon 17 years ago

      The problem is that the market is dynamic and chaotic. Measuring past data doesn't give you much indication of how much your algorithm would have made, even in hindsight, because every buy and sell you would have executed would have changed the market and the future. Even relatively small orders can have big ripple effects, especially if they just happen to trigger standing limit orders.

      Genuinely measuring the market (by trading) changes it.

      • skaylie 17 years ago

        Good point. As pointed out on the rest of this list, you should be very careful about "data mining", where simply finding a strategy that works on historical data may not be replicable. Also, some strategies work well in some markets (like high volatility) and poorly in others. I think a next level of analysis is trying to figure out when to turn particular strategies on or off.

        As for the attacks on technical analysis, many practitioners probably are deceiving themselves that they've found some secret sauce. However, since the market is made of 100% of the people who transact in it, the presence of technical traders means that there must be some price movements as a result of these trends. One ideal would be to find a strategy that beats other technical analysts to the punch. A lot of people use the 12/26 MACD, but maybe the 11/25 MACD would help you eat their lunch before they entered the market...

        It is all very tricky and takes a lot of discipline to avoid fooling yourself and getting into real trouble. Also, people need to make sure to focus on both sides of the trade - you only book the profit once you've actually sold the position (most people seem to be much more focused on entries than exits)

        If anyone is interested in this kind of software but aren't so into learning a new language (perhaps less applicable to this group), you should check out QuantRunner Software http://www.quantrunner.com. In full disclosure, I am the CEO of the company, but we really focus on making this kind of back testing analysis easier for people to do without programming experience. We also have some novel tools for helping people actually improve their strategies, rather than simply iterate tests. If I had the true answers on the best strategies, I probably wouldn't run a software company. All we hope for is to make it easy enough for people to do their homework without having to worry about coding errors as well as poor strategies.

      • steveplace 17 years ago

        Ideally, yes.

        In practice, no. Trading a couple lots of /es futures will not do much to the market. More like pissing in the ocean. In illiquid markets you can move price, but not the stuff that you would want to blackbox anyways.

        • mattmaroon 17 years ago

          It can. If someone has a large limit order and your small order hits their trigger price, whereas the next person might have done the opposite and moved away from it, you could have caused a huge change in the direction of the market. Or the same is true of a cascading series of smaller limit orders, etc.

          And since making money is presumably based on volume, if you did small trades, you'd end up doing a lot of them to make it worth your while. But in almost all forms of betting, it's better to make fewer, better wagers.

          • steveplace 17 years ago

            I don't know if you've traded /es futures, but that's nearly impossible to do. There's a couple different markets that put in bid/ask, and normally you'll just see the closest spread, but there's usually underlying bids as well. That's why it's so liquid. I'm looking at premarket futures right now and the qty of contracts offered at the bid/ask ranges from 10-100. That means to take the bid out you'd have to have a margin of around 100k.

            And since making money is presumably based on volume, if you did small trades, you'd end up doing a lot of them to make it worth your while.

            Not true with futures. They are risky, but you can get some pretty nice returns, especially in the volatility that we're having right now. On a single contract you can expect to pull 1k-2k, and that's on one trade per day. In terms of R, you're looking at 10R-20R per trade if you're experienced enough (>2 years).

          • bayes 17 years ago

            The trouble with fewer better wagers is that wagers - even very good value ones - can lose. So if you're only making a few of them there's a significant probability of losing overall. Your expected value may be high, but your standard deviation is even higher.

            I'd much rather have 10,000 independent bets each with a 0.5% edge than 10 independent bets each with a 20% edge.

            • steveplace 17 years ago

              I'd much rather have 10,000 independent bets each with a 0.5% edge than 10 independent bets each with a 20% edge.

              Not with trading, you want to cut losses quick and let winners run. The model behind Long Term Capital Management, as well as a ton of quant firms that went under this past Q, was the take-a-bunch-of-trades-for-small-profit... and it works until you get a six sigma event (see 2008).

      • mixmax 17 years ago

        Yes, in that respect it's like physics - by measuring you are altering the experiment.

        The volume on the day the reports came out was quite heavy, but if you had bought a substantial amount of stock it would certainly alter the market as you say. The point is that I'm pretty certain there are holes that will allow you to look at historic data and make statistically good buys - but you have to look where noone else is looking. Like the correlation of Nokia stock to the Finnish weather. Some of these will be large enough that you can make money, even though you alter the experiment.

        On an unrelated note - I just read through your blog and found it very insightful :-)

        • mattmaroon 17 years ago

          There's so much money to be made in the stock market (most of the money on Earth) and so many people searching for that data with so much resources (including math PhDs by the hundreds, some of whom I know) that looking somewhere nobody else is is virtually impossible. You're much better off focusing on your career and buying ETFs.

          And thanks!

      • volida 17 years ago

        the first rule of trading is that you join the market not try to alter it.

    • drusenko 17 years ago

      this is really interesting to me -- i spent a lot of time examining implied and actual volatility with regards to option pricing right before an earnings report. the short and skinny is that (as makes sense) volatility rises right before earnings are released and falls right afterwards. if you know that volatility is going to rise, you could easily plug the rest of the numbers into the black-scholes model and find undervalued options. they weren't always there, but at times, you could find options that would lose less in value due to time decay than they would gain due to the increased volatility with enough volume to not start making the market -- a great arbitrage opportunity.

      unfortunately, i didn't have as much time in college to study this as i would have liked, and all of the good volatility data seems to be hidden behind a pay wall (bloomberg stations!)

      one thing is for sure: even though the market approximates efficiency, there are still arbitrage opportunities to be found in the right places.

    • marvin 17 years ago

      There are probably lots of loopholes, but we don't know about them. It can't be a coincidence that the largest hedge funds have beaten the market spectacularly every year the last 20 years. (And if they put 10% some of those gains in a money market account, they are guaranteed to have made positive returns no matter what happens).

      My personal this-is-what-i-think theory is that there are lots of patterns in the pricing of equities and other market components, but if they ever become publicly known, they cease to exist. The best hedge funds (or best traders, take your pick) manage to find patterns that no one else does. This does not protect them from a spectacular implosion if their models for some reason become invalid.

      There is a cult of believing in the perfect randomness of market pricing. Saying that market developments are random is practically the same as believing in the efficient market hypothesis. The market cannot be perfectly efficient, because there are always interactions that no one will be able to predict. Most of these interactions are no doubt chaotic (unpredictable), but there is no way that traders instantly discover every pattern that is predictable.

    • steveplace 17 years ago

      That risk you speak of may not be discounted in the price, but rather in the implied volatility. You'll see that after major earnings reports/announcements there is an IV crush on the options board.

      You can game this by looking at historical IV for pre-earnings and see if the current is over/under. You can then sell straddles or strangles if you think the price will stay in that area.

      It's even better for GOOG because they always release earnings right before options expiration, so there's a ton of voodoo going on in their price.

  • sdfx 17 years ago

    I think the no-arbitrage principle comes into play as well: If there is an (easy) set of rules that you can follow to make money, then there are enought people to act according to these rules so that you can't win anything. Seriously, this simplistic view of the market is just a threat to your hard earned bucks.

    There are historical prices available at finance.google.com. Backtesting your strategy before playing around with real money is probably a good idea.

    • matt1 17 years ago

      Again, that assumes that the future can be predicted using past results. Even if you had an algorithm that seemed to predict the dips and peaks in the market, it would not be a good predictor of future performance.

      I recommend Random Walk Down Wallstreet or Fooled by Randomness or, if you really want a brutal introduction to randomness, play and study the mathematics of poker.

    • wildwood 17 years ago

      How high to you have to jack up a) the number of people who believe in this principle, and b) the number of simple ways to make money (possibly multiplied by the number of available markets), before this principle is no longer true?

  • pjharrin 17 years ago

    What 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.

    • Prrometheus 17 years 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.

    • byrneseyeview 17 years ago

      Is 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.

    • fattyfatfat 17 years ago

      touche

paddy_m 17 years ago

I'm the CTO of a startup named QuantRunner Software, where we write backtesting software, (beta coming this month) 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?

iseff 17 years ago

I'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?

mattmaroon 17 years ago

If 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 17 years ago

    On 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.

    • fattyfatfat 17 years ago

      you'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 17 years ago

        on 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.

        • paddy_m 17 years ago

          Check out "My Life as a Quant" by Emanuel Derman http://www.amazon.com/My-Life-Quant-Reflections-Physics/dp/0... and this book about Fischer Black's (of Black Scholes) work in finance. http://www.amazon.com/Fischer-Black-Revolutionary-Idea-Finan...

        • mattmaroon 17 years ago

          What's the merit to publishing a successful algorithm? Or using a previously published algorithm that any hedge fund manager or resourceful individual can find and implement trivially.

          • matt1 17 years ago

            A better question is how do you know your algorithm is successful? If it predicts correctly 10 days in a row, have you got a winner? It's like those guys that advertise by saying "We outperformed the market by 6.2% on average the last four years." Put enough monkeys in front of a trading terminal and you're going to have some that outperform the market by 6.2%; doesn't mean you should invest your money with them.

            • gaius 17 years ago

              Have you ever wondered how every fund manager has a fund in the top 25%? It's easy, they launch several funds in one sector, then after a few years merge them all into the top one, and use its historical performance for the marketing materials not the average of them all.

            • mattmaroon 17 years ago

              You can't. You can only know your algorithm was successful. The market is changing, so even if you could prove, given variance and sample size, that your algorithm was +EV and not merely lucky, you would only be proving that it was +Ev and not merely lucky. Not that it will be in the future.

            • joshu 17 years ago

              That's why you look at sharpe ratio, rather than absolute return.

          • jcl 17 years ago

            What's the merit to publishing a successful algorithm?

            In this particular case: a Nobel prize.

    • mattmaroon 17 years ago

      I 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.

  • erik 17 years ago

    I don't expect wikipedia to be a reliable source of information on this topic, but there is an entry that claims that hedge funds already do this sort of thing: http://en.wikipedia.org/wiki/Program_trading

  • fattyfatfat 17 years ago

    its quite true that a lot of people do it. Its not ACTUALLY a profitable venture in the sense that the risk-reward profile from a purely monetary standpoint is probably unjustified.

    I did it for fun, to learn, to gamble, and hopefully get lucky. God knows I've spent money in worse ways before.

    Regarding the theory that other players would jump in the market and cause the opportunity to go away: you're right, but they'd really have to parametrize the same strategy in the same way as you. thousands of people use moving averages already, but all parametrized differently so they produce buy and sell signals at different times.

    There's certainly no ideal parametrization that is alawys profitable, as most research shows (and I tend to believe)

    • mattmaroon 17 years ago

      I would imagine hedge funds test just about every parametrization you can think of. And since it's a market, wouldn't even similar trading algorithms ruin your chances? Especially considering the tax and fee implications of trading frequently.

  • steveplace 17 years ago

    You'd think that would happen, but certain trade strategies (like MA crossovers) are not scalable. Way too much slippage.

    There's other quant strategies that HF's use... like taking a bid out of a stock near support to trigger all the stop loss orders and then covering their shorts quickly.

  • lallysingh 17 years ago

    Couldn't you make the same argument about opening up your software? The competition would just give it away until it was no longer profitable.

    • mattmaroon 17 years ago

      Most open source software companies make money on service, closed source IDEs, hosted versions, etc. I'm not aware of any company that makes good money selling actual software that could be downloaded or given away by a competitor legally for free. If you're selling .exes, then I wouldn't open source unless you were prepared to switch business models.

      FWIW I think open source software is a great thing but in general a horrible way for any sizable corporation to try to make money.

SwellJoe 17 years ago

So, 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).

Dilpil 17 years ago

People 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 17 years ago

Heh, 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?

  • mattmaroon 17 years ago

    Yeah, don't daytrade. It's a sucker's game. The market is too close to efficient for you to recoup what you lose in brokerage fees and excess taxes.

    Fund your IRA to the max, and if you're 20+ years from retirement buy all ETFs with low expense rations. If you're closer to retirement, buy fewer stocks and more t-bills, etc.

    • Brushfire 17 years ago

      Its hardly a suckers game if you know what you are doing. I know prop traders that make huge bank essentially daytrading on the forex and others.

      Sure, its highly controlled gambling, but you of all people should realize that its not a losing game for everyone. If anything, its just a suckers game for small timers -- like all other gambling.

      • mattmaroon 17 years ago

        Any sufficiently volatile form of gambling has big winners. That doesn't mean it's +EV. The markets (especially forex, from what I hear) are such that even if it were impossible to outperform the broader indexes, you could very well know multiple people who did so over a period of years or even decades.

        See Fooled by Randomness for a more detailed explanation.

        • volida 17 years ago

          if you open 1 lot in your life and sell it and outperform the market, yes that's random. If you open more lots and your success rate is higher than 50% then you can't really call it random. Playing random in forex kills you.

          You can treat it as gambling yes, but it's not.

          • mattmaroon 17 years ago

            You can win more than 50% of wagers even over fairly large numbers if you're -EV, especially if you're only slightly so and the variance is large. And with tens of millions of people attempting to do this between forex, stocks, futures, etc., it's a virtual certainty that one could find a large number who have.

            Again, read Fooled by Randomness.

            • volida 17 years ago

              I think it's a combination of factors luck, knowledge, practice, that ultimately their result may be called random.

              However my opinion is that Forex is not gambling. In wagers to win big you must either combine different bets with odds that pay as someone predefined. If you combine more, the need for luck increases. If you bet a large amount of money on high paying odds then again you need luck.

              In contrary, foreign exchange you just trade the currency according to your prediction. The only way to automatically lose the negative lot is going off your margin. To win big, your prediction doesn't need to go against the odds like a soccer bet for example.

              But, I will check out that book. Thanks

    • steveplace 17 years ago

      The market is too close to efficient for you to recoup what you lose in brokerage fees and excess taxes.

      No, it's not. Far from it. EMT is not practical in the short term.

  • fallentimes 17 years ago

    I'd learn about finance before you learn about day trading.

    The Intelligent Investor - Warren Buffet's favorite

    A Random Walk Down Wall Street for one perspective.

    Mark Douglas books for a different perspective

    Options Volatility & Pricing for the technical stuff.

    And Inside the Mind of a Street Addict for the bathroom read.

    • fattyfatfat 17 years ago

      Intelligent Investor: absolutely. My first investment book. My deep suspicion is that THIS book will be more important in the next few years as company valuations tank. Even now tons of firms trade below book value, which was one of Ben Graham's great criteria. For years this has been impossible to find, but with the credit crisis, its back. Now... to choose the good ones...

      Options Volatility and Pricing by S. Natenberg (sp) is a great theoretical primer for options, though typically a bit dense for people outside the industry. The writing style is brutal, but this book has probably made more millionaires than any single other book in history. Walk around the option exchange floors and every clerk has a copy, to this day.

  • steveplace 17 years ago

    There's a ton of financial blogs that would help you get started, and those can be more valuable than books. The ones I read are on my blogroll at investingwithoptions.com

    Read Van Tharp's Trade Your Way to Financial Freedom it's a must... teaches you that the entry is not important. It's the position sizing, risk management, and the exits.

    Also: - Options as a strategic investment

    - Mind over markets

  • pjharrin 17 years ago
    • fattyfatfat 17 years ago

      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 17 years ago

        I 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 17 years ago

        Then 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 17 years ago

          I 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.

      • andylei 17 years ago

        regardless of whether it has "theoretical basis", there are plenty of hedge funds that make plenty of money with it.

  • wildwood 17 years ago

    Anything by Van Tharp. He trains traders at all levels for a living. My personal favorite is "Trade Your Way to Financial Freedom".

fattyfatfat 17 years ago

And 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-theo...

  • hedgehog 17 years ago

    I read through your posts but I didn't see whose data you used for backtesting, did you use Interactive Broker's?

martinflack 17 years ago

A 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.

Tichy 17 years ago

Like 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.

fattyfatfat 17 years ago

um 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 17 years ago

    All 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.

quellhorst 17 years ago

So this guy wants to automate trading with $3.5k? You need at least $25k with a cushion otherwise you can't day trade.

pjharrin 17 years ago

I'm actually working on a startup in this space. Nice to see some HN people share a similar interest

  • drwh0 17 years ago

    there's an entire street dedicated to people developing trading algorithms...WALL. see: quant funds...whats left of them anyway

known 17 years ago

http://en.wikipedia.org/wiki/Fixed_income seems lot simpler strategy

steveplace 17 years ago

1. 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.

apstuff 17 years ago

boolean 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 17 years ago

    Your `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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection