diff --git a/.vscode/launch.json b/.vscode/launch.json index 2693199..050412a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -31,7 +31,8 @@ "PYTHONPATH": "${workspaceFolder}/..", "CONFIG_SERVICE": "cloud16.cvtt.vpn:6789", "CVTT_URL": "http://cvtt-tester-01.cvtt.vpn:23456", - "MODEL_CONFIG": "vecm" + "MODEL_CONFIG": "vecm", + "PAIR_TRADER_REST_PORT": "54320" }, "args": [ // "--config=${workspaceFolder}/configuration/pair_trader.cfg", diff --git a/VERSION b/VERSION index fa3de58..99d85ec 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.5 \ No newline at end of file +0.0.6 \ No newline at end of file diff --git a/lib/pt_strategy/live/live_strategy.py b/lib/pt_strategy/live/live_strategy.py index 57c1357..1954434 100644 --- a/lib/pt_strategy/live/live_strategy.py +++ b/lib/pt_strategy/live/live_strategy.py @@ -85,8 +85,6 @@ class PtLiveStrategy(NamedObject): self.allowed_md_lag_sec_ = self.config_.get_value("allowed_md_lag_sec", 3) - await self.pairs_trader_.subscribe_md() - self.open_threshold_ = self.config_.get_value( "model/disequilibrium/open_trshld", 0.0 ) @@ -101,6 +99,9 @@ class PtLiveStrategy(NamedObject): self.close_threshold_ > 0 ), "disequilibrium/close_trshld must be greater than 0" + await self.pairs_trader_.subscribe_md() + + def __repr__(self) -> str: return f"{self.classname()}: trading_pair={self.trading_pair_}, mdp={self.model_data_policy_.__class__.__name__}, "