Rabu, 23 Juli 2008

Basic Rules

All the list of rules floating around, what do you belive, what do you use? What works? After spending a few years digesting lots of information I can now quickly read an article or blog post and know if it fits me, my style. There are a few very very basic rules that I remember each day. You should do the same. Make a top ten list. Revisted the list every now and then. Put the list on the wall. Modify it as you learn and progress. Here are two rules I have boiled down to one, once I learn to understand the first rule and was burned a few times, the second just made more sense.

Don't chase price. Do not chase price. All the books tell you that, but then they go on to tell you about indicators or other stuff. Want to prove it to yourself, run a system where you buy after a run, say 3 up bars and see what happens. You get hammered that's what happens. Why do we do it? It's not based on logic. This is one of the reasons I want to implement a mechanical automatic trading system to keep me from doing it. Yes, I have done it it and I look back and wonder what the hell I was doing.

Patience. Have patience. If we follow this rule, we don't have to worry about chasing price. This is rule #1.

I think the single most meaningful sentence I have read in any book or blog is "Most of your time trading is spent waiting". I hate waiting. Who likes to wait in line for a ride at the amusement park? Who like to wait in traffic. We are trained to not like to wait.

Learn to WAIT for the opportunity to appear. Sometimes the wait is short, sometimes long. LEARN TO WAIT. BE PATIENT. If you miss your entry, learn to trust that you will get another chance. If you miss your exit, just take what you can and be happy.

"What you do determines whether you lose. What the market does determines whether you profit." (Sun Tzu)

Rabu, 16 Juli 2008

Price Patterns

We have all tried to use indicators to build a system, I have tried to use them to build an auto trading system and have found that it’s not worth the effort of looking for a great combination of indicators only. You need to use price action first and foremost. Support and resistance with a few other gems like a simple momentum and moving average are, to me, what works.

I have also found that indicators and patterns are just another way of looking at the same price action. Now that I've been staring at indicators for a long time and understand price action, and memorized patterns such as head and shoulders, bull flag, etc, understating basic price action has allowed me to forget about all that stuff. It's all just another way of saying higher high, higher low. If you read the book you might also have this "moment". After watching Alphatrends videos and reading Brian Shannons new book, the approach that makes the most sense to me is support and resistance, higher high, lower low, etc. For auto trading, the trick is to be able to program the rules as you apply them when looking at a chart, into software. Not so easy.

I trade Forex based on an auto trading system I developed, currently, no real money as there are still bugs. I also trade the TSX stocks (real money) based on the approach demonstrated in Brian Shannon's book. Each night I’ll perform a scan of the TSX and set up the trades for the next day. My approach has been altered somewhat since reading his book. The original was based on reading his blog and watching his videos. I have created code to scan for these stocks that are in stage 2 or 4. So far so good. Obviously it would be more profitable to check on the trades intra day and adjust the stops to protect profit. That doesn't seem to be the most damaging though. The entries are planned to be on a stage 1 to 2 short time frame but a morning gap usually kills me as it retraces. This doesn't happen all the time. TWS (IB platform) does allow conditional orders but not to the extent I need them. I need to look for a pullback to a level, then a break above another level (buy stop) to pull the trigger. To do this I will need to program Amibroker to follow the stock and place the order. That's my next project after I get this auto trading forex code working well enough to make some $. As for the TSX, its working out, but it would be more profitable if I had the code mentioned above implemented.

Technical Analysis Using Multiple Timeframes

Technical Analysis Using Multiple Timeframes - a trading book by Brian Shannon

Brian's work has been published or written about in Technical Analysis of Stocks & Commodities, Barron's, Active Trader, Stock Futures and Options Magazine, and hundreds of online sites.

I bought this book recently and read it from cover to cover twice. The presentation makes it easy to understand the concept of support and resistance and offers some input on why markets move the way they do. Brian also eliminates chart reading bias by removing the symbols from the charts.
I've been reading and watching blog videos since day 1 of Brian's blog and have tried to dissect many of the videos to determine how he finds the stocks, trades them, and manages the trade. I even wrote down the phrases he keeps repeating in the videos. I was not sure if the book would have any additional valuable information for me. I have since read it twice and there is indeed a whole lot of of valuable content that is in addition to the great videos on his blog.


The trend is your friend, but which one? Opposing trends can be found on various time frames in the same stock, at the same time creating confusion and worse, unnecessary losses. Understanding market structure and trend alignment allows you to put emotions aside and focus on the right stocks at the right time. Techniques covered in this book are appropriate for anyone (from day traders to investors) who is looking to improve accuracy in their buying and selling.

To order this book, just click on the image below.

Kamis, 03 Juli 2008

How's your autotrading system? - Response

Here are some good posts from a Yahoo group on this topic.

