From 8078f17a2d1a3e5a1923e352968311efdcd5b68c Mon Sep 17 00:00:00 2001 From: Rob Carver Date: Wed, 10 Jan 2024 12:30:46 +0000 Subject: [PATCH] repointing data refs to rawdata refs to make it easier to override --- systems/accounts/account_inputs.py | 6 +++--- systems/rawdata.py | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/systems/accounts/account_inputs.py b/systems/accounts/account_inputs.py index 6ebf4b5193..17104bf629 100644 --- a/systems/accounts/account_inputs.py +++ b/systems/accounts/account_inputs.py @@ -58,10 +58,10 @@ def instrument_prices_for_position_or_forecast_infer_frequency( return instrument_prices def get_daily_prices(self, instrument_code: str) -> pd.Series: - return self.parent.data.daily_prices(instrument_code) + return self.parent.rawdata.get_daily_prices(instrument_code) def get_hourly_prices(self, instrument_code: str) -> pd.Series: - return self.parent.data.hourly_prices(instrument_code) + return self.parent.rawdata.get_hourly_prices(instrument_code) def get_capped_forecast( self, instrument_code: str, rule_variation_name: str @@ -108,7 +108,7 @@ def forecast_cap(self) -> float: return self.config.forecast_cap def get_raw_cost_data(self, instrument_code: str) -> instrumentCosts: - return self.parent.data.get_raw_cost_data(instrument_code) + return self.parent.rawdata.get_raw_cost_data(instrument_code) def get_rolls_per_year(self, instrument_code: str) -> int: rolls_per_year = self.parent.rawdata.rolls_per_year(instrument_code) diff --git a/systems/rawdata.py b/systems/rawdata.py index feebebaeee..572f2a2e6b 100644 --- a/systems/rawdata.py +++ b/systems/rawdata.py @@ -42,6 +42,9 @@ def data_stage(self) -> futuresSimData: def config(self) -> Config: return self.parent.config + def get_raw_cost_data(self, instrument_code: str): + return self.data_stage.get_raw_cost_data(instrument_code) + @input def get_daily_prices(self, instrument_code) -> pd.Series: """