龙听期货论坛's Archiver

龙听 发表于 2018-3-16 15:35

Trading system analysis: Then and now

The calculator was a major leap forward in trading strategy implementation, not just in terms of how it streamlined the work of professional traders, but in how it allowed non-pros to use advanced trading techniques. As we saw in our first installment in this series, the calculator soon was supplanted by the computer and purpose-built software that did the heavy lifting for you.

Profit Taker was the first commercial trading platform that could backtest trading strategies, but it offered a single system for which the user only could change parameters. Soon, traders could not only test — and modify — trading systems on their own, but they were able to start from scratch, applying their own ideas to the markets. Walk-forward testing, portfolio-based analysis and real-time optimization followed.

Today, this path has led us to fully automated backtesting and algorithmic trading, but this wasn’t necessarily a smooth progression, and it didn’t happen without a few detours and speed bumps. Here, we’ll look at the software and technology that created the framework that most are familiar with today. (Note that some of this software is still commercially available. This historical account is not intended to be a review of current features, just a look at how ideas, tools and analysis have evolved in an effort to understand what the next steps may be.)

Excalibur

Excalibur Testing Software by Futures Truth was one of the first full-featured backtesting platforms. The software development process started in 1985 on a CROMEMCO 3 computer utilizing FORTRAN IV. The computer had a whopping 64k of RAM and used 5-1/4-inch floppy drives. Trader John Hill spent nearly $20,000 for the computer and hard drive — an enormous sum for a machine with the fraction of the computing power available today for a few hundred bucks.

Wayne Andrews, a close friend of Hill’s and a computer scientist, was instrumental in helping Hill acquire the CROMEMCO, as well as providing his own personal tick level price data for Hill to use. (The data eventually grew into a business of its own, sold by Tick-Data out of Colorado and Commodity Services Incorporated out of Florida.)

During this same time, the Apple Macintosh was rising in popularity and power. John Fisher, who Hill met while looking at computer books at a local Computerland store in 1985, liked the unique graphic user interface, or GUI, and ported Excalibur to a Macintosh 68020. This helped solve a major problem for Hill. As he explained to Fisher at the time, he wanted a piece of software simple enough where he could code his trading ideas and have the software produce performance metrics on those ideas. Hill had been doing this by hand, but his many ideas quickly outgrew this laborious approach.

