MCPcopy Create free account
hub / github.com/kernc/backtesting.py / cons

Method cons

backtesting/backtesting.py:1596–1598  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

1594 return 0 if np.isnan(value) else value
1595
1596 def cons(x):
1597 nonlocal constraint, _names
1598 return constraint(AttrDict(zip(_names, x)))
1599
1600 res = sambo.minimize(
1601 fun=objective_function,

Callers

nothing calls this directly

Calls 1

AttrDictClass · 0.85

Tested by

no test coverage detected