Trading Objective Functions

Maximize ReturnOnAccount*EquityCurveCorrelation ‘ This objective function maximizes the Return on Account multiplied by the Equity Curve Correlation. In simpler terms, it is a measure of the total return multiplied by the smoothness of the equity curve. The closer the equity curve is to a straight line up, the closer the correlation will be to 1.0. The closer the equity curve is to a straight line down, the closer the correlation will be to -1.0. If the equity curve is all over the place with no particular trend, the correlation will be 0.0. If the equity curve is upward, but is rather jagged with lots of drawdowns, the correlation will be closer to 0 than to 1. The goal of the objective function is to find a profitable set of trades which produce a smooth upward sloping equity curve over the backtest period.
Maximize Return on Trades – This objective function maximizes the cumulative sum of all returns for each trade (including any open profit/loss on the last day of the backtest). For long trades, Return on Trade = 100 * (exit price – entry price) / (entry price). For short trades, Return on Trade = 100 * (entry price – exit price) / (entry price). For more explanation refer to Return on Account vs. Return on Trades.

Maximize Return on Account – This objective function maximizes the net profit relative to the account size required to trade over the backtest (including any open profit/loss on the last day of the backtest). Return on Account = 100 * (Net Profit) / (Account Size Required). For more explanation refer to Return on Account vs. Return on Trades.
Maximize #Winners – #Losers – This objective function maximizes the number of Winning trades minus the number of Losing Trades.
Maximize Net Profit – This objective function maximizes the net profit. Net profit is the total amount that you made over the specified period.
Maximize (#Winners – #Losers) * Profit – This objective function maximizes the number of Winning trades minus the number of Losing Trades multiplied by the profit. This objective function gives more weight to a set of trades that is more profitable, than a set of trades with many small winners.
Minimize Max Drawdown – This objective function minimizes the Maximum Drawdown, where Drawdown is the difference between the highest prior closed net profit and the current open net profit (Drawdown = (Largest Net Profit prior to trade entry) ‘ (Net Profit prior to trade entry) + (Open Trade Drawdown)). This objective function tries to minimize any closed loss that you may incur.
Maximize #Winners / #Losers – This objective function maximizes the number of Winning trades divided by the number of Losing Trades. Note that in the case where there are zero Losers, the calculation is #Winners / 0.5, because it is not possible to divide by zero.
Maximize (#Winners / #Losers) * Profit – This objective function maximizes the number of Winning trades divided by the number of Losing Trades multiplied by the profit. This objective function gives more weight to a set of trades that is more profitable, than a set of trades with many small winners.
Maximize Average Bar Profit – This objective function maximizes the average bar profit. The Average Bar Profit is the Net profit that the specified system makes over the entire period divided by the number of bars traded. This objective tries to maximize your net profit and minimize your market exposure. With this objective, a system with one or two short profitable trades will do better than a system with one or two long trades.
Maximize Ratio Gross Profit / Loss – This objective function maximizes the ratio of gross profit to gross loss. The less gross loss and more gross profit that a system has the higher this ratio will be.
Maximize Sharpe Ratio by Trade ‘ This objective function maximizes the ratio of the average trade return to the standard deviation of trade returns. The goal of this objective function is to find trading rules which have high returns, but also low standard deviation of returns over the backtest period. Note that the actual Sharpe Ratio is calculated by using the average monthly returns minus a non-risk return divided by the standard deviation of the monthly returns. Instead of using monthly returns, the NeuroShell Trader uses by trade returns so that the ratio can be applied to data sets less than a month long. In addition, the non-risk return has been excluded because the non-risk return remains constant for all optimization iterations and does not alter the optimization results.
Maximize Ratio Net Profit / StndDev Profit ‘ This objective function maximizes the ratio of the Net Profit multiplied to the Standard Deviation of each trades profit. The goal of this objective function is to find trading rules which have a high net profit, but a low standard deviation of profits over the backtest period.
Maximize Ratio Net*Avg Profit / StndDev Profit ‘ This objective function maximizes the ratio of the Net Profit multiplied by Average Profit per Trade to the Standard Deviation of each trades profit. The average trade profit is the average of the profit calculated for each trade. The Standard Deviation of Profit is the standard deviation of the profit calculated for each trade. The goal of this objective function is to find trading rules which have a high net profit, and high average profit, but a low standard deviation of profits over the backtest period.
Maximize Ratio Net Profit / Max Drawdown – This objective function maximizes the ratio of Net Profit to Max Drawdown. The goal of this objective function is to find trading rules which have a high net profit, but have a small total drawdown over the backtest period.

Minimize Max Open Trade Drawdown – This objective function minimizes the Maximum Open Drawdown, where Open Drawdown is the difference between the entry price and the worst price multiplied by the number of shares traded (Open Drawdown = (shares traded) * [(entry price) ‘ (worst price during the trade)]). This objective function tries to minimize any paper loss that you may incur across the backtest period.
Maximize Average Trade Profit – This objective function maximizes the average trade profit. The average trade profit is the average of the profit calculated for each trade. The goal of this objective function is to find trading rules which trade the most profitable trades over the backtest period.
Maximize Percent Profitable Trades – This objective function maximizes the percent of profitable trades. This is equivalent to the # Winning Trades / Total # of trades.
Maximize CCM Ratio – This objective function maximizes the CCM Ratio, which is defined as (e ^ (NaturalLog(Cumulative Return) / # Bars )) / Sqrt ( Avg ( Squared Daily Drawdowns ) ).
Maximize CCM Ratio (Position Only) – This objective function maximizes the CCM Ratio, which is defined as (e ^ (NaturalLog(Cumulative Return) / # Bars in Position )) / Sqrt ( Avg ( Squared Daily Drawdowns ) ). It is similar to the CCM, except it is computed only on bars with an active trading position.
Maximize ReturnOnAccount*LogEquityCurveCorrelation – The same basic calculation as the Maximize ReturnOnAccount*EquityCurveCorrelation objective function, except that it adapts to whether or not the equity curve is more linear or more exponential. It does this by calculating the correlation on both the equity curve and the log of the equity curve and then using the larger correlation number in its calculation. This is done to better accommodate position sizing methods like optimal-f and percent of account whose equity curves tend to grow exponentially and for which an exponential line fit is more appropriate than a linear fit like the fixed share and fixed dollar sizing methods whose equity curves tend to be more linear.

Maximize Expectancy – Expectancy provides a measure of a systems reward to risk ratio and is calculated as the Average Trade Profit divided by the Average Losing Trade Loss.
Maximize K-Ratio – The K-Ratio provides a measure of the performance and stability of the equity curve. The formula for K-Ratio is Slope of the Equity Curve Linear Regression / (Standard Error of Equity Curve Regression Line * Number of bars traded)
Maximize Compounded Annual Growth Rate – Compounded Annual Growth Rate is the annual percentage rate growth of the account from the beginning account balance to the ending account balance.
Maximize Mar Ratio – Mar Ratio is the Compounded Annual Growth Rate divided by the largest percent drawdown as measured from an equity high to a subsequent equity low.
Minimize Ulcer Index – A measure of downside volatility. The Ulcer Index is computed as the square root of the sum of squares of the percent drawdowns at each bar in the equity curve.
Maximize Ulcer Performance Index – The Ulcer Performance Index adds a performance measure to the Ulcer Index and is computed as the Average Yearly Return on Account divided by the Ulcer Index.
Minimize Lake Ratio – Provides a measure of the duration and size of drawdowns relative to the account equity. It is computed as the sum of the last account equity high minus current account equity at each bar traded divided by the sum of the current account equity at each bar traded. The Lake Ratio can be visualized by thinking of the equity curve as peaks and valleys with all the valleys filled in with water up to the level of the previous highest peak. Using this visualization, the Lake Ratio is then simply the ratio of the volume of water above the equity curve divided by the volume of earth beneath the equity curve.
Maximize Lake Ratio Performance Index – Adds a performance measure to the Lake Ratio and is computed as the Average Yearly Return on Account multiplied by the Lake Ratio.
Maximize Regressed Annual Return – The Regressed Annual Return is similar to the Compounded Annual Growth Rate, but is more resistant to changes in the start and end dates. It is computed as the annual percentage rate growth of the equity curve’s linear regression line.
Maximize Robust Sharpe Ratio – The Robust Sharpe Ratio is more resistant to changes in the start and end dates than the Sharpe Ratio. It is computed as the Regressed Annual Return divided by the standard deviation of trade returns.
Maximize Net Profit minus Drawdown – Provides a means of filtering out strategies that were profitable, despite a very large drawdown larger than the final profit. It is calculated by subtracting the Max Open Trade Drawdown from the Net Profit.
Maximize Percent Profitable Days – Percent Profitable Days is simply 100 multiplied by the number of profitable days divided by the number of days traded.
Maximize Return * %Profitable Days – Adds a performance measure to Percent Profitable Days and is computed as the Average Yearly Return on Account multiplied by the Percent Profitable Days.
Maximize Return * Equity Correlation * %Profitable Days – Adds both a performance and consistency of performance component to Percent Profitable Days and is computed as the Average Yearly Return on Account multiplied by the Equity Curve Correlation multiplied by the Percent Profitable Days.

Note:

  • When calculating entry and exit prices during Trading Strategy optimization commissions and slippage are taken into account.

Was this article helpful?

Related Articles