ep
The definition of predictor ep:
def parameter():
para = {}
para['predictor'] = 'ep'
para['relate_finance_index'] = ['clsprc', 'B003000000']
return para
def equation(df):
df = df.copy()
df['ep'] = df['B003000000'] / df['clsprc'] # df['B00300000'] -> eps
return df
This definition is written in file ’./codes/predictors/ep.py’. Here, ’clsprc’ represent the close price, and ’B003000000’ represents the Earnings Per Share (eps) which from the CSMAR csmar_master.sas7bdat dataset.
Tips:
Like ’ep.py’ file, people can add new predictor file ’ep.py’ in the path ’./codes/predictors/’.
’predictor_name’ should keep consist with para[’predictor’]