Definitions

This section provides definitions and formulas of the various statistics calculated in the reports. The definitions are presented in the order that they appear in the reports.

Trade Statistics

This category displays statistics related to the number of trades executed, such as the following typical output:

Number of Trades                           12.00 
Number of Closed Trades                    12.00 
Number of Winning Trades                    5.00 
Percentage of Winning Trades               41.67 
Max Consecutive Winning Trades              3.00 
Avg Consecutive Winning Trades              1.67 
Percent New Equity High Trades             33.33 
Number of Losing Trades                     7.00 
Percentage of Losing Trades                58.33 
Max Consecutive Losing Trades               6.00 
Avg Consecutive Losing Trades               3.50 
Percent New Equity Low Trades               0.00  

Number of Trades: The number of trades that were entered by the trading system.

Number of Closed Trades: The number of trades that were closed by the trading system.

Number of Winning Trades: The number of closed trades that were profitable.

Percentage of Winning Trades: The percentage of closed trades that was profitable. It is given by the formula:

( Number of Winning Trades / Number of Trades ) * 100

Maximum Consecutive Winning Trades: The maximum number of consecutive, profitable trades. Trades are considered to be consecutive if their entry dates are consecutive; that is, no trade was entered between them. It is however, possible that one or more trades exited in between. In this example, the maximum number of consecutive winning trades (“winning streak”) lasted for three trades.

Average Consecutive Winning Trades: The average number of trades that make up the consecutive, profitable trades (i.e., The average number of trades in a "winning streak"). This statistic is found by counting the number of winning trades and dividing this number by the number of different winning streaks.

As per the P&L trades in this example, there are 5 total winning (profitable) trades, and 3 different winning streaks (a 1 day trade is considered a streak). T the average consecutive winning trades (“winning streak”) lasts for 1.67 trades.

Percent New Equity High Trades: The percentage of trades that result in a new record high equity for the trading system. This statistic is found by considering the difference of the Open and Close of the first day of the trade. If the Close minus the Open of the first day of trade is higher than that of previous trades, then a new record high is created. The formula for the Percent New Equity High Trades is as follows:

( Number of New Highs / Number of Trades ) * 100

In this example, 33.33 percent of the 12 trades created new record high equities.

Number of Losing Trades: The number of non-profitable closed trades. This includes "flat" (i.e., No profit or loss) trades.

Percentage of Losing Trades: The percentage of closed trades that was not profitable. It is given by the formula:

( Number of Losing Trades / Number of Trades ) * 100

Maximum Consecutive Losing Trades: The maximum number of consecutive, non-profitable trades. In this example, the maximum number of consecutive losing trades lasted for six trades.

Average Consecutive Losing Trades: The average number of trades that make up the consecutive, non-profitable trades. The average number of trades in a "losing streak". This statistic is found by counting the number of losing trades and dividing this number by the number of different losing streaks.

As per the P&L trades in this example, there are 7 total losing (non-profitable) trades, and 2 different losing streaks. The average consecutive losing trades (“losing streak”) lasts for 3.5 trades.

Percent New Equity Low Trades: The percentage of trades that result in a new record low equity for the trading system. This statistic is found by considering the difference of the Open and Close of the first day of the trade. If the Close minus the Open of the first day of trade is lower than that of previous trades, then a new record low is created. The formula for the Percent New Equity Low Trades is as follows:

( Number of New Lows / Number of Trades ) * 100

In this example, 0 percent of the 12 trades created new record low equities, since none of the trades created a new low.

Period Statistics

This category presents statistics related to the number of periods executed (e.g., number of weeks, months, etc). By default, this category is not displayed. To include the Period Statistics, select Options>Execute Options from the menu bar, then select the Order tab. In the Report Statistics pane select Period Statistics from the drop-down menu. Check the box for Activate Trade Statistics to activate the Period Statistics. The following is a sample output:

Number of Periods                         241.00 
Number of Winning Periods                  61.00 
Number of Losing Periods                   69.00 
Percentage of Winning Periods              25.31 
Percentage of Losing Periods               28.63 
Max Consecutive Winning Periods             6.00 
Max Consecutive Losing Periods              4.00 
Avg Consecutive Winning Periods             1.85 
Avg Consecutive Losing Periods              1.92 
Percentage of Periods Invested             53.94 

Number of Periods : The number of periods that were analyzed by the P/L system. This is a function of the available data, not necessarily of the P/L query itself. The units (e.g., days, months, years) used in this section can be set in the Units field. For example, if you set the units to 1 month, a period will be one month. You can set (hard code) the time frame by setting the Execution Range. To do that, go to Option>Execute, then select the Report tab, in the Execution Range pane, type in the Begin and End Dates you wish to limit the number of periods to.

Number of Winning Periods: The number of profitable periods analyzed by the P/L system.

Percent of Winning Periods: The percentage of profitable periods analyzed by the P/L system.

Maximum Consecutive Winning Periods: The maximum number of consecutive, profitable periods; that is, the length of the largest "winning streak".

Average Consecutive Winning Periods: The average number of consecutive, profitable periods; that is, the length of an average "winning streak".

Number of Losing Periods: The number of non-profitable periods analyzed by the P/L system.

Percent of Losing Periods: The percentage of non-profitable periods analyzed by the P/L system.

Maximum Consecutive Losing Periods: The maximum number of consecutive, non-profitable periods: that is, the length of the largest "losing streak."

Average Consecutive Losing Periods: The average number of consecutive, non-profitable periods; that is, the length of an average "losing streak".

Percent of Periods Invested: In a designated trading time period, this is the percentage of time the system is in a trade.

Length Statistics

This category displays statistics concerning the average length of trades entered by the system.

Average Trade Length                        9.83 
Average Winning Trade Length               19.80 
Average Losing Trade Length                 2.71 

Average Length of Trade: The average length of a trade; that is, the average number of "units" that the trade was open, where the desired "units" can be set by the user. This statistic is found by adding the total number of units (i.e., days) of the trade and dividing this number by the number of trades. The total number of units, if days, excludes weekends, but includes NaN values. In this example, we had 12 trades lasting a total of 118 days; therefore, making the average trade 9.83 days long.

Average Length of Winning Trade: The average length in "units" of the profitable trades, where the desired "units" can be set by the user. This statistic is found by adding the total number of units (i.e., days) of the winning trades and dividing this number by the number of winning trades. In this example, we had 5 winning trades lasting a total of 99 days; therefore, making the average winning trade 19.80 days long.

Average Length of Losing Trade: The average length in "units" of the non-profitable trades, where the desired "units" can be set by the user. This statistic is found by adding the total number of units (i.e., days) of the losing trades and dividing this number by the number of losing trades. In this example, we had 7 losing trades lasting a total of 19 days; therefore, making the average losing trade 2.71 days long.

Contract Statistics

This category presents statistics concerning the contracts traded by the system. The following is a sample output:

Total Number of Contracts                 120.00 
Maximum Number of Contracts                10.00   10/04/2001

Number of Contracts: The total number of contracts bought or sold by the system for all trades. It includes contracts purchased automatically by XMIM (for example, automatic purchases due to contract expiration).

Maximum Contracts at One Time: The maximum number of contracts held at any one time, including those purchased automatically by XMIM (for example, due to contract expirations), and the date they were purchased on.

Average Period Statistics

This category displays statistics concerning the average rate of return per period. Unlike the other categories, the default "period" to use is "monthly," instead of that given by the execution units. The rationale for this is that average returns are usually too small to be noticed in, for example, daily units. Moreover, many of the statistics included (e.g., Sharpe ratio) are traditionally reported using monthly figures.

The default units on this section can be modified in the Execute Options window, in the Order tab under the Report Statistics pane. From the pull-down menu select Average Period Statistics.

The following is a sample output of the statistics in this category:

Average Return in Period                    0.81 
Compound Return in Period                   0.11 
Percentage of Periods at New High          41.67 
Standard Deviation of Period Returns        3.75 
Sharpe Ratio (est.)                         0.22 
ZStat                                       0.75 
Standard Error                             32.24 
Standard Error Ratio                        0.03 
Geometric Error Ratio                       0.07

Average Return in Period: This statistic prints the average percentage profit return per time unit, e.g., average return per year. It is given by the equation:

where ri is the percent return of the ith period and n is the number of periods in the study. That is, it is computed simply as the sum of each period's return, divided by the total number of periods in the study, where periods are represented as months. This is known as the arithmetic average return. If Begin and End dates are hard coded in the Execute options, the number of periods (n) is dependent upon those dates. If the default is used (no begin and end dates specified), then the number of periods (n) is dependent upon the first data day to last data day of the series.

Compound Return in Period: This statistic prints the average compounded percentage profit return per time unit, e.g., average return per month. It is given by the equation:

where ri is the percent return of the ith period, and n is the number of periods in the study. This is known as the geometric average return. This return will always be smaller than the arithmetic average.

Percent of Periods at New High: The percentage of periods that result in a new equity high record.

Standard Deviation of Period Returns: The standard deviation of the returns for each period. It uses "population" (i.e., n observations) , not "sample" (i.e., n-1 observations) standard deviation, so it is given by the formula:

where r is the average return over the periods, ri is the percent return of the ith period, and n is the number of periods in the study.

Sharpe Ratio (Estimate): This statistic prints an estimate of the Sharpe ratio of the period returns. This formula is an estimate of the Sharpe ratio because we do not subtract a risk free rate in the formula. Our estimate formula is given by:

where r is the (arithmetic) average return per period and r is the standard deviation of period returns. This shows the average return per unit of risk.

ZStat: This statistic provides the average return per period r divided by the standard deviation of the returns r multiplied by the square root of the number of periods in the study n1/2. This is the average return divided by the sampling distribution of the sampling mean (standard error of the mean).

The following explanation of ZStat, is from our Market History editor, Gibbons Burke: “One thing I look at a lot when I’m trying to determine if a query is worth publishing (i.e., is a good query), is the Zstat figure published along with all the other summary statistics in the query results. This is simply the average return divided by the standard deviation of returns – a simplified Sharpe ratio. The higher the absolute value of this number the better, because it shows the signal (return) to noise (variation on the return) ratio of the results. I like this number to be above 0.5, if possible. I don’t always get that, but it is a very good indicator of whether there is an 'edge' in the results, or not.”

Standard Error: This statistic prints an alternate measure of the deviation of the period returns. It measures the average squared distance between the actual period returns and an equivalent straight line fit. It is given by the formula:

where r is the average return per period, [ri] is the cumulative return including the ith period, and n is the number of periods in the study. This statistic is not the standard error of the mean (see previous ratio).

Standard Error Ratio: This statistic prints the ratio of the average monthly return to the standard error. It is given by the formula:

where r is the average return per period and r is the standard error.

Geometric Error Ratio: This statistic prints the geometric ratio of the Sharpe and standard error ratios. It is given by the formula:

where r is the Sharpe ratio estimate and r is the standard error ratio. When both quantities are negative, the result is also given a negative sign.

Average Trade Statistics

This category displays statistics concerning the average monetary profit per trade. The following is a sample output of the statistics in this category:

Average Profit in  Trade                    9.69 
Average Profit in  Winning Trade           43.40 
Average Profit in  Losing Trade            14.39 
Ratio Average                               3.02 
Profit Factor                               2.15 
Pessimistic Return                          0.86 
Performance Ratio                           0.20

Average Profit in Trade: This statistic prints the average monetary gain per period. For example a gain of 31.125 for a US (bond future) P&L system indicates a $31.125 average profit per trade.

This statistic is calculated by calculating the sum of the profit of all closed trades, and taking that sum and dividing by the total number of closed trades. The formula is as follows:

Where P is the profit (positive or negative) of a trade, and i is the number of the trade (the ith trade. In this example, the average profit per trade is $9.69.

Average Profit in Winning Trade: This statistic prints the average return (in $ terms like above) of the profitable trades. It is given by the formula:

Where PP is the profit of a winning trade, and i is the number of the trade (the ith trade. In this example, the average profit per winning trade is $43.40.

Average Profit in Losing Trade: This statistic prints the average return (in $ terms for US instruments like above) of the non-profitable trades. It is given by the formula:

Where PL is the profit of a losing trade, and i is the number of the trade (the ith trade. In this example, the average profit (loss) per winning trade is -$14.39.

Ratio Average: This statistic prints the ratio of the average profit per winning trade divided by the average profit per losing trade.

Profit Factor: This statistic prints the ratio of the winning profits to losing profits. It is given by the formula:

where nw and n1 denote the number of winning and losing trades, respectively, while w and 1 denote the average winning and losing profit.

Pessimistic Return: This statistic prints a more pessimistic version of the profit factor. It is given by the formula:

where nw and n1 denote the number of winning and losing trades, respectively, and w and 1 the average winning and losing profit, respectively.

Performance Ratio: This statistic, similar to the Sharpe ratio estimate, computes the average return per trade divided by the standard deviation of returns.

where P is the profit (positive or negative) of a trade, and i is the number of the trade (the i th trade). In this example, the Performance Ratio is 0.20.

Standard Deviation of Profit is different than the Standard Deviation of Profit Return statistic. To get Standard Deviation of Profit, you use the actual profits, rather than the profit return.

The standard deviation of the profit: It uses “population” (i.e., n observations), not “sample” (i.e., n-1 observations) standard deviation, so it is given by the formula:

where p is the average profit over the periods, i is the profit of the i th period, and n is the number of periods in the study.

Extremal Statistics

This category displays statistics about the most extreme positions in the P/L execution such as largest equity position or maximum drawdown. This section is unique in that it displays the date/time of the event as well as the value. The following is a sample output of the statistics in this category:

Biggest Win                               150.00   11/28/2001 
Biggest Loss                              -22.50   08/01/2002 
Maximum Drawdown                          147.10   08/01/2002 
Maximum Drawdown Per Trade                101.40   09/03/2002 
Maximum Open Loss in Winning Trade          0.10   10/09/2001 
Maximum Open Equity                      1256.00   01/04/2002 
Minimum Open Equity                         0.00   11/28/2001 
Maximum Closed Equity                     196.60   03/25/2002 
Minimum Closed Equity                   -1026.90   01/03/2002

Biggest Win: The closed trade with the largest profit and the date the trade was closed.

Biggest Loss: The closed trade with the largest loss and the date the trade was closed.

Greatest Loss in Winning Trade: The largest open loss for a winning trade.

Maximum Open Equity: The largest open equity of the P/L execution.

Minimum Open Equity: The smallest open equity of the P/L execution.

Maximum Closed Equity: The largest closed equity of the P/L execution.

Minimum Closed Equity: The smallest closed equity of the P/L execution.

Maximum Drawdown: At any given time in the P/L execution, the drawdown is the difference between the current equity and the largest equity seen so far. This statistic displays the maximum drawdown.

Maximum Drawdown Per Trade: The difference between the current equity and the largest equity per trade.

Final Statistics

This category displays the statistics concerning the equity position at the end of the P/L execution. The following is a sample output of the statistics in this category:

Final Equity                              116.30 
Final Open Equity                           0.00 
Final Closed Equity                       116.30 
Commission                                  0.00 
Slippage                                    0.00

Closed Equity: The final equity of all the closed trades.

Open Equity: The current equity of any trades left open at the end of the P/L study.

Equity: The current equity of all trades at the end of the P/L study.

Commission: The total commission entailed by the P/L execution. The commission amount for each trade can be specified in the Execute Options window, as a percentage, point, or dollar amount. This is calculated when trades are closed.

Slippage: The total slippage entailed by the P/L execution. The estimated slippage amount for each trade can be specified in the Execute Options window, as a percentage, point, or dollar amount. This is calculated when trades are closed.