feat: strategy builder
This commit is contained in:
@@ -51,7 +51,10 @@ def _evaluate(
|
||||
if len(legs) > constraints["max_legs"] or len(legs) == 0:
|
||||
return None
|
||||
try:
|
||||
priced = price_combo(legs, chain_slice, surface_now, surface_scenario, horizon_days, r, contract_size)
|
||||
# precise=False: skips the dense near-strike refinement (see check_bounded_risk) —
|
||||
# ranking/filtering hundreds of candidates only needs relative ordering, not the
|
||||
# exact peak height. The single loaded candidate gets refined precision via /price.
|
||||
priced = price_combo(legs, chain_slice, surface_now, surface_scenario, horizon_days, r, contract_size, precise=False)
|
||||
except Exception:
|
||||
return None
|
||||
if not _passes_constraints(legs, priced, constraints):
|
||||
|
||||
Reference in New Issue
Block a user