Trading Dev AcademyFree quant education

Free lesson · Optimization

Curvature and a bounded quadratic decision

Open interactive lessonPractice calculationsExplore labs

Start with the idea

A concave objective has diminishing benefit as the position grows, making a unique unconstrained peak easy to locate.

Symbols, units & horizon
  • w: dimensionless exposure at monthly rebalance
  • μ: expected monthly return fraction
  • a>0: monthly-return objective penalty per squared weight, often risk aversion times monthly return variance
  • ℓ,u: lower and upper exposure bounds
  • J: utility in monthly-return units
  • w*: constrained maximizer

When and why to use this

Use a scalar bounded problem as a transparent sizing baseline and solver sanity check.

A concave objective has diminishing benefit as the position grows, making a unique unconstrained peak easy to locate.

Expected return is an estimate; the quadratic penalty is a preference for controlling variance. Neither turns the chosen weight into a certainty. For a single asset, calculate the stationary point and then respect the feasible interval.

Because the objective is concave when the risk coefficient is positive, projecting its stationary point onto an interval gives the global maximum on that interval. This special rule does not justify clipping a many-asset optimizer with coupled constraints.

J(w)=μw−a2w2,w∗=min⁡(u,max⁡(ℓ,μa))
Concave optimization and calculus with interval constraints

Curvature and a bounded quadratic decision

  1. Differentiate J to obtain μ−aw; set it to zero to obtain μ/a.
  2. The second derivative is −a<0, proving strict concavity.
  3. If the peak lies outside [ℓ,u], monotonicity up to the peak makes the nearest feasible endpoint optimal.
Work it by hand

μ=.03, a=.1 gives unconstrained .3. With allowable interval [0,.2], use .2. Utility is .03×.2−.1×.2²/2=.004.

Apply it in a strategy

  • Freeze inputs at the stated decision time and record their units.
  • Use a scalar bounded problem as a transparent sizing baseline and solver sanity check.
  • Recompute the example, then change the material assumption and explain the difference.

Research deliverable

Curvature and a bounded quadratic decision: produce the worked calculation, a timestamped input record and a written decision addressing this limitation: The optimum is conditional on μ and a; a precise solver cannot correct a biased forecast.

These are synthetic mechanics examples, not historical performance or paper replications. Module evidence and research boundaries record the 12 September 2026 review.

Python implementation

Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.

# Python 3.10+; standard library and NumPy only.
# Synthetic teaching inputs; conventions and units are defined in the notation above.
def bounded_quadratic(mean,penalty,lower,upper):
    if penalty<=0 or lower>upper: raise ValueError('Positive penalty and ordered bounds required')
    weight=min(upper,max(lower,mean/penalty))
    return weight,mean*weight-penalty*weight**2/2

assert abs(bounded_quadratic(.03,.1,0,.2)[1]-.004)<1e-12
print(bounded_quadratic(.03,.1,0,.2))

Continue learning

Optimization: Feasibility, Costs & Robust Decisions — all lessons
  1. Exposure constraints before optimization
  2. Curvature and a bounded quadratic decision
  3. Derive the fully invested minimum-variance portfolio
  4. Project a desired allocation onto the long-only simplex
  5. Trading costs and a no-trade decision
  6. An uncertainty bound becomes a position penalty
  7. Read a binding constraint through its shadow price
  8. Numerical residuals and independent solution checks

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations