Skip to content

Commit

Permalink
repointing data refs to rawdata refs to make it easier to override
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Carver committed Jan 10, 2024
1 parent a268bad commit 8078f17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions systems/accounts/account_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions systems/rawdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down

0 comments on commit 8078f17

Please sign in to comment.