refactored code. before cleaning
This commit is contained in:
@@ -26,6 +26,7 @@ class PtResearchStrategy:
|
||||
pt_mkt_data_: PtMarketData
|
||||
|
||||
trades_: List[pd.DataFrame]
|
||||
predictions_: pd.DataFrame
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -41,6 +42,7 @@ class PtResearchStrategy:
|
||||
self.trades_ = []
|
||||
self.trading_pair_ = TradingPair(config=config, instruments=instruments)
|
||||
self.model_data_policy_ = ModelDataPolicy.create(config)
|
||||
self.predictions_ = pd.DataFrame()
|
||||
|
||||
import copy
|
||||
|
||||
@@ -83,6 +85,7 @@ class PtResearchStrategy:
|
||||
prediction = self.trading_pair_.run(
|
||||
market_data_df, self.model_data_policy_.advance()
|
||||
)
|
||||
self.predictions_ = pd.concat([self.predictions_, prediction.to_df()], ignore_index=True)
|
||||
assert prediction is not None
|
||||
|
||||
trades = self._create_trades(
|
||||
|
||||
Reference in New Issue
Block a user