Commit 34eec586 authored by 李煜's avatar 李煜

modify code name

parent ca469d54
......@@ -54,5 +54,5 @@ python ./client/all_factor_cal.py --end_date 20190101 --count 3 --update True
初始化分布式计算redis,运行之前需要在文件中设定需要指定的redis信息。
### sumbit
分布式计算任务提交入口,执行之后,客户端会将指定目录即目录下所有文件分发到所有计算节点中。
分布式计算任务提交入口,执行之后,客户端会将指定目录即目录下所有文件分发到所有计算节点中。不同的客户端在提交任务时需要修改其中的相关配置。
......@@ -135,7 +135,7 @@ def get_basic_earning(trade_date):
def prepare_calculate(trade_date):
# cash flow
# earning
tp_earning, ttm_earning_5y, ttm_earning = get_basic_earning(trade_date)
if len(tp_earning) <= 0 or len(ttm_earning_5y) <= 0 or len(ttm_earning) <= 0:
print("%s has no data" % trade_date)
......
......@@ -121,7 +121,7 @@ class FactorVolatilityValue(FactorBase):
temp_price_sets = index_daily_price_sets[index_daily_price_sets.trade_date <= trade_date]
return sk_daily_price_sets, temp_price_sets[:count]
def prepaer_calculate(self, trade_date):
def prepare_calculate(self, trade_date):
self.trade_date = trade_date
tp_price_return, temp_price_sets = self.get_basic_data(trade_date)
......@@ -159,7 +159,7 @@ class FactorVolatilityValue(FactorBase):
trade_date_sets = self._trade_date.trade_date_sets_ago(start_date, end_date, count)
for trade_date in trade_date_sets:
print('因子计算日期: %s' % trade_date)
self.prepaer_calculate(trade_date)
self.prepare_calculate(trade_date)
print('----->')
......
......@@ -188,7 +188,7 @@ def get_basic_growth_data(trade_date):
def prepare_calculate(trade_date):
# cash flow
# growth
ttm_factor_sets, balance_sets = get_basic_growth_data(trade_date)
growth_sets = pd.merge(ttm_factor_sets, balance_sets, on='symbol')
if len(growth_sets) <= 0:
......
......@@ -142,7 +142,7 @@ def get_basic_history_value_data(trade_date):
def prepare_calculate(trade_date):
# history_value
# historical_value
valuation_sets, ttm_factor_sets, cash_flow_sets, income_sets = get_basic_history_value_data(trade_date)
valuation_sets = pd.merge(valuation_sets, income_sets, on='symbol')
valuation_sets = pd.merge(valuation_sets, ttm_factor_sets, on='symbol')
......
......@@ -121,7 +121,7 @@ def prepare_calculate(trade_date):
valuation_sets = pd.merge(valuation_sets, ttm_factor_sets, on='symbol')
valuation_sets = pd.merge(valuation_sets, cash_flow_sets, on='symbol')
valuation_sets = pd.merge(valuation_sets, balance_sets, on='symbol')
if len(valuation_sets) <= 0 :
if len(valuation_sets) <= 0:
print("%s has no data" % trade_date)
return
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment