Postby peter_77_peter » Sun Apr 06, 2008 12:58 pm
Dear pirates,
though this seems to be the most frequented thread in sharing experiences about automated trading, I´d like to post some learnings, simply to document that I agree to everybody saying that you have to do your homework cleverly and thoroughly. There is no free lunch and no way to bypass hard and thoughtfull work.
Well, after about one and a half year of development, the prototype of our trendfollowing automated strategy is about to get online soon. I think we did our homework and came up with a system that is basically based on:
- Multi Time Frame TrendFilter Matrix, each filter based on carefully chosen PMSMs of well thought out signals, relatively measured, without absolute thresholds. (more to that in the text below)
- Triggers for the local timeframe, based on carefully chosen PMSMs of well thought out signals, relatively measured, logically circuited cleverly. (more to that in the text below)
- A bunch of Exit Strategies basically setting up a volatility channel, that moves along with the price and protectively narrows, when events occur like change in signals, change in profitability. Everything relative again, and adaptive to the market. Additional protection for some other sources of risk.
- Position Sizing that is based on the Exit Strategies and dynamically adjusted to risk measures and volatility when a trade is on.
- StockPicking throughout hundreds of diverse markets, finally putting together a portfolio of our best performing stocks using EquityStops for every strategy.
Alltogether its a bunch of strategies, some thousands of Lines of Logic / TS Code plus some homegrown globalvariable.dll for communication between the strategies, and visualizing the most interesting intern variables to get everything of importance displayed easily on a Multi-Data Screen for each Stock.
It was very nice to see how the robustness of the approach got better and better with the implementation of each logic module we´ve added. We´ve read a lot of books and articles, wrote our own documentation of about 60 Pages, because we agree to "You MUST know what you´re doing", and think, that if you know the dependencies of your straetegies´ settings, and the limitations of TS optimization, then optimization is still a good possibility to get a "proof of concept" for the individual aspects of your trading system.
Some of the concepts we use are inspired by TROs PMSM approach, some are inspired by Chuck Lebeaus Work on Exits, some are inspired by Alex Elders Work, the Books of Jack Schwager and Michael Covel have been helpful as well, some articles by van tharp cosidering sizing are quite helpful, etc. pp. we´ve rethought all this approaches, trying to customize them for our needs and add our own touch to it, because we agree in everything has to fit your trading style. Besides that we´ve come up with a lot of own ideas, derived from watching stocks and signals historically and live for some zillion hours, formulating our own ideas first, and testing them carefully.
Actually none of the above mentioned books or articles in forums will reveal any secrets, neither do I with this post. But alltogether the reliable advice you pick up here and there will finally add up to some kind of framework/guidance helping you setting up a do list and specify all sources of failure and problems you´ll have to solve on your own.
To those who believe in "the worlds best indicator": Basically, the only Input to trust is PRICE, and, everybody who tries to invent a "crystal ball" must fail. There will be thousands of people who want to sell you systems, books or advice. Trust nobody, get inspired by the work of traders that do real trading (you´ll get a gut feeling in this in the quality of advice they give), and then: do your homework, create your own approach.
In Trendfollowing you will never get in perfect and you will never get out perfect, but if you´re doing good, then you will still be able to slice out a rewarding piece from the midth. There´s nothing to predicition, everything is about well thought out reactions to price. Setting up a consistent automated trading system is all about rational thinking of what can happen, thinking about the different ways of how to react and choose one before you´ll face it in reality, basically, developing a trading system is: the attempt to learn how to trade, if you succeed you´ll found your personal edge, if not, you have to try again.
There is a nice quotation of Samuel Becket that somehow resembles the endurance it takes to succeed in developing a trading system:
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better.
Keep in mind: Trend Following is only one of many approaches. In the end all approaches can be probably categorized by a number you´ll be able to count with ten fingers. Choose the approach that seems to resemble your preferences best first and then concentrate on creating your own instance of this approach, developing your personal edge. Remind yourself about beeing consistent with this approach, that is there will be no "one size fits all trading system working in every market under every condition", that is i.e. the entry setups, exit strategies, and overall goals chosen, should match with the outline/scope/limitations of the approach.
If I say the only Input is price, then there´s still some room for squeezing out all information from price, i.e. direction, strength, momentum, trendiness, volatility. There´s not much more information than that available, so it´s better to concentrate on how to build up a reasonable logical circuit from the available Information. I really like using TROs PMSM approach for almost everything, because, if you´ll adapt it the way you need it, it will force you to think how to convert squiggly lines into discrete signals and this is what you need as Input for the "logical circuits" you have to build resembling the setups you want to trade, so it´s basically a good receipt to avoid fitting, throughout clever thinking.
It´s rewarding to think about every possible aspect of your trading system, like the tradeoff of the averages you use smoothing your signals, the tradeoff of acquiring informations from different timeframes, or the tradeoff incorporated with the measurement of profitability you put on, ... , in the end you cannot eliminate risk, you only want to learn how to control risk systematically, so you have to be aware of every source of risk and every possible leak, where risk might enter your approach. Or, put the other way round, you`ll probably won´t be creating your edge from doing something scientifically completely new that nobody has ever done before, but, by carefully rethinking common sense best practice and finding your own style and discovering small rooms for improvements in each and every step you do and step by step.
And remember, this is no exact business, you won´t find a perfect setting, every decision you´ll take is a tradeoff: For every advantage you´ll make you have to pay something. Like: When you want to get less noise, you´ll have to pay in terms of lag.
It seems true to me that: Exits and the Risk and Sizing Calculations derived from that are most crucial. You might want to review the posts in the thread "Exit Strategies-Whatis your prefered way for exiting trades?" to evaluate some possibilities.
It´s all about staying in the market, and that is all about being able to face loosing streaks. If you adjust your sizing to that, you´ll survive almost any drawdown and, finally stay long enough in the market to cash in the positive expectancy you get from the careful design of your entry and exits strategies.
There is no free lunch, the profit you get from the market is the reward to the risk you´re taking. You won´t be able to get great returns without taking the related risk. Any risk you take will occur somewhen, are you able to face it? So in the end you have to adjust the risk you take to the levels you´re able to face and should concentrate your efforts on: trying to cash in the reward you should get from that effectively, basically this is all you can ask from the market. The best tool to earn a living from taking moderate risk is: Beeing smart and patient, and besides that: Accumulation over time, if you follow an antimartingale point of view, you might be able to grow your equity geometrically. But remember the prerequisite: you have to survive in the markets to be able to do that.
Choosing the time frame is about the tradeoff: noise in data vs. increase in possibilities to trade. Using daily data is coming up with less noise then, lets say using 15Minutes data. On the other hand side using daily data, you won´t get the trading activity you need to achieve reliable data, revising the results from your developoment. If you choose "faster timeframes" you´ll produce more trading, incorporating some more risk through noise as well as higher cost of trading, that is a crucial trap as well, so find your tradeoff.
We´re starting with conservative risk parameters (i.e. 1-1.5% per trade) and conservative time frames (matched with the information we get from even more conservative timeframes). We measure the resulting average trade in terms of days and not minutes. We´re in the market about 40-60% of time, depending on stock profile and strategy settings. If we´ll achieve our goals with the conservative setup, we might adjust to faster time frames and more aggressive settings. But remember that you start as a bloody beginner, and if you "want too much, too fast", you´ll basically increase the possibility of beeing swept out from the markets, before you get any reward. Do you really want to risk all the effort you´ve put in your development by simply beeing greedy or impatient without any necessity?
You won´t be able to trade any stock with your system but have to find a profile of stocks that fit to your style of trading. We´ve choosen a trend following approach, and our overall goal is "linearity of equitycurves" and robustness.
The so far achieved robustness, revised in testing is quite promising, about 15% of all stock´s we´ve tested matched well with the profile we need for our strategy, like trendiness, volatility, liquidity, price level. In the some dozens of Stocks that ended up in the final peer group, we´ve chosen to have a closer look, we were able to achieve the main overall goals with the exact same parameter setting of our strategies. If we then adapt the strategy settings to the individual stocks, we see that each parameter is quite robust in itself, that is, we see plateaus, not mountains. We don´t look for the parameters that get us the best absolute return, we look for robust settings, and good relative performance figures that resemble our concepts. We´re quite happy that we seem to be robust to out of sample data, that is, shifting the period/start/end/date of our testing window and watching the results, can be interpreted as a reasonable mapping from the stock data, transforming it undergoing the logic of our system, resulting in a final equity curve that seems to resemble the properties we´ve aimed for developing the logic our system.
The next step we have to perform is Monte Carlo Analysis, to get a better esteem about the risks/drawdowns we´re facing, finally adjusting our risk/sizing parameters to that. The thing you have to keep in mind concerning this is: If you generate some hundreds of trades with your backtesting, parameters like %winners might be reliable, but the distribution of trades is not reliable. But the distribution of the trades is crucial to the appearance of loosing streaks, drawdowns and in the end your ability to stay in the market as well as the overall performance. Adjusting your risk parameters to that is crucial for staying in the market. So if you´ll adjust your risk parameters to backtesting, the chances that you´re doing fitting are high. That´s why you have to run monte carlo analysis to get a better esteem on a proper choice of risk / sizing. So if anybody knows a good tool for doing this, any link or suggestion is highly appreciated. Some pirate discussion about Monte Carlo can be reviewed in the thread "Daily Market Conditions for Auto Trading".
We´ve used TS for development, because, adding our globalvar.dlls we could achieve our basic needs and prototype everything easily. If everything works out, we will recode everything, probably using NT, because TS is a stupid interpreter that is somehow medieval and definitely has its limitations.
Everything works out means, that we´ll be going live with a portfolio of some Stocks, automatically traded by our systems, getting a "real money real world" track record, because in the end, this is the only reliable data. If we achieve a overall performance of 10-15% in the first year we can be happy to continue, trying to improve our approach adding more diversity in markets, timeframes, strategies, permutations, as well as incorporating the learnings derived from our "real money, real world" results, markets change a lot, you have to continually adapt to that, that is, you have to learn/improve every day, or you´ll be swept out. If we fail to reach our goals, then we´ll be reviewing all results and then evaluate whether to accept failure, or investing some more time/money.
So, I agree to everybody who says that building a trading systems is like any other job: First and foremost it´s a lot of hard work, with a lot of ups and downs, and you´ll be getting close to "pack everything and dump it" a lot of times. But, finally if you´re doing your homework, being crystalclear in your thoughts, carefully revising every step you take, not giving up on this long journey, and never get attempted by greed or any other emotional sources of failure, then you might be rewarded in the end.
You definitely have to be passionate about doing all this, otherwise you´ll won´t make it!
All stimulating input/feedback highly appreciated, thanks and good luck to everybody,
best from spain,
peter