Skip to content

Commit

Permalink
added alpha factor query
Browse files Browse the repository at this point in the history
  • Loading branch information
fboerman committed Aug 7, 2024
1 parent 0f076d2 commit 39ad9d9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion jao/jao.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .util import to_snake_case

__title__ = "jao-py"
__version__ = "0.4.7"
__version__ = "0.4.8"
__author__ = "Frank Boerman"
__license__ = "MIT"

Expand Down Expand Up @@ -155,6 +155,9 @@ def query_price_spread(self, d_from: pd.Timestamp, d_to: pd.Timestamp) -> List[D
def query_scheduled_exchange(self, d_from: pd.Timestamp, d_to: pd.Timestamp) -> List[Dict]:
return self._query_base_fromto(d_from, d_to, 'scheduledExchanges')

def query_alpha_factor(self, d_from: pd.Timestamp, d_to: pd.Timestamp) -> List[Dict]:
return self._query_base_fromto(d_from, d_to, 'alphaFactor')


class JaoPublicationToolPandasClient(JaoPublicationToolClient):
def query_final_domain(self, mtu: pd.Timestamp, presolved: bool = None, cne: str = None,
Expand Down Expand Up @@ -215,6 +218,11 @@ def query_status(self, d_from: pd.Timestamp, d_to: pd.Timestamp) -> pd.DataFrame
super().query_status(d_from=d_from, d_to=d_to)
).drop(columns=['lastModifiedOn'])

def query_alpha_factor(self, d_from: pd.Timestamp, d_to: pd.Timestamp) -> pd.DataFrame:
return parse_base_output(
super().query_alpha_factor(d_from=d_from, d_to=d_to)
).drop(columns=['lastModifiedOn'])

def query_price_spread(self, d_from: pd.Timestamp, datetime, d_to: pd.Timestamp) -> (
pd.DataFrame):
return parse_base_output(
Expand Down Expand Up @@ -247,6 +255,9 @@ def query_status(self, d_from: pd.Timestamp, d_to: pd.Timestamp):
def query_active_constraints(self, day: pd.Timestamp):
raise NotImplementedError

def query_alpha_factor(self, d_from: pd.Timestamp, d_to: pd.Timestamp):
raise NotImplementedError

def query_sidc_atc_raw(self, day: pd.Timestamp) -> List[Dict]:
return self._query_base_day(day, 'intradayAtc')

Expand Down

0 comments on commit 39ad9d9

Please sign in to comment.