Post 1
When you cut your losses and let your profits run, it tends to produce about a 35% accuracy (i.e. win rate). The problem seems to be sitting while the losses accumulate. If you're doing lots of trades on one-minute data, maybe it isn't so hard. Does your software run unattended?I have a preference for higher-frequency trading because it seems to produce a smoother equity curve. I am also a bit impatient, and I have difficulty watching my systems lose money. The computer trades better than I do in that regard.I get my ideas from pretty much anywhere, including some unlikely places (e.g. elitetrader.com). My main criteria for choosing an idea to develop is how well it would fit with my needs and lifestyle. I have been at this long enough to know how important that it. I want as smooth an equity curve as I can get, and I want the most reliable system that will generate a minimum return. I reject ideas because they trade too often or not often enough, or because they have drawdowns that are too deep or too long. I also develop trading ideas as a form of -- don't know what to call it -- entertainment, I guess. It's a treasure hunt.I write almost all of my own software using Delphi/Pascal. I like to test everything I do, but I have developed and run system that I cannot test beforehand. Christian Gross also talked about that with regard to algo trading. That can be scarey.[rwk]

Post 2:
This is going to be a very long-winded response, but I think itmight be helpful. So, before I even get into how I come up withtrading strategies, I think it will be helpful to give a little bit ofmy painful history, just for context.....Let me start by saying that I'm (by trade) a full-time softwareengineer and have been for about 18 years. I've tried to trade/investfor about 10 years with very little long-term success. If I wouldhave kept my money under a mattress for the majority of those years,I'd be better off today. But, I don't think I'd be better off 10years from now.....All of my trading endeavors/techniques were based on more-or-lesssubjective opinions and the latest book from Borders or Barnes andNoble. So, after trying to trade/invest half-heartedly for severalyears and then loosing my $#*&^*&@&# about 5 years ago, I took a breakfor about 1 year and then started treating investing/trading moreseriously. I read many books (all of which I'm sure you've heard of)and really just took the time to understand the let some of the basicssink in (namely-RISK MANAGEMENT). After I learned how to properlydeal with risk management and position sizing, I still tried to trade(by hand) and mostly broke even (or lost a little money).So, about 2 years ago, I think I finally got serious enough aboutnot loosing money that I decided to try to "objectify" a few tradingstyles (based on one or two recurring intra-day market patterns that Ihad my eye on). My stategy ideas were a result (I think) of my ownfailures, reading books, reading blogs and understanding what I likedand didn't like (I like speed). By the way, none of the books that Iever read from any bookstore have helped me with trading techniques. To be honest, I have found them all 100% useless. Now, with thatsaid, I have read some very good trading books, but they were onpsychology.I started doing this (by hand) in my IB SIMULATION tradingaccount. By the way, the decision to finally "objectify" my tradingtechnique was as a result of reading "Trading in the Zone" (by MarkDouglas). If I would have read this book early on in my "halfhearted" trading career, I probably would have stopped reading halfway through as it would have been boring to me. But, after being aperpetual looser and beating my head against the wall for so manyyears, I think I became a better listener. I guess I was at a pointwhere much of what the author had to say actually mattered to me andmade sense.As I embarked on trying to objectify my trading style, I quicklyrealized that putting numbers & reasons to everything I did was adaunting task and there wasn't a chance in hell that I could do it byhand. Hence, why I started to consider automating my tradingtechnique. This process was a HUGE "eye opener" for me as I quicklystarted realizing just how darned hard it was to objectify ABSOLUTLEYEVERYTHING that I did (including setup determination, individualposition/stop management, entire portfolio management, etc, etc, etc).I also had to work around all of IB's crappy API and market datalimitations. Everyone on this forum knows what I'm talking aboutthere......It also quickly became apparent that my trading methodologystill sucked. In fact, I completely changed my trading methodologyabout 3 times over the course of the last 2 years, until finallysettling in on something that seemed to work. It was in writing,tweaking and simulation trading my system that enabled me to finallyhone in on a successful methodology. I kept tweaking and working overthe course several months with my Simulation Account until I startedto see a positive expectancy emerge.Once I started seeing positive expectancy for a for months, Istarted trading with real money (only $27,000---very near the $25,000pattern day trading limit). Not much to my surprise, I saw myexpectancy drop when I went to real money, but it still remainedpositive. Moving from a simulation account to a real money account isjust a different beast--all together. Strangely enough, the thingthat has hurt me the most has been psychology (and commissions). Slippage hasn't really hurt me very much moving to a real moneyaccount (at least not yet at this small account level). Commissionshas hurt me, because I simulation traded with a $100,000 account andas such, the commissions were less of a percentage hit per trade. Many of my trades are "odd lot" trades below 100 shares.As far as psychology is concerned, I find myself thinking that Iknow better at various parts of the day and I prematurely close outpositions. I've also had several instances where I've introduced a"money loosing" bug the night before or have changed stuff thatadversely affects my expectancy and I don't find out what it was untila week or so later. I now document (in a journal) every single changethat I make to my system and I back up my code base every night, incase I need to revert. I also document how the system did that dayand various problems or fixes that I need to work on in the near future.My system trades only stocks and I've been running it now (withreal money) for only 3 months. It's placed 1,330 trades (822 long and508 short). It's going to make IB rich with commissions. I've paidthem $2,938.93 in three months and I've only made $3,165 (11.7% inthree months) and my overall expectancy is only .08. Because I'm aday-trader and I sometimes can carry up to 40 positions on a givenday, my risk size is very, very small. I keep it to a max of .135% ofequity on every trade (or approximately $40 bucks per trade rightnow). I'm a bit bummed about my expectancy, but I've tweaked andhoned just about everything during these 3 months and as such, Ibelieve things are going much better now than they did in the beginning.As far as back-testing, I don't actually have a piece of softwarethat backtests my strategy yet. I've written back test software forprevious END-OF-DAY strategies, but not for my current intra-daystrategy. I'm actually collecting all of the data that I need tobacktest. It's just a matter of finishing my backtesting software. Just collecting the darned data was a pain in the rear, because mysystem uses 5 second bars and tick data to make its decisions and itmay look at anywhere from 500 to 1,000 stocks per day. So, justwriting decent software to collect and store this volume of data was abeast. I only collect 5 second bars on TRADES, BIDs and ASKs. Idon't actually grab the tick data from anywhere like opentick.com forbacktesting.As far as a suitable result, I'm not really sure. Perhapssomeone else can chime in on this. I think 11.7% in three months (inthis shitty stock market and with this small account size) is prettydarned good. Going forward, I think I'll do much better than this,now that I've perfected just about everything that I can perfect. Ican't wait for a nice bull market, as my system seems to do betterwhen the market mood is positive and not negative. I also plan ondumping more money into this after another 3 months of positiveresults and once I break through my previous equity high of +17%. Jason

