def calculate_estimated_dividend_to_treasury(self, code): estimated_dividend_yield = webreader.get_estimated_dividend_yield(code) if np.isnan(estimated_dividend_yield): estimated_dividend_yield = webreader.get_dividend_yield(code) current_3year_treasury = webreader.get_current_3year_treasury() estimated_dividend_to_treasury = float( estimated_dividend_yield) / float(current_3year_treasury) return estimated_dividend_to_treasury
def calculate_estimated_dividend_to_treasury(self, code): dividend_yield = webreader.get_estimated_dividend_yield(code) if pd.isnull(dividend_yield): dividend_yield = webreader.get_dividend_yield(code) dividend_yield = float(dividend_yield) current_3year_treasury = float(webreader.get_current_3year_treasury()) estimated_dividend_to_treasury = dividend_yield / current_3year_treasury return estimated_dividend_to_treasury
def calculate_estimated_dividend_to_treasury(self, code): estimated_dividend_yield = webreader.get_estimated_dividend_yield(code) print("calculate_estimated_dividend_to_treasury", estimated_dividend_yield) if estimated_dividend_yield == 0: estimated_dividend_yield = webreader.get_dividend_yield(code) if estimated_dividend_yield == "": estimated_dividend_yield = 0 current_3year_treasury = webreader.get_current_3year_treasury() estimated_dividend_to_treasury = float(estimated_dividend_yield) / float(current_3year_treasury) return estimated_dividend_to_treasury
def calculate_estimated_dividend_to_treasury(self, code): estimated_dividend_yield = webreader.get_estimated_dividend_yield(code) print("calculate_estimated_dividend_to_treasury", estimated_dividend_yield) if estimated_dividend_yield == 0: estimated_dividend_yield = webreader.get_dividend_yield(code) if estimated_dividend_yield == "": estimated_dividend_yield = 0 current_3year_treasury = webreader.get_current_3year_treasury() estimated_dividend_to_treasury = float( estimated_dividend_yield) / float(current_3year_treasury) return estimated_dividend_to_treasury