Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jztxu committed Nov 7, 2018
1 parent c49b362 commit 97149a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jaqs/data/dataview.py
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,9 @@ def add_factor(self, factor, name=None, is_quarterly=False): # within_index=Tru
self.add_formula(field_name=name, formula=factor, is_quarterly=is_quarterly, is_factor=True)

def add_label(self, factor, name=None, is_quarterly=False): # within_index=True):
if not name:
name = factor.split('(')[0]

self.add_formula(field_name=name, formula=factor, is_quarterly=is_quarterly, is_factor=False)

def add_formula(self, field_name, formula, is_quarterly, overwrite=True,
Expand All @@ -1567,6 +1570,8 @@ def add_formula(self, field_name, formula, is_quarterly, overwrite=True,
data_api : RemoteDataService, optional
within_index : bool
When do cross-section operatioins, whether just do within index components.
is_factor: bool
Whether new field is factor or label.
Notes
-----
Expand Down

0 comments on commit 97149a8

Please sign in to comment.