A Stop Order typically comes in two flavors: a stop loss which turns into a market order when price goes below it, and stop limit which turns into a limit order for the stop price.
A Stop order may be either a buy or a sell. It may be used to enter or exit a position.
Check with your broker for the exact commands to use for your own trading.
The stop order is typically thought of for exiting a trade, however, it can also initiate a trade. For example, a trader buying on new highs may set a buy stop slightly above the current high. If the price hits the new high, the stop is triggered and the buy order executes. In this case, the cool guys say the stop was “lifted”.
Many traders use a stop order to cut losses. Some traders also “trail” the stop by moving up the stop trigger as the stock price goes up to protect partial profits.
In backtesting, I do not use the stop limit order, just the regular stop order. The historical price data cannot show the potential effect of our stop might on a live market — that is a known inaccuracy. Even so, backtesting can show the benefits and trade-offs of using stop orders.
I want a single number to rate trading strategies for comparion. This definition is a placeholder until I decide on a way to do this. I plan to write about it here so that it will show up in alphabetical order in the glossary.
A Swing Trader tries to capitalize on short-term price movements. A swing trader will hold overnight, possibly for several days, which distinquishes swing trading from daytrading. Of course some exit strategies are open-ended so the trade may last as long as the stock is running. After backtesting a few we can see the average hold time for the different trading strategies and settings.
In my backtesting, the 2day timed exits apply to Swing Trading. At that point, its clear if the entry strategy has the trade off to a good start.
Test Period and Time Period both refer to the range of historical price data used for a particular backtesting run. For example, 1999-2001, or May 1, 2004 – Apr 31, 2007.
To make apples-apples comparisons between runs, the test period needs to be exactly the same.
Most backtesting tools foster a lax sense of test periods. They bury the date contols, encouraging you to just use what comes up. By default, the tests go how-ever-far-back to today which means that the same test run today as yesterday will produce slightly different results. The error from this shifting window builds up over time, especially for extensive market testing that takes months to get through all the different runs.
I actually did a big round of testing 18 months ago and if I did not take steps to control my time period, I would now be running on only 25% of the original data! Fortunately, I did take the trouble to stake out specific test periods and essentially quarentine the data so that I can make valid comparisons from run to run.
Another reason for setting specific test periods is to avoid curve fitting and over-optimization by doing out-of-sample testing. That means running on two different time periods to make sure that good results in the first period are okay in the second time period and hence have a chance at persisting into the future.
Choice of test period strongly influences results as the market behavior differs. One way is to try to isolate time periods of rising, falling and sideways markets. Another method chooses time periods that include all three behaviors.
I started out with a ten-year window which includes all behaviors: May 1994 – Apr 2004. I coupled that with a three-year anti-curve-fitting window of May 2004 – Apr 2007. Lately, I’ve added a third window of May 2007 – May 2008.
By timeframe, I mean the duration the trader would ideally like to be in a trade. People may seek out longer or shorter hold times based on their temperment, tax situation, global market views, margin, and a host of other factors. See also Trader Type.
Market Maker = always have an offer to buy and sell outstanding
I’m most interested in the swing trade and position trading. I’d like to hear what readers think is the most interesting area and have set up a Buzz Dash poll. Please vote for your favorite type:
Many experts say you need to find the style that suits you best and that timeframe is often a matter of temperment. Maybe, but I do find my temperment changes as I see the various track records from backtesting!
A Trading Strategy is the collection of rules about when to enter and exit trades as well as the size of each trade.
Sometimes people say “trading system” instead and I do it too. I really think trading system is larger than just the entry/exit strategies and includes things like record keeping, etc.
TradeStation is a software tool for analysis and backtesting with facilities for creating custom trading strategies. The image at the top of this article is a screen shot of a very simple entry strategy that buys whenever the stock meets minimum volume requirements. This obviously is not a tradeable strategy but is something I use as a baseline for comparison.
Even though I often use the terms interchangably, I think Trading System is bigger than Trading Strategy.
A Trading System is said to be either mechanical, discretionary, or a mixture of the two.
Most mechanical systems are run by a computer, but they need not be. A person could conceivably make manual calculations and monitor trades according to rigid rules. Even in a fully automated mechanical system, the human element is present — someone must decide which system, when to turn it on, how to keep the computers running, etc. However, backtesting is an obvious step in the development of a mechanical trading system.
For discretionary traders, modern trading also relies on computers acting according to fixed rules. For example, many people, wheither they consider themselves traders or investors, fundamental or technical, consult stock charts populated with their favorite analysis techniques and indicators. Backtesting can inform the judgement of a discretionary trader by outlining the potential performance of various strategies and indicators.
Ed Seykota often says that a trader’s system is really the set of emotions he/she is unwilling to feel. (See Sat, 17 July 2004 in his Trading Tribe FAQ). I feel like dodging by saying the emotional side is beyond the scope of this blog.
Now that I think about it, its not so hard to backtest a general example with software. For example, the Rational Choice book cites a few studies that prove our human tendency for loss aversion. To codify that, write a system with:
no stops in order to avoid the pain of taking a known loss,
close targets to avoid the pain of giving profits back, and
quick file deletion to avoid the pain of knowing its unprofitable.
Win rate is also a good metric to gauge if you can stick to the system or get too demoralized by low win rates.
You can’t exactly determine the loss rate from the win rate because a trade may break even which is, technically speaking, not a loss. For comparison purposes however, it is enough to know the win rate, the expectancy, and the standard deviation.
For a trading system, the win rate is the probability of a winning trade. It is NOT the probability of profitability. For that, calculate expectancy because the size of the wins vs losses matters. A lot. For example, a profitable trading system may win less than 50% of the time if the wins are bigger than losses. Likewise, its certainly possible to lose money on a system with an extremely high win rate when that one big monster loss comes along to wipe out all previous gains.
Readers of this blog may be interested in my report of attending a week-long Traders Camp put on by Dr. Alexander Elder in Cyprus. You can read about it on my personal blog. These articles focus on the class: