Skip to content
GetProfitable
Search
Dictionary

Objective function

The single number an optimisation tries to maximise or minimise; the choice quietly decides what kind of strategy you end up with.

Optimise total return and you get a concentrated, high-leverage path. Optimise sharpe-ratio and you get something that hates volatility, including upside volatility. Optimise profit-factor and you can get a system with eleven trades. Optimise return divided by max-drawdown and you get something tuned to one historical drawdown that will not repeat.

Two habits help. Add a penalty for low trade counts, for example requiring at least 100 trades or scaling the score by the square root of the count. And optimise a blend, such as the median Sharpe across five data subsets minus a turnover penalty.

Write down what you would refuse to trade before you optimise. If a 60% annual return with a 45% drawdown is unacceptable, encode that as a constraint rather than discovering it afterwards.

Related: parameter-optimisation, sharpe-ratio

See it drawn

Original diagrams for the ideas on this page. Illustrative, not real market data.

An equity curve and its drawdownAn account balance rising over a year, falling from a peak to a trough, then climbing back to the old peak.ACCOUNT EQUITY$20k$12k$8k024681012TIME (MONTHS)PEAK $16,000TROUGH $12,000DRAWDOWN−25%RECOVERY
Equity curve and drawdown. An account balance plotted month by month. The fall from the $16,000 peak to the $12,000 trough is a 25% drawdown, and the shaded area lasts until the balance climbs back to the old peak.

Educational only, not advice. Spotted an error? Post in Site Feedback.