示例#1
0
    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
示例#2
0
    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
示例#3
0
文件: pymon.py 项目: juwarny/PyTrader
    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
示例#4
0
文件: pymon.py 项目: pystockhub/book
    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
示例#5
0
    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