Optimization Fitness Metrics
<< Click to Display Table of Contents >> Optimization Fitness Metrics |
Optimization fitness metrics are used as the targets of optimization tests to determine the optimal mix of strategy parameter values. Below is a list of all pre-loaded optimization fitness metrics and their definitions. Custom optimization fitness metrics can be developed via NinjaScript, as well.
Understanding Max % Profitable
Max % ProfitableThis metric represents the percentage of profitable trades compared to the total number of trades placed in an iteration.
Number of winning trades / Total number of trades |
Understanding Max Avg. Favorable Excursion
Max Average Favorable ExcursionThis metric represents the average maximum run-up in profit during an iteration.
See the "Percent" formula for Average MFE on the Performance Statistics page. |
Max Avg. ProfitThis metric represents the average profit of all trades in an iteration.
See the "Percent" formula for Average Trade on the Performance Statistics page. |
Max Net ProfitThis metric represents the net profit achieved for all trades of an iteration. Total gross profit / Total gross loss |
Understanding Max Profit Factor
Max Profit FactorThis metric provides a ratio of total earnings to total loss in an iteration. See the Profit Factor formula on the Statistics Definitions page. |
Understanding Max R Squared (R^2)
R Squared (R^2)Sometimes called the Coefficient of Determination, this metric measures how closely an iteration's results come to a fitted regression line. ((Total Trades * (Summation of Trades * Summation of Profit)) - (Summation of Trades * Summation of Profit) / SQRT((Total Trades * Total Summation of Trades ^ 2 - Summation of Trades ^ 2) * (Total Trades * Total Summation of Profit ^ 2 - Total Profit ^ 2))) ^ 2 |
Understanding Max Sharpe Ratio
Max Sharpe RatioThis metric calculates risk-adjusted return. (% Profit per month - risk free return) / monthly std. deviation |
Understanding Max Sortino Ratio
Max Sortino RatioThis metric modifies the Sharpe ratio by taking the standard deviation of negative returns into account to differentiate harmful volatility from general volatility.
(% Profit per month - risk free return) / monthly Ulcer Index |
Max Ulcer RatioThis metric measures downside risk, with values increasing as the market price moves farther from a recent high. See the Ulcer Index formula on the Statistics Definitions page. |
Understanding Max Win/Loss Ratio
Max Win/Loss RatioThis metric presents a ratio of the profit of winning trades to the loss of losing trades. % average profit of winning trades / absolute value of % percentage average loss |
Understanding Minimum Avg. Adverse Excursion
Minimum Avg. Adverse ExcursionThis metric represents the average run-down of trades in an iteration.
See the "Percent" formula for Maximum Adverse Excursion on the Statistics Definitions page Min Avg. Adverse Excursion finds the lowest value from the Maximum Adverse Excursion statistic |
Minimum DrawdownThis fitness metric represents the smallest decrease (draw-down) in account size experienced from the highest high seen in each trade, and is used to find the iteration with the lowest draw-down.
See the Maximum Drawdown formula on the Statistics Definitions page Min Drawdown = the smallest single drawdown |
Max Strength (Work in progress, implementation could possibly change in the future)This fitness metric finds the 'steadiest' strategy represented by the highest linear regression slope of the equity curve. It favors strategies with as many profitable trades as possible while keeping draw-downs as small as possible. |