def getStock(stock_code,start_date, end_date , LOCAL = True): daily_df = getStockDaily(stock_code,start_date, end_date , LOCAL = LOCAL) weekly_df = getStockWeekly(stock_code,start_date , end_date , LOCAL = LOCAL) monthly_df = getStockMonthly(stock_code,start_date , end_date , LOCAL = LOCAL) # KDJ and MACD daily_df = getKdj(daily_df) daily_df = getMacd(daily_df) weekly_df = getKdj(weekly_df) weekly_df = getMacd(weekly_df) monthly_df = getKdj(monthly_df) monthly_df = getMacd(monthly_df) # merge all_df = mergeDailyWeeklyMonthly(daily_df,weekly_df,monthly_df) return all_df
def getIndustry(stock_code,start_date = "20100101", end_date = "20200314" , LOCAL = True, merge_daily = True): if merge_daily: daily_df = getIndustryDaily(stock_code,start_date, end_date ) daily_df = getKdj(daily_df) daily_df = getMacd(daily_df) weekly_df = getIndustryWeekly(stock_code,start_date , end_date ) monthly_df = getIndustryMonthly(stock_code,start_date , end_date ) # KDJ and MACD weekly_df = getKdj(weekly_df) weekly_df = getMacd(weekly_df) monthly_df = getKdj(monthly_df) monthly_df = getMacd(monthly_df) # merge if merge_daily: all_df = mergeDailyWeeklyMonthly(daily_df,weekly_df,monthly_df) else: all_df = mergeWeeklyMonthly(weekly_df,monthly_df) return all_df
def getIndex(stock_code,start_date, end_date , LOCAL = True, merge_daily = True): if merge_daily: daily_df = getIndexDaily(stock_code,start_date, end_date , LOCAL = True) daily_df = getKdj(daily_df) daily_df = getMacd(daily_df) weekly_df = getIndexWeekly(stock_code,start_date , end_date , LOCAL = True) monthly_df = getIndexMonthly(stock_code,start_date , end_date , LOCAL = True) # KDJ weekly_df = getKdj(weekly_df) weekly_df = getMacd(weekly_df) monthly_df = getKdj(monthly_df) monthly_df = getMacd(monthly_df) # merge if merge_daily: all_df = mergeDailyWeeklyMonthly(daily_df,weekly_df,monthly_df) else: all_df = mergeWeeklyMonthly(weekly_df,monthly_df) return all_df