# NoPenalty¶

class allopy.penalty.NoPenalty(dim)[source]
__init__(dim)[source]

No penalty is a no-op penalty function. Essentially it applies no penalty to the objective function when applied to the objective function.

Parameters

dim (int) – Number of assets

cost(_)[source]

Calculates the penalty to apply

$p(w) = 0$
Return type

float