Chabah on Automated Trading Redux

Discussion in 'Automated Trading' started by Chabah, Jan 8, 2010.

  1. icscbrnk

    icscbrnk

    Chabah, you have done great work here. But why bet on the very low probability events with option plays, when the money is in the daily ebb and flow of the price bars? With options, you have to be right on both price and time. I have enough problems just working the price behavior.
    Your talents are impressive, but I think you can profit greatly by working the higher probability more common patterns of daily price movement. Just my opinion. Thanks. Bob
     
    #41     Feb 17, 2010
  2. Chabah

    Chabah

    Maxima,

    Good point, and this is why I am managing my own retirement money - I certainly don't trust establishment funds and all that. As for using standard TA methods - I assume you are referring to the 50 MA I referenced several times - my thinking here is that you need some criteria for entry. The further that criteria is from the price, the more crap you are accumulating. The moving average is about as pure a distillation of price as I can come up with (note several strategies use hard coded price, such as P < 10, P > 5, etc).

    This also addresses ics - most of my funds will be allocated to longish strategies that, under ideal conditions, trade very infrequently. The automation is essentially to bail from the market when necessary, and to automatically get back in when conditions permit. These are functions that I don't have time to do manually, but they aren't especially complicated. Full time traders do them all the time, using their own methods and parameters. I just want to automate them.

    Regarding low probability events, this is more of an exploration. I wouldn't allocate more than 5-10% of my portfolio to all of them, cumulative. The idea being, a 2% allocation that pays back 50-1 is a good year, and 200-1 could make your career. But what I have found is that these opportunities are not easy to locate. I will keep looking, though.

    The focus here, in the thread, will shift to traditional strategies and how to evaluate their effectiveness once I have platform access. I have had some static from TradeStation but I think we'll resolve it soon. That will involve Monte Carlo simulations and that type analysis (no Sharpe ratios, though). Here I diverge some from NNT - I don't pretend these strategies cover all risks (thus hedging is required), but they can be profitable with a hedgeable risk profile. Also one needs to realize that he is talking about funds with hundreds of millions or billions of dollars - my account will be less than my own annual salary. So, risks have less impact for me than they would for a hedge fund manager. More importantly, I can take advantage of smaller opportunities that the big players can not.

    I finished the Black Swan, and now I am reading Dynamic Hedging. I should say, *trying* to read. It's dense and probably too advanced for my current experience level, but I'll give it a go. Still another week or so until my retirement fund rollover check clears, so no big rush.

    Thanks for the feedback.

    Damien
     
    #42     Feb 17, 2010
  3. Chabah

    Chabah

    Oh Maxima, I missed one part of your point. Yes, sure, the TA tools are very common and everyone has tried them. I should specify, I believe in stock picking. I pick the stocks, which is why I don't mind sharing my tools with the world. The standard TA entry techniques don't work across the universe of stocks, but rather they help me manage my own personal picks. For example, I pick a stock like LULU and I want to manage the position automatically. The system manages entries and exits, position sizing, etc - but the profit comes from me picking a trending stock. The system is a helper, not a profit center. The profits still come from the trader's mind.

    This is why I never use stock screeners and the like - I would much rather go to the mall and see what is popular (or unpopular), and then trade based on that. I tend to trade companies that I feel I understand quite well, and preferably companies whose products I personally use (or hate, when shorting). This reflects my Peter Lynch investment upbringing - invest in what you know. Just the 2010 version using automated tools to help out.

    Make sense?

    Damien
     
    #43     Feb 17, 2010
  4. You took my question a bit too serious.... The point was - you either BlackSwan fan or TA fan. You cant do both. The whole idea of TA based on normal distribution. And the whole point of Black Swan is that normal distribution do not exist.

    A bit of kerfuffle isnt it.
     
    #44     Feb 17, 2010
  5. Chabah

    Chabah

    Maxima,

    I'm not sold on your assertion that all technical analysis is based on normal distribution. Maybe I am subverting moving averages somehow, but I don't see any connection to normal distribution when viewing historical prices to determine an uptrend or downtrend.

    Further I think you've got NNT a little oversimplified there. Gaussian normal distribution does apply, in his terms, to "Mediocristan". It doesn't apply in "Extremistan", where Black Swans rule the returns.

    So it isn't one or the other, it is knowing when you are in Mediocristan and when you are in Extremistan. I will contemplate strategy entry criteria, as you may be right that we are in Extremistan there. That is a question I will need to ponder for a bit.

    Thanks,

    Damien
     
    #45     Feb 17, 2010
  6. Chabah

    Chabah

    By the way, I am on continued vacation until about April 5th. Feel free to pose any questions between now and then. Once I get back it will be back into top gear as I get back into the market. Enjoy,

    Damien
     
    #46     Mar 2, 2010
  7. Chabah

    Chabah

    Finally, account funding. Starting small with $20k through TD, not TradeStation. I have to say TD makes it very easy to fund an account and get started.

    So I will be manually trading my strategies while playing with the TD tools. Of course my strategies are very basic and not of much interest here. I will post the results of my automation strategies within TD. It will be interesting to see how many of the methods I shared on here can be used in TS.

    Since I won't be using the TS functions anytime soon and can't compile them to check syntax, I'm sharing them here for your benefit. Enjoy, but keep in mind these are untested (or even compiled) so use at your own risk.

    http://spreadsheets.google.com/ccc?key=0AtOGnLq8Mf_ydG8wMU9SYXptLUkzUUtRMnAxRXphY1E&hl=en

    Enjoy,

    Damien
     
    #47     Apr 25, 2010
  8. chuzek

    chuzek

    Great thread you've got here. Unless I missed it, can you describe the architecture you are using?
     
    #48     Apr 27, 2010
  9. Chabah

    Chabah

    The architecture that was originally planned is quite a bit different that what I'm currently using.

    The original plan was to use TradeStation, because of all the custom coding opportunities. If you look back a few pages at the user stories it will be clear that a lot of the features I planned to write are not standard. In particular, checks to ensure that strategy positions match actual positions, end-of-day risk management procedures, and position sizing/risk management algorithms were all custom. Most of the methods are written (see link in previous post), but I can't use them.

    My current structure is much more humble - though it does have a couple surprising bits that please me. First, I am using TD Waterhouse as my broker. They have some automated tools, but I haven't investigated them yet.

    To manage trades I am using Google Docs. That sounds pretty funny, even to me, and I was surprised how powerful I could make it in just a couple hours. At this point I am monitoring 32 stocks, using a summary page and then linked stock-specific tabs. I automated a simple strategy (MA pivot points), and if my actual position (typed in) differs from the strategy I get a bright red cell on the summary page. Of course the quotes are delayed, but it's still pretty handy.

    Going from here to automation will be a big step, but at least I can trade now (9 open positions).

    Now if Google Docs could just get options quotes I think I could automate my options strategies in a spreadsheet - at least well enough to think them through. I'd rather be using calls than long stock positions.

    Anyone playing with the TS methods I posted?

    Enjoy,

    Damien
     
    #49     Apr 29, 2010
  10. Chabah

    Chabah

    Let's apply one of our principles to a actual strategy.

    Start with a simple strategy, based on the 50 day moving average. Take the difference between the stock price and the MA, and divide by the MA to get a % difference. When the stock is within 1% of the MA, we stay flat or hold whatever we have (long/short). Between 1% and 3% we'll buy, and from 3% to 15% we hold. Above 15% we take profits. Likewise for going short, from -1% to -3% go short, from -3% to -15% stay short, and -15% take profits.

    This is a trend following strategy that looks like this:

    15+ - take profits
    3-15 - hold
    1-3 - buy
    -1 - 1 - flat/no changes
    -3 to -1 - sell short
    -15 to -3 - hold short
    -15+ - take profits

    This appears pretty workable because you want to buy in at low risk times, and you want to sell when the price runs "too far". For a long reasonable trend you could be in for months at a time (using daily prices).

    The problem for me is that this system violates Path Independence. Path Independence refers to your path in terms of buying/selling the stock. Note it does NOT refer to the price movements of the stock - strategies based on patterns can still be Path Independent. But in terms of automation, my system should be able to analyze the stock and say Flat/Long/Short without any doubt.

    The system as described above would be "IF I am in, hold...but if I am flat, stay flat...but if...". That's not path independent. So here's how we can make it path independent:

    15+ - flat
    0-15 - long
    -15-0 - short
    -15+ - flat

    This is path independent. An advantage is that it is more likely to keep you in a trend. On the bad side, you can lose a lot if you get in at 15% and the stock moves all the way to 0% before you get out. Another disadvantage is that you could be trading like crazy around the pivot points.

    So we can introduce a smidgeon of non-path independence by eliminating trades around pivot points, perhaps .5% or 1% (could be adjusted for volatility). I call that a buffer.

    Another refinement is to attach position sizes to various ranges. This is still path independent. I'll use 1R as a basic risk unit, which might look like:

    15+ - 0R
    10-15 - 1R Long
    5-10 - 2R Long
    0-5 - 3R Long
    -5 - 0 - 2R Short
    -10 - -5 - 1R Short
    -10+ - 0R

    You'll notice I was more conservative on the short side. There is little reason to enforce symmetry on a strategy.

    From a pretty simple intuitive trend following system it isn't too tough to improve it (in my opinion) to be Path Independent while avoiding overtrading via buffers. It will trade a lot more often and with higher risk entries, so attention must be paid to actual implementation.

    Now I need to go update all my strategies to reflect this :)

    Enjoy,

    Damien
     
    #50     Apr 29, 2010