Post 3
I dream of indicators, non-standard correlation, and edge detection.I love indicators.Take the CCI, smooth it with an SMA and then take a KAMA of that. Whenthis KAMA pivots (reverses) beyond a CCI threshold of 30-50, look forprice confirmation (shorter time frame [15 min] price reversal), thenenter three positions, 1 at market, 1 at limit +- 10% of 5 period ATRand 1 at limit +- 20% 5 period ATR. If you don't get hit on the limitswithin 3 periods, close them. Close positions scaled out after certain%'s. Leave one in until a trailing stop knocks it out. Run this on 45minute data, and 90 minute data.To me it's indicators that drive strategy development. If I canenvision new indicators, or recombinant indicators, like thatdescribed above, I can build up a version of the strategy and see howthe price action and indicator action play out. If it looks promisingI keep it around as a potential rule. I've got dozens and dozens ofthem, all dreamed up and waiting for me to code them up.But as rwk mentioned - I dream and build them mostly forentertainment; confirmation that I can see a market pattern and buildan indicator to trap it.Backtesting strategies is first and foremost for me. It's how I canconfirm an indicator is doing its job. I trade FX only and data is nota problem, unless I want 10 years of 5 minute data...Matching strategies/indicators up with instruments is important I'vefound. A curr pair that doesn't behave well with strategy A may workjust fine in strategy B. EURCAD/USDCAD for some reason - just don't dowell for me. Just like metals and softs don't behave in a similar wayto make you think you could trade them with the same strategy. Sostrategy/indicator : instrument pairing is one way I like tocustomize.Non-standard correlation is something I came up with that allows me tocompare say gold with a home built AUD index. Or lumber and copper andthe home builders. Dump them all into a single chart and see if youcan get leading/trailing correlation events out of them. Of course thetrouble is decoupling price so that they can all fit in the samechart...Then there's edge detection. This is a popular concept but one youshould test for. It allows you to separate your entries from yourexits and position and risk management. Testing for strategy edgeallows you to understand that your personal trading edge may notstrategy based but perhaps money mgmt based or risk aversion based. Doyou make money because your strategy picks excellent entries? Orbecause you've got a great exit technique? For instance you could waitfor a certain volatility level to be reached and then you could entera spread position (long AND short). Use a chandelier exit for both.One will get closed out pretty quick but the other will tend to run awhile - hopefully long enough to clear your commish and make you some$. It's all in your exit. But you should know what type edge you haveso you don't screw it up and try switching it or changing it.To me the shear breadth of potential with regards to all the marketsand trade lengths and trading styles and just so much data to be mined- all of this boils down to endless possibilities, of which I spendmost nights dreaming about. Yeah, I know, I'm an odd duck. MM
Related Posts Plugin for WordPress, Blogger...