diff --git a/stratevo/ml/__init__.py b/stratevo/ml/__init__.py index 12185b65..226bc1f5 100644 --- a/stratevo/ml/__init__.py +++ b/stratevo/ml/__init__.py @@ -55,3 +55,21 @@ __all__.append("WalkForwardPipeline") except ImportError: pass + +try: + from stratevo.ml.model_selection import ModelSelector + __all__.append("ModelSelector") +except ImportError: + pass + +try: + from stratevo.ml.prediction_tracker import PredictionTracker + __all__.append("PredictionTracker") +except ImportError: + pass + +try: + from stratevo.ml.data_splitter import FinancialDataSplitter + __all__.append("FinancialDataSplitter") +except ImportError: + pass diff --git a/stratevo/strategies/__init__.py b/stratevo/strategies/__init__.py index cc39bd6d..1bb736bf 100644 --- a/stratevo/strategies/__init__.py +++ b/stratevo/strategies/__init__.py @@ -1,11 +1,12 @@ """stratevo.strategies - Trading strategies.""" from stratevo.strategies.momentum_jt import MomentumJTStrategy -from stratevo.strategies.combiner import StrategyCombiner +from stratevo.strategies.combiner import StrategyCombiner, MomentumAdapter __all__ = [ "MomentumJTStrategy", "StrategyCombiner", + "MomentumAdapter", ] try: diff --git a/tests/test_security_audit.py b/tests/test_security_audit.py index 50e75437..77c98702 100644 --- a/tests/test_security_audit.py +++ b/tests/test_security_audit.py @@ -745,7 +745,7 @@ def test_factor_eval_cannot_import(self): volume = np.array([100.0, 200.0, 300.0]) # Attempting to import in a sandboxed eval should fail - with pytest.raises((NameError, TypeError)): + with pytest.raises((NameError, TypeError, ValueError)): evaluate_formula( "__import__('os').system('echo pwned')", close, high, low, volume, @@ -761,7 +761,7 @@ def test_factor_eval_cannot_access_builtins(self): low = np.array([0.5, 1.5, 2.5]) volume = np.array([100.0, 200.0, 300.0]) - with pytest.raises((NameError, TypeError, KeyError)): + with pytest.raises((NameError, TypeError, KeyError, ValueError)): evaluate_formula( "__builtins__['__import__']('os').listdir('.')", close, high, low, volume,