In the first installment of this series, we introduced a random entry system that based its entries on a virtual coin flip (see “Guide to trading system development,” September 2012). The base system was backtested across four years of euro forex data to gather trade data for statistical analysis. As we saw, the base system was unprofitable. In mathematical terms, the base system has a negative expectancy of -0.81.

Expectancy is an important metric. It is the amount you can expect to win or lose for every dollar risked. It is calculated with the following formula:

**(Winning percentage x Average win) – (Losing percentage x Average loss) **

That is, the system loses 81¢ for every dollar risked. The astute reader likely recognized this aspect of the system as a stumbling block that often trips up the beginning system trader: It is unlikely, if not impossible, that a system with a negative expectancy can be made profitable through trade management. As it turns out, this system is unprofitable regardless of any stop loss or profit target that may be added.

This does not mean the system necessarily should be discarded. It often is the case that, though the first version fails, an adjustment to some aspect of it may result in a profitable system. In this case, there is another parameter of our demonstration system that can be adjusted: The entry time.

The 8 a.m. (EST) entry was chosen arbitrarily. This may be the critical variable that can salvage our model and allow system development to proceed. Indeed, this turns out to be the case. A simple optimization of the entry time (stepping from 3 a.m., EST, the London open, through 8 a.m., EST, in one-hour increments) creates a profitable system. When backtested across the same data, an entry time of 4 a.m. produces a net profit of $2,853. Expectancy is a positive 2.75. Now we can apply trade management techniques to see if we can improve the results.

#### About the Author

Neil Rosenthal is a retired dentist who trades his own account. He also is an experienced computer programmer. He can be reached at rightedgetrading@gmx.com.