Robot Trader


Ducati 748 Panigale-Likely the fasted machine on Toronto Streets.


The objective of the TradeWatch system was to identify trading opportunities on the NASDAQ, New York and Toronto Stock Exchanges.

The system used a signal processing technique consisting of:

  1. The signal line
    Moving price average computed over a short interval such as 10 days.
  2. The trend line
    Moving average. The trend moving average is computed over a longer period such as 25 days.
  3. Signal to Noise Ratio.
    Computed as S/N Ratio = LOG10(SignalLine/TrendLine). Ratio became larger on strongly trending stocks and negative for declining prices. Value represents the force in decibels acting on the stock price up or down. The system fails in the case of stocks with no momentum.
  4. Band Pass Filter
    Used to determine which values of S/N ratio signaled a change in sentiment from bullish to bearish and when the S/N Ratio were at or beyond extreme values.
  5. Optimization
    The optimizer computed the optimal values for 20+ parameters such as the Signal Line and Trend Line moving average intervals or the maximum number of days a trade could stay in the market.
  6. Trade Evaluation
    The system cycled between long and short trades. There were only three loosing securities out of 60 tracked.
Table 1: Profit By Security - Nov 2011 to May 2017
Table 1: Profit By Security – Nov 2011 to May 2017

The system gross profit of $689.149 between Nov 2011 and Mar 2017 which represents a gross margin of 40% before the cost of brokerage commissions are factored in.

Table 2: System Performance - Nov 2011 to May 2017
Table 2: System Performance – Nov 2011 to May 2017

The system would typically open a trade and quickly close it the following trading day if it proved to be a losing trade. Hence the reason for a large number of loosing trades.   The value of the winning trades more than compensated the losses.

Given the cost of holding 100 shares of Amazon, Google or Apple, the trader would end up either taking fractional positions or purchasing call or put options.

Another issue was the time required to run the optimizer. It used a brut force approach to calculating the trading parameters. It could take close to one hour per security to run.  It was hence impossible to evaluate all securities before being optimized or changing the algorithm to one that optimized each security  in parallel.

The system used daily prices obtained from Yahoo. After Verizon acquired Yahoo, the free quote feed stopped in May of 2017. The future options were:

  1. Pay for end of data from (Cost US$34.95 per month)
  2. Use the tools which provided similar functions at (Cost US$30 per month)

The choice, for the time being, is to use and abandon further development on the TradeWatch user interface.

I am proud that I was able to develop a system that profitably beats the market.