Esempio n. 1
0
 def get(self):
     values = {}
     query = db.Query(stock.Stock)
     stocks = query.fetch(10000)
     stocks, pb, pe, roe, mc_gdp = self.__filter(stocks)
     stocks = self.__magicformula(stocks)
     position = 50
     while position<len(stocks):
         if stocks[position].rank == stocks[position - 1].rank:
             position = position + 1
         else:
             break
     values['stocks'] = stocks[0 : position]
     values['PB'] = "%.4f" % (pb)
     values['PE'] = "%.2f" % (pe)
     values['ROE'] = "%.1f%%" % (roe)
     values['MCGDP'] = "%.0f%%" % (mc_gdp)
     content = template.render('qmagicformula.html', values)
     self.response.write(content)
     self.__send_mail(content, "*****@*****.**", '神奇公式')
     #self.__send_mail(content, "*****@*****.**", '神奇公式')
     entry = stock_result.get_html('magicformula')
     entry.content = content
     stock_result.set_html('magicformula', entry)
     postoffice.post("magicformula", "神奇公式")
 def get(self):
     values = {}
     query = db.Query(stock.Stock)
     stocks = query.fetch(10000)
     stocks, pb, pe, roe, mc_gdp = self.__filter(stocks)
     values['stocks'] = stocks[0 : len(stocks)]
     values['PB'] = "%.4f" % (pb)
     values['PE'] = "%.2f" % (pe)
     values['ROE'] = "%.1f%%" % (roe)
     values['MCGDP'] = "%.0f%%" % (mc_gdp)
     content = template.render('netcurrentassetapproach.html', values)
     self.response.write(content)
     self.__send_mail(content)
     entry = stock_result.get_html('netcurrentassetapproach')
     entry.content = content
     stock_result.set_html('netcurrentassetapproach', entry)
     postoffice.post("netcurrentassetapproach", "净流动资产法")
Esempio n. 3
0
 def get(self):
     values = {}
     query = db.Query(stock.Stock)
     stocks = query.fetch(10000)
     stocks, pb, pe, roe, mc_gdp = self.__filter(stocks)
     if 0 != len(stocks):
         values['stocks'] = stocks[0 : len(stocks)]
         values['PB'] = "%.4f" % (pb)
         values['PE'] = "%.2f" % (pe)
         values['ROE'] = "%.1f%%" % (roe)
         values['MCGDP'] = "%.0f%%" % (mc_gdp)
         content = template.render('netcurrentassetapproach.html', values)
         self.response.write(content)
         self.__send_mail(content)
         entry = stock_result.get_html('netcurrentassetapproach')
         entry.content = content
         stock_result.set_html('netcurrentassetapproach', entry)
         postoffice.post("netcurrentassetapproach", "净流动资产法")
Esempio n. 4
0
 def get(self):
     values = {}
     query = db.Query(stock.Stock)
     stocks = query.fetch(10000)
     stocks, pb, pe, roe, mc_gdp = self.__filter(stocks)
     if 0 != len(stocks):
         values['stocks'] = stocks[0 : len(stocks)]
         values['PB'] = "%.4f" % (pb)
         values['PE'] = "%.2f" % (pe)
         values['ROE'] = "%.1f%%" % (roe)
         values['MCGDP'] = "%.0f%%" % (mc_gdp)
         content = template.render('grahamformula.html', values)
         self.response.write(content)
         self.__send_mail(content)
         entry = stock_result.get_html('grahamformula')
         entry.content = content
         stock_result.set_html('grahamformula', entry)
         postoffice.post("grahamformula", "格雷厄姆公式")
Esempio n. 5
0
 def get(self):
     entry = stock_result.get_html('magicformula')
     self.response.write(entry.content)
Esempio n. 6
0
 def get(self):
     entry = stock_result.get_html('netcurrentassetapproach')
     self.response.write(entry.content)