[p=30, 2, left]At the time Excalibur was invented, it was the only retail-oriented commercial software to support completely custom, built-from-scratch trading systems. The synergy between a veteran trader and veteran programmer was tremendous. Their efforts gave birth to software that was a substantial achievement in the world of algorithmic trading and testing.[/p][p=30, 2, left]There were three key components that made Excalibur ahead of its time: Portfolio analysis, daily and intraday testing and testing on contract data that incorporated rollovers. This last component meant that the software didn’t have to rely on back-adjusted time series. Because futures contracts have finite lives, traders often “stitch” multiple contracts together for continuous long-term testing. This creates either unnatural gaps in the series when liquidity shifts from one contract to the next or the individual contracts have to be adjusted higher or lower to eliminate the gap. For Hill, personally, this last feature was critical. Many of his strategies depended on individual contract behavior that he believed was lost in back-adjusted data.[/p][p=30, 2, left][attach]2909[/attach][/p][p=30, 2, left]However, it wasn’t all perfect. While the Apple operating system and its user-friendly GUI made development easier, the language was a derivative of FORTRAN and did require programming knowledge (see “Speaking in code,” above). Also, early versions of the software did not incorporate graphics or take full advantage of the visual power of Apple’s system. A sample performance report can be seen in “Raw results” (below).[/p][p=30, 2, left][attach]2910[/attach][/p][p=30, 2, left]George Pruitt joined the Excalibur team in 1989 to help develop a GUI interface for the software and also a graphing package. Without the ability to graph the data, including indicators and trades, most found it difficult to validate their trading algorithms. With his experience in Pascal and the C programming language, Pruitt was able to work with the Macintosh platform easily. Within a year, the complete Excalibur software was available for public consumption. Futures Truth still uses the software today to help develop and test trading ideas and systems for their commodity trading advisor and the publication, “Futures Truth.”[/p][p=30, 2, left][b]Trading recipes[/b][/p][p=30, 2, left]In 1992, Robert Spear released a backtesting platform with trade management and portfolio capabilities called Trading Recipes. This was a language-driven software tool written for MS-DOS. It was designed to develop, test and execute rule-based mechanical systems.[/p][p=30, 2, left]Trading Recipes featured a modular design that encouraged users to break down a trading system into small, manageable programming tasks. For example, one area was for defining indicators and values, another was for how to enter a trade and yet another was for defining how to manage and exit a trade. Values were arranged in columns. To capture a simple moving average of the past 20 closing prices in Column 1, you would write:[/p][p=30, 2, left]COL1 = SMA[CLOSE, 20][/p]
[p=30, 2, left]To go long if the previous day’s close was greater than the value in that day’s Column 3, you would write:[/p][p=30, 2, left]IF CLOSE[1] > COL3[1] THEN BUYOPEN [/p]
[p=30, 2, left]Other features included performance reports, a spreadsheet-like display of values used in your trading systems, numerous pre-packaged indicators and the ability to handle many different trading data formats.[/p][p=30, 2, left]One strength of the program was its what-if testing abilities. Say that a particular sector (stocks or futures) gets hot and that your system starts adding positions across that sector. As the system adds those positions, the portfolio accumulates sector risk. You conceivably could end up with a highly correlated portfolio consisting of, for instance, too many grain commodities. Trade Recipes included purpose-built tools that measured that portfolio risk via a GROUPRISK variable. Other risk management tools were:[/p][list][*]Equity available at the time each new trade[*]Amount of risk and number of positions across the portfolio[*]Amount of risk and number of positions across a system[*]Amount of risk and number of positions within a sector[*]Amount of risk and number of positions for a particular stock or future[*]Amount of risk and number of positions for long trades[*]Amount of risk and number of positions for short trades[*]Amount of risk and other metrics for a trade under consideration[*]Margin requirements[*]Start-up capital and starting date[*]Current market volatility[*]User-defined metrics[/list][p=30, 2, left]Trading Recipes was a powerful program. Its risk-management metrics remain some of the most impressive in retail market software and it is one of the biggest leaps in the technology for individual traders. Unfortunately, Trading Recipes fell into a trap. Remember the powerful spreadsheet software Lotus 1-2-3? Maybe not. That’s because Lotus, like Trading Recipes, didn’t create a Windows version until it was too late. Trading Recipes wasn’t available in a Windows-platform until 2004-05. By then, many users and potential users had found another trading tool.[/p][p=30, 2, left][b]Systems for the masses [/b][/p][p=30, 2, left]Brothers William and Rafael Cruz came to the United States together from Cuba. They trained to become classical violinists together. Although they became quite accomplished, professionally performing classical music was not in their future. Fate had other ideas.[/p][p=30, 2, left]When Bill was 16, a futures broker called Bill’s father, but Bill took the call. He listened. He learned about futures trading and it took hold. For two years, he studied everything he could and when he turned 18, both he and his brother Ralph pooled $2,400 and started trading pork bellies.[/p][p=30, 2, left]They started well but ultimately lost all the money in a month or so. They still believed in trading and knew there must be a better way. They went to the library, got pork bellies data and made hand charts. They then used these charts to test ideas. They added arrows — up for buy and down for sell — to record and test ideas. This cluttered up their charts, so they started writing on clear plastic sheets that they positioned over the charts. This was around 1979. [/p][p=30, 2, left]In college, Bill met Kip Irvine, a music major with a minor in computers. In those days, it was difficult to get your compositions played. Bill, being a skilled violinist, agreed to play Irvine’s compositions if Irvine helped him automate his trading strategy analysis. However, programming the strategies took a lot of time, and Bill had more ideas than Irvine had time. [/p][p=30, 2, left]Bill decided that working with a programmer was too time consuming. He needed a way to test his strategies himself without having to learn how to code. This was the seed of the development of EasyLanguage — a collection of intuitive commands and standardized syntax that closely mimicked natural speech.[/p][p=30, 2, left]Bill and Ralph started a company and began hiring talented people to program the software. The original development team included Irvine, Sam Tennis, Peter Parandjuk and Liren Ji in engineering. Ruben Triana and Darla Tuttle were in product management.[/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000][size=14px]Artificial intelligence[/size][/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000]
[/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000][size=14px]While TradeStation brought system trading design and execution to the masses, the native version of the software was built around mathematical-based indicators that had been in use for decades — moving averages, oscillators, price patterns, statistics, etc. For many, the real future was in advanced analysis strategies, often lumped under the broad and hard-to-define heading of “artificial intelligence.”[/size][/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000]
[/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000][size=14px]In 1988, this author co-founded a company called Promised Land Technology. A neural network add-in was developed for Microsoft Excel called Braincel. Many clients wanted to use Braincel to predict stock and commodity markets. We obliged and, as such, got involved in the trading business. We built a backtesting add-in for Excel called Futures Builder. Users programed their ideas in Visual Basic for Applications. The add-in provided performance reports and generated next-day orders.[/size][/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000]
[/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000][size=14px]More important, though, neural network tools were integrated with trading system strategies. One system that was packaged with Futures Builder was a 30-year Treasury bond system that used a neural network to predict a moving average crossover.[/size][/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000]
[/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000][size=14px]Other companies were using neural networks, of course. In early 1994, NeuralWare released a trading system development product called Predict. Several years later, the company came out with NeuralShell Trader as a standalone product. Both of these embedded neural networks, genetic algorithms and backtesting into one platform. NeuralShell Trader still is being developed and sold today. [/size][/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000]
[/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000][size=14px]Many of the products that were state-of-the-art during this Golden Age of development are gone: ProfitTaker, Advance Chartist and Excaliber all were once considered cutting edge at one point but failed to continue and improve. Products such as TradeStation with its programming language and add-in API eliminated the need for traders/software developers to continue developing custom tools.[/size][/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000]
[/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000][size=14px]Now, we find ourselves at another frontier. Needs have shifted to portfolio capabilities and advanced programmable money management. Increasingly, more traders are seeking advanced analysis for both equities and futures. There also is interest for integrated trading strategies that incorporate neural networks, cycle analysis and genetic algorithms. This is good because the best trading tools are born from the need to get an edge in the markets and make a living from trading.[/size][/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000]
[/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000][size=14px]Software is only half the battle. Hardware is advancing at an impressive rate. Both Multicharts and TradersStudio Multicore take advantage of today’s multi-core machines. TradeStation’s charts currently have multi-core support, and expansion to the software’s backtesting engine can’t be far behind. However, for this new generation of software, systems and developers to evolve the status quo, the technology and the exploitation of that technology have to advance hand-in-hand. As that happens, expect powerful new tools to uncover exciting new ways to exploit market inefficiencies.[/size][/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000]
[/color][/font][/p][p=30, 2, left][font=Open Sans, sans-serif][color=#000000][size=14px]Murray A. Ruggiero Jr. is the author of “Cybernetic Trading Strategies” (Wiley). E-mail him at [email]ruggieroassoc@aol.com[/email]. [/size][/color][/font][/p]

页: [1]