Monday, July 12, 2010

Stock algorithms

Ran stock algorithm comparison for the first 2 algorithms created (listed yesterday):

Algorithm Summary
Algorithm Name - Filter Start End Gain/Loss Currently Invested Total owned and invested
Simple Algorithm 1 - First 10 stocks 2010-04-27 09:00:00 2010-06-05 16:00:00 -11.82 0 838.18 [25 buys and 25 sells]
Simple Algorithm 2 - First 10 stocks 2010-04-27 09:00:00 2010-06-05 16:00:00 -29.55 93.42 943.45 [5 buys and 4 sells]
Simple Algorithm 1 - Second 10 stocks 2010-04-27 09:00:00 2010-06-05 16:00:00 -46.19 760.85 779.81 [30 buys and 28 sells]
Simple Algorithm 2 - Second 10 stocks 2010-04-27 09:00:00 2010-06-05 16:00:00 -18.38 0 939.62 [7 buys and 7 sells]
Simple Algorithm 1 - Third 10 stocks 2010-04-27 09:00:00 2010-06-05 16:00:00 109.90 382.40 992.90 [20 buys and 19 sells]
Simple Algorithm 2 - Third 10 stocks 2010-04-27 09:00:00 2010-06-05 16:00:00 -81.82 206 855.18 [11 buys and 10 sells]
Simple Algorithm 1 - Fourth 10 stocks 2010-04-27 09:00:00 2010-06-05 16:00:00 74.02 0 954.02 [20 buys and 20 sells]
Simple Algorithm 2 - Fourth 10 stocks 2010-04-27 09:00:00 2010-06-05 16:00:00 -20.96 173 874.04 [18 buys and 17 sells]

Totals for Algorithm 1

  • Gained $125.91
  • Made 95 buys and 92 sells (187 transactions worth $561)
  • Total lost was $435.09
Totals for Algorithm 2
  • Lost $150.71
  • Made 41 buys and 38 sells (79 transactions worth $237)
  • Total lost was $387.71
Summary is that algorithm one made a lot more money (actually made money) but the amount of transactions to get to this point ended up way offsetting any profit.  Algorithm two lost money, but due to making twice as few transactions, the total amount of money lost is lower.

Lesson learned: optimized algorithm one to cut down on the amount of transactions.  Algorithm two seems to be a lost cause.

No comments:

Labels