Greetings --
Traditional trading system development platforms, such as AmiBroker, TradeStation, and NinjaTrader, have the benefits of features specific to traditional technical analysis with its roots in chart interpretation. Analysts and traders who find value in those techniques should stay with those platforms. But skip to and read my final comments before leaving this message.
More recently, traditional platforms added capabilities to develop and test rule-based trading systems. Trading system specific languages such as TradeStation's Easy Language and AmiBroker's afl are examples. There are two primary limitations to traditional platform trading systems.
1A. They, with very few exceptions, use the "decision tree" model. Decision trees have several advantages, including rapid testing of alternative sets of rules and ease of understanding the resulting model. One of the major disadvantages of decision tree models built using traditional platforms is that they are easily and often overfit -- that is, it is easy to adjust the rules so that the fit to the in-sample data is excellent and perhaps too good.
1B. There are model development techniques that can be used to test whether a model has been overfit, and to test whether it has identified general characteristics of the data. One such technique is crossvalidation. It is regularly and widely used in almost all areas of application -- but trading systems seems to be the most important area that is missing. The model development literature describes crossvalidation well.
1C. The primary purpose of systems we develop is prediction. We want the system to identify conditions that precede profitable trading opportunities. That is, we want the model to have learned to identify some persistent signal within the data, so that it can continue to identify similar signals in data that was not used during development. The only way to know whether a model has "learned" something general or "memorized" something specific is rigorous validation. Traditional platforms are weak in validation.
1D. Model development for prediction is guided by an objective function. Traditional platforms have very limited capabilities with regard to the definition of objective functions and evaluation of models. Almost always the objective function is a single value -- such as the final equity or smoothness of an equity curve. A more thorough development makes use of a distribution of results, of which the single value is one example. Traditional platforms are weak in capabilities for analysis of the distribution of results.
2A. Decision tree models are only one of many alternative model techniques. Others include support vector machines, boosted models, nearest neighbors, neural networks, forests of individual models (including decision trees) -- there are several dozen well documented and professionally implemented alternative models available.
2B. Individual decision tree models are seldom the best of the alternatives. Unfortunately, there is no way to determine in advance of extensive model development which model technique will be best for a given set of data. Fortunately, the models available from the scikit-learn library have a common interface and can be tested, fitted, compared, and validated in a single computer run.
Machine learning is the label often given to the broad technique of developing models that learn from data. (In a very limited sense, traditional trading system development is machine learning, but with a very restricted set of applications and capabilities.)
To address your specific questions:
----------------
The two techniques -- traditional platforms and machine learning -- are equivalent with regard to bar length. Either can use data bars of any length. The pandas library -- developed by Wes McKinney while he was an analyst for Cliff Asness' AQR Capital hedge fund -- makes data manipulations (such as dealing with missing data, changing periodicity, standardizing time zones, adding columns of intermarket data, etc) easy.
There is a fundamental difference in point of view between the two techniques.
With traditional platform development, many decision are made in advance either by the publisher of the platform (in terms of what techniques and tools are available) or by the developer during development. Within those constraints, the focus is: "Compute an indicator, then see what happened later."
Contrast with machine learning, where the focus is: "Identify a useful pattern, then see what preceded it."
Holding period is related to this difference. But even that comes after frequency of evaluation. I have written extensively about the difference between impulse signals and state signals.
Traditional platforms primarily (but not exclusively) use impulse signals (Buy, Sell, Short, Cover) to mark the beginning and end of trades. State signals indicate the position to be held from the current time to the time of the next evaluation. If you are using daily bars and updating after every close, the evaluation period is daily. If you are using impulse signals (and strictly following the rules of your model), no action is taken until a new signal is issued. The holding period is the time between the Buy and the Sell. That might be limited by one of the rules, such as a minimum or maximum holding period exit. But there is no inter-signal action.
State signals are generated by the model at every evaluation. If the model is examining daily data, it is searching for patterns daily, and it will issue its recommendation for the trade for the next day. That will be one of the states you want your trades to include -- "beLong," "beFlat," or "beShort." The accounting for a multi-day hold is identical whether it was due to two impulse signals some days apart, or to several beLong state signals in succession.
With a traditional platform, decisions made by the the developer determine ahead of analysis of the data what the holding period will be. With machine learning, the model looks for the signal within the data and reports it as it occurs.
-------------
You could combine the two techniques. Traditional platforms are specialists at reading data from providers such as Yahoo, Google, and Norgate. And they have builtin functions to compute indicators (which may or may not be a good thing). You can, and I have demonstrated code that does this, read data, compute indicators, and write a csv file to disk using a tradition platform; then use a machine learning program to read that csv file, build and validate the model.
You will probably not be able to call the machine learning libraries or completed model directly from the traditional platform. So signal generation will always be a two step process involving both tools.
Python is equally as good as reading financial data. Yahoo, Google, and Quandl provide free data. Quandl provides high quality subscription data with over 4000 data series. I have had several conversations with Richard Dale of Norgate encouraging him to support a Python API.
-------------
I am not certain about what a general punter can do, or wants to do.
The profession of trading has already moved to bigger firms, shorter time periods, more sophisticated systems, and stiffer competition; and the markets are becoming more efficient and profits more difficult to come by. Machine learning is already dominant, and will become more so in the future. Being successful is not just being best among a small group of non-professional traders, but rather among the best in the entire arena. There are no handicaps given to newbies, no do-overs. David Shaw and Goldman Sachs will vacuum up all wrong trades and bankrupt all mediocre traders without a second glance.
In my opinion, every trading system developer needs to know that his or her systems can compete profitably.
-------------
Some general suggestions. All have already been published in my books and presentations.
1. Use state signals. Even if you are staying with a traditional platform. Evaluate every day. Be willing to change position every day.
2. The sweet spot is: trade frequently, trade accurately, hold a short period, avoid serious losses.
3. Use CAR25 as your objective function. It is a Dominant metric. It can be used to compare any two or more alternative uses of funds. Trade the single best, switching to the next best when CAR25 values change.
4. Trade a single issue -- the single issue with the best CAR25. Forming a portfolio only ensures that some of the funds are being used suboptimally.
5. Keep position sizing out of the signal generation model. The pattern recognition portion has no way of knowing whether a distribution drift is taking place. And -- if position sizing is not in the trading management system, then there is no "knob to turn" to adapt to changes in system health.
-------------
In summary.
My association with AmiBroker began over 15 years ago. At that time, I was in recovery from a very bad business experience where a trading system platform I had designed, built, and was beginning to market was stolen from me by a disreputable business partner. I was in the process of writing a new platform when a colleague introduced me to AmiBroker. It had most of the features I was planning to put into my new platform. Since I wanted to be a trading system developer, not a platform supporter, I gladly bought an AmiBroker license and dropped my own. Over time, AmiBroker was expanded to include most of the pieces I though were missing. I continue to support and recommend AmiBroker as the traditional platform of choice. It is inexpensive, well documented, fast, well supported, etc.
Move to machine learning-based development if you can. There is a learning curve. There is math. A few of my consulting clients are continuing to use AmiBroker. I have moved my own development and trading to machine learning. I recommend Python -- although those who already have substantial experience with, or support for, R might consider it instead.
If you decide to stay with traditional systems, at very least take position sizing out of the trading system and implement a separate trading management system. Reduce position size during drawdowns.
My macro view. It is not scientific. That is, it is not based on evaluation of in-sample data followed by validation using out-of-sample data. That said, I believe we are in the biggest bubble yet seen in all financial classes -- equities, bonds, real estate. I expect we will revisit the 2009 lows, and probably go lower, in all financial classes. I have no way to predict when this will happen, but the trading management system will recognize it when it happens and save my trading account. Holding through a deep drawdown is an act of faith -- not, in my opinion, a good thing.
Best regards,
And thanks for listening, Howard