mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-06 03:27:44 +00:00
fix: filter NaN in max(), remove redundant ternary, handle non-finite vbt results
This commit is contained in:
@@ -83,7 +83,8 @@ def _cross_check_with_vbt(
|
||||
init_cash=10_000.0,
|
||||
freq=freq,
|
||||
)
|
||||
return float(pf.total_return())
|
||||
tr = float(pf.total_return())
|
||||
return tr if np.isfinite(tr) else None
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user