This tab is at the top-middle area of the Backtest Strategy page, and it shows the performance of a strategy in various statistical data. So instead of eyeballing the graph on the Chart Tab, here you get the detailed scientific stats of your strategy.
This tab is only populated once the strategy is backtested (by clicking the “Start” button ).
By understanding the strategy's performance, you'll be confident putting your hard-earned money on the line. You may also realize some areas that are still lacking. But most importantly, you won't be surprised by any losses it will eventually make. Any strategy will experience losses, the question is whether such losses is within your risk tolerance. That is why, the very first things you must look here are the drawdown metrics (later explained).
This tab is divided into six columns:
1. Name: shows the name of each metric, such as the strategy's total Score, CAGR, Maximum Drawdown, Sharpe Ratio, etc.
2. All Sample: shows each metric's performance during the entire backtest period (in-sample and out-of-sample periods together).
3. In Sample: shows each metric's performance during the in-sample period. Note, if you set the “In Sample Periods” parameter to 100% (on the Backtest Panel), this column shows the exact same values as the “All Sample” column.
4. Out of Sample: shows each metric's performance during the out-of-sample period.
5. Efficiency (%): shows how consistent the metric's performance is, throughout the entire backtest periods. This percentage is the result of dividing the out-of-sample performance by the in-sample performance. This is probably the most valuable report on your strategy, especially if you used multiple in-sample periods on your backtest.
The Efficiency value says a lot about the strategy's real life performance. If it weathered various market conditions with consistent performance, you could be sure its real life performance will be similar. Generally you want this as close to 100% as possible, anything much higher or much lower may signify nasty surprises (or tasty, who knows). Note, tweaking the property “Total In Sample Ratio” (on the Backtest Panel), will immediately change the values on the “In Sample”, “Out of Sample”, and “Efficiency” columns here. You don't need to run the backtest again for that.
6. Benchmark: shows the benchmark's (for example S&P 500 index) metrics performance.
Now, let's dig into each metric listed there:
1. Score: This is the overall score of your strategy, amalgamated from some risk and return metrics. So it's a good measure of the overall performance. Higher number is preferable.
2. Current Drawdown (%): This is the drawdown that's currently underway (if there's any).
Drawdown is the fall of the investment value from the last highest peak, and a drawdown continues to exist as long as a new highest peak has not been reached (a peak whose height is equal or higher than the last highest peak).
This value is stated in percentage of the total investment value (including previous losses and profits). For example, the total investment peaked at $120,000 before experiencing a 5% drawdown; that means $6000 has been lost since the beginning of the drawdown.
This current drawdown is affected by the backtest's end-date (set on the “Date To” parameter at the Backtest Panel). That is, if at the end-date the strategy doesn't experience a drawdown, this metric will show 0%. But if it experiences a drawdown at the end-date, this metric will show something greater than 0%. Obviously lower value for drawdown is better.
3. Current Drawdown (days): This shows the duration of the current drawdown (up until today, or the end-date).
A drawdown will not end until a peak that is equal (or higher) than the last highest peak is reached. So if the equity curve is making a new peak but it's still lower than the last highest peak, then the drawdown still exists.
But do understand: since following a strategy entails active trading (buying and selling the instruments) instead of holding indefinitely, when a drawdown occurs your buying power might be reduced (after the losses are realized). Hence next time you entered the new positions, your portfolio size will smaller than the pre-drawdown size. Thus gains will be less, and it'll take longer to achieve breakeven. You may work around this problem by utilizing margin accounts (where you borrow from your broker to make up for the realized loss). But margin trading entails its own danger (leveraging goes both ways).
4. Max Drawdown (%): This is the deepest drawdown that the strategy experienced during the specified period (in-sample, out-of-sample, or all-sample). Lower value is better for this metric.
Max Drawdown is one of the most important metrics you should look upon early. Put it this way: most strategies will gain money no matter how slow or fast. But losing money can be devastating. Add to the fact that your buying power is reduced (as explained earlier), it may take a long time to get out of the hole. So instead of ogling the CAGR, you should first understand the strategy's risks as shown by Max Drawdown (and Avg. Drawdown) metrics. And make sure they have good “Efficiency” value as stated earlier. In comparison, the S&P 500 index has a maximum drawdown of around 50%, and that's a buy and forget approach. Ask yourself, are you willing to lose half of your account balance during nasty times?
Now, the strategy's Max Drawdown (not the benchmark) is shown on the “Chart” Tab as the red-highlighted area.
5. Avg. Drawdown (%): This is the average depth of the various drawdowns during the specified period (in-sample, out-of-sample, or all-sample). Lower value is better.
You must be sure the strategy can get you out in time before much of your account is eaten.
6. Max Drawdown (days): This is the duration, in days, of the Maximum Drawdown. The duration is not from peak to trough, but to another new peak. Lower value is better.
7. Avg. Drawdown (days): This shows the average duration of the drawdowns, for the specified period (in-sample, out-of-sample, or all-sample). Lower value is better.
8. CAGR (%): This shows the Compound Annual Growth Rate for the specified period. That is, the average yearly growth rate of your investment, compounding from the previous year's losses & gain.
Do understand that all metrics here, including CAGR, disregards the fact that you may add/subtract your account balance, throughout the course of following the strategy (to buy that new sailing boat, for example). So they are the pure, theoretical statistics; and CAGR is an excellent metric to compare returns between strategies. Higher value is better.
For example, a CAGR of 20% on an initial capital of $1000 means:
Obviously, since CAGR is just an average, it doesn't reflect the “real” investment value year by year; some years may experience losses while other years gained much higher than the CAGR.
9. CAGR/√Avg. DD Ratio: This tells you the strategy's return adjusted by the risks (drawdowns). It simply divides CAGR by the square root of the Average Drawdown. A higher value lets you sleep better.
10. R² (%): R-squared tells you how close to a straight line–on a log scale–the strategy's equity curve is. A value of 100% would be a perfectly straight line, which means your strategy performs perfectly consistent.
A low value indicates more volatility on your strategy's performance. Obviously, you want a strategy that performs more or less consistently, without any big surprises.
11. MAR Ratio: MAR tells you the risk-adjusted growth rate of the strategy. So, while CAGR only tells you of the absolute growth rate, MAR can tell you of that growth rate adjusted by the greatest drawdown.
It's calculated from dividing the CAGR by the Max Drawdown. A low MAR value tells you of the great drawdowns that you may experience. Generally, a value greater than 1.0 is preferable, which means CAGR can outweigh the possible big drawdown in the future.
But keep in mind, for MAR to be useful, the strategy and the benchmark (or another strategy you're comparing against) must be backtested in generally the same period (or the same backtest length).
12. Sharpe Ratio: This is another risk-adjusted growth rate of the strategy. Sharpe Ratio takes the risk-free profit out of the equation, so you can see better whether profit is due to excess risk. A higher value on Sharpe Ratio is better.
Higher Sharpe Ratio may mean the strategy's portfolios are well diversified, thus decreasing the risk without sacrificing return too much. Lower Sharpe Ratio may mean you're too conservative, since the risk-free profit is greater, thus your total return is expected to be lower. But it could also mean you're too aggressive since the risk is higher, thus your return may be expected to be low or even a loss. In essence, low Sharpe ratio tells you that you're either indulging in excess risk or being too conservative; a double edged sword for you.
A value greater than 1.0 is considered good (2.0 or 3.0 are excellent). Below 1.0 (or even negative) is not preferable.
13. Profit Factor: This is the profitability factor of the strategy. Any values greater than 1 indicate a profitable strategy.
It's based from the ratio between winning positions' gains and losing positions' losses. So for example, a ratio of 5 means: for every unit of loss, you gained 5 (which is quite attractive).
14. Total Trades/Rule Count: This shows the usefulness of the strategy's rules; whether they sat idle, or generated quite a few trading signals during the specified period.
It's calculated from dividing the Total Trades metric (all the buy and sell signals combined) by the number of rules your strategy has (all the buy, ranking, and sell filters combined). For example if it shows a value of 200, each rule roughly yields 200 signals.
15. Total Trades/Cyber Code Expression Count: This metric shows the usefulness of the Cyber Code expressions (blocks).
It's calculated from dividing the Total Trades metric by the amount of expressions (blocks) contained in the strategy's Cyber Code rules. For example a value of 800 means each expression is responsible for roughly 800 trades.
This metric is primarily used as a Fitness Function, to prevent introns (code bloat) during the Cyber Code evolution. The metric doesn't show up if the strategy contains no Cyber Code rule.
16. Total Return (%): This tells you the total compounded gain by the end of the period, in percent of the initial capital.
This is what you see on Chart Tab‘s equity curve.
17. Total Amount: This tells you, in dollar amount, the total compounded gain by the end of the period. In other words, it's the money you'll earn if you use the strategy for the same period.
This metric doesn't show if the “Initial Amount” parameter (on the Backtest Panel) is at 0.
18. Total Trades: This shows the amount of trades (the sum of all buy and sell signals) during the specified period.
It includes switch-day and stop-loss trades.
19. Total Positions: This is the amount of positions entered during the specified IS, OOS, or AS period.
Obviously, this is about half the amount of buy & sell signals generated.
20. Avg. Position Gain (%): This is the average gain (or loss) of all positions during the specified period.
It's shown in percent of the position's entry value. Note, the benchmark column is not populated, simply because a benchmark is a buy-and-forget approach (just 1 position for the entire period).
21. Avg. Position Duration (Days): This is how long the positions were held, on average.
That is, the average duration between entering a position and exiting it. It could be useful in determining the timeframe of the strategy (short-term active trading, or longer-term).
22. Avg. Trades per Year: This is the average number of trades (buy and sell) done in a year.
This metric is useful as a Fitness Function, to control the amount of trades potentially executed by the strategy. Too many trades and you'll suffer considerable slippage and commissions. Too few and you can't capitalize on short term fluctuations.
23. Avg. Price: This is the average entry price for the positions.
With this metric, you'll see whether the strategy likes to enter penny stock positions, for example (which are usually illiquid and highly manipulated). But the main purpose is to use it as a Fitness Function, so that the strategies created by the Divine Engine are not overfit to the past based on hindsight.
For example in a portfolio of cap-weighted index (such as the S&P 500), it's easy to fall into the trap of picking low priced instruments, knowing they'd eventually boost in price and be part of the vaunted index.
24. Winning Positions (%): This shows the number of profitable positions the strategy entered, in percentage of the total positions (during the specified period).
This metric could also describe the winning-rate of the strategy.
25. Winning Years (%): This tells you the number of profitable years the strategy produced, in percentage of the total years (during the specified IS, OOS, or AS period).
For example, a value of 80% could indicate the strategy was profitable 8 years out of every 10 years.
26. Winning Months (%): This tells you the number of profitable months the strategy produced, in percentage of the total months (during the specified period).
This and the previous metric (Winning Years) can be useful to determine the time-risk associated with the strategy (as opposed to the usual value-risk).