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 949a58c commit 40dcded
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions systems/positionsizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def get_block_value(self, instrument_code: str) -> pd.Series:
"""

underlying_price = self.get_underlying_price(instrument_code)
value_of_price_move = self.parent.data.get_value_of_block_price_move(
value_of_price_move = self.rawdata_stage.get_value_of_block_price_move(
instrument_code
)

Expand Down Expand Up @@ -535,7 +535,7 @@ def get_fx_rate(self, instrument_code: str) -> pd.Series:
"""

base_currency = self.get_base_currency()
fx_rate = self.data.get_fx_for_instrument(instrument_code, base_currency)
fx_rate = self.rawdata_stage.get_fx_for_instrument(instrument_code, base_currency)

return fx_rate

Expand Down
4 changes: 4 additions & 0 deletions systems/rawdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ def get_raw_cost_data(self, instrument_code: str):
def get_value_of_block_price_move(self, instrument_code: str) -> float:
return self.data_stage.get_value_of_block_price_move(instrument_code)

def get_fx_for_instrument(
self, instrument_code: str, base_currency: str
):
return self.data_stage.get_fx_for_instrument(instrument_code=instrument_code, base_currency=base_currency)

@input
def get_daily_prices(self, instrument_code) -> pd.Series:
Expand Down

0 comments on commit 40dcded

Please sign in to comment.