Introduction and Overview of Research


1.1. Problem statement

The purpose of this project is to build a trading system that uses scientific methods to ensure profitability. 

Creating a science-based trading system allows for an investor to design a trading system and portfolio 

using logic rather than emotion. This creates a trading strategy that can keep a trader from making costly 

mistakes that usually arise from relying on their intuition and “gut” feelings. Because asset traders are 

humans and not computers, they have emotions that can prevent them from making smart trades, even if 

they are experienced traders and know when to make a trade. 

1.2. Importance of problem

The reliability of using logical criteria to create trades is one reason that professional stock 

market traders use quantitative trading. By using quantitative trading, traders can make better trades, 

which are based on scientific and statistical knowledge. Thus, an algorithmic trading system designed to 

trade on objective criteria prevents these emotions from ruining a trader’s portfolio. Therefore, this 

project involved creating an automatic trading system designed to run on the trading platform 

TradeStation. 

Methods including statistical analysis and mathematical modeling are implemented in order to 

fully optimize the trading system for use in the stock market. In this project, it is proven that scientific 

analysis is an efficient method for analyzing and writing trading programs. In addition, when the trading 

system is properly written and tested, the advantages of automatic trading outweigh the disadvantages of 

manual trading for multiple reasons. These include, but are not limited to: prevention of user error, 

trading consistency, and proven trading methods.

Statistically-backed information is utilized in the program to decide when to create trades, and 

this reduces errors caused by human interference and bias. Often times, being unsure of a trade causes 

people to make bad choices that result in losing money. In addition, relying on manual trading is a 

strategy that is prone to user forgetfulness and unreliability. By trading automatically through computer 

programs, emotions can no longer interfere with trades since the system relies onmath and scientific

objective criteria to trade (Folger). These criteria, of course, have been determined to be statistically likely 

to accomplish the trader's goals. Also, trades traded by an automatic system will always be ordered to the 

stock broker, since the computer program cannot accidentally forget about the trade. Lastly, automatically 

trading is a strategy that can be built and improved upon over time, with little effort.

1.3. Literature summary and statement of creativity

For the automatic trading system, stocks were traded in swing trading time frames. Two algorithmic 

strategies were written and back tested with historical data, and both strategies were combined into two 

"system of systems" that allowed analysis of the portfolio of stocks. These two strategies were based on:

1) Trend-following resistance and support trendline charts

2) Moving Average crossover philosophies. 

Additionally, analytical techniques such as Monte Carlo analysis and Walk Forward Optimization 

were used to determine the allocation of funds to each stock inside of a "system of systems" portfolio.

The purpose of a dual “system of systems” is to build a reliably profitable strategy for creating 

funds. By allocating money to each of the two systems depending on the potential expected reward 

gained, the entire strategy can be depended upon to create funds regardless on the individual stocks in the 

system or the economic performance of the market. Also, adapting the allocation of money and 

importance to both systems allows the “weight” of the entire “system of systems” to be calculated and 

optimized.

In both systems, the strategy made use of a unique stock selection method known as the 

“CANSLIM” method, which chooses strongly performing stocks to trade (Chen, CANSLIM). This stock 

selection, in tandem with the technical analysis chart trading method of using trendline support and 

resistance lines, is best used for trading during times of rapidly changing prices over the course of weeks 

and months of slow price increases. The price level reaches one of the resistance or support lines when a 

sharp price change happens, and this is exploited in this strategy, by finding this sharp changes. 

The use of support and resistance lines is implemented in a trend-following system for the first of 

the two systems. A trend following system is a trading system in which trades are created that effectively

use the price level movement of a stock as a way to gauge when trades should be made. When the price is 

predicted by the system to increase, then the trend following strategy will purchase the stock. Likewise, 

when the system predicts the system will decrease, then the system will sell the stock that was previously 

purchased. This trendfollowing method a common method used by traders.

The second system conducts trades based on a moving average cross-over strategy, in tandem 

with a trend following system, that follows the trends of the moving averages in specific to conduct 

trades. Two moving average lines were used, and optimized for each stock, to create a system. Using 

historical data, the system calculates the best time range for the fast and slow moving average lines, and 

creates trades when the the “fast” moving average line crosses over and under the “slow” moving average

line.

For the purpose of this project, the system was created on a simulated trading platform for the 

sake of implementing an operable code. Funds allocated by the system were not evaluated in terms of 

feasibility or actual implementation. Thus, commission fees and waiting periods are just two factors that 

must be considered before actually implementing this strategy.

This code was written with my own psychological preferences, and the purpose of doing this will 

be included later in the paper. To briefly explain, a trader’s adversity to risk, and his/her propensity to 

invest and trade money, will be an important factor in how they decide to conduct trades. 

1.4. Conclusions

Through these analytical techniques, it was found that creating automated trading systems is a profitable 

venture, as using scientific methods to build and optimize trading algorithms can vastly improve results 

relative to solely relying on traditional methods such as chart reading.


Comments