Exemplo n.º 1
0
class CImporterEuroStoxx50(CImporter):

    def __init__(self):
        self.__FN = CFinanzenNet()
        self.__Onvista= COnvista()
        self.__StockList = list()
        
        self.__AnzahlAktienInIndex = 50
        self._strIndexFinanzenNet = "Euro_Stoxx_50"
        self.__strBoerseFinanzenNet = "FSE"
        
    def getListOfStocks(self):
        
        self.__StockList = self.__FN.getEinzelwerteListe(self._strIndexFinanzenNet)
        
        self.validateListeLaenge(self.__StockList, self.__AnzahlAktienInIndex, self._strIndexFinanzenNet)
        
        for i in self.__StockList:
            i.strBoerseFinanzenNet =  self.__strBoerseFinanzenNet
            i.strIndexFinanzenNet = self._strIndexFinanzenNet
            i.FinanzenNetId = self.__FN.getFinanzenNetId(i)
            i.OnvistaId = self.__Onvista.getOnvistaId(i)
            mkap = self.__Onvista.getMarktkapitalisierungInEuro(i)
            if mkap > 5*pow(10,9):
                i.isLargeCap = True
            else:
                i.isLargeCap= False
        
                
        return self.__StockList
Exemplo n.º 2
0
class CImporterSMI(CImporter):
    def __init__(self):
        self.__FN = CFinanzenNet()
        self.__Onvista = COnvista()
        self.__StockList = list()

        self.__AnzahlAktienInIndex = 20
        self._strIndexFinanzenNet = "SMI"
        self.__strBoerseFinanzenNet = "FSE"

    def getListOfStocks(self):

        self.__StockList = self.__FN.getEinzelwerteListe(
            self._strIndexFinanzenNet)

        self.validateListeLaenge(self.__StockList, self.__AnzahlAktienInIndex,
                                 self._strIndexFinanzenNet)

        for i in self.__StockList:
            i.strBoerseFinanzenNet = self.__strBoerseFinanzenNet
            i.strIndexFinanzenNet = self._strIndexFinanzenNet
            i.FinanzenNetId = self.__FN.getFinanzenNetId(i)
            i.OnvistaId = self.__Onvista.getOnvistaId(i)
            mkap = self.__Onvista.getMarktkapitalisierungInEuro(i)
            if mkap > 5 * pow(10, 9):
                i.isLargeCap = True
            else:
                i.isLargeCap = False

        return self.__StockList
Exemplo n.º 3
0
    def __init__(self):
        self.__FN = CFinanzenNet()
        self.__Onvista = COnvista()
        self.__StockList = list()

        self.__AnzahlAktienInIndex = 20
        self._strIndexFinanzenNet = "SMI"
        self.__strBoerseFinanzenNet = "FSE"
Exemplo n.º 4
0
class CIndicatorKGV(CIndicator):

    def __init__(self):
        CIndicator.__init__(self)
        self.__Onvista = COnvista()
        self.__StockDict = dict()
        self._Name = str(self.__class__)
        
    def getPoints(self, stock):    
        
        '''
        check if this stock has already been processed
        '''
        
        if stock in self.__StockDict:
            kgv = self.__StockDict[stock]
        else:
            kgv = self.__Onvista.getKGVAktJahr(stock)
            self.__StockDict[stock] = kgv      
        
        result = 0
        
        if kgv == "NA":
            result = 0
            print "Warnung: " + self._Name + ": " + stock.Name + ": Wert nicht verfuegbar"
        elif kgv < 12:
            result = 1
        elif (kgv >= 12 and kgv <= 16):
            result = 0
        else:
            result = -1
        
        
        return result
Exemplo n.º 5
0
class CIndicatorEKR(CIndicator):
    def __init__(self):
        CIndicator.__init__(self)
        self.__Onvista = COnvista()
        self.__StockDict = dict()
        self._Name = str(self.__class__)

    def getPoints(self, stock):
        '''
        check if this stock has already been processed
        '''

        if stock in self.__StockDict:
            ekr = self.__StockDict[stock]
        else:
            ekr = self.__Onvista.getEKRAktJahrProzent(stock)
            self.__StockDict[stock] = ekr

        result = 0

        if ekr == "NA":
            result = 0
            print "Warnung: " + self._Name + ": " + stock.Name + ": Wert nicht verfuegbar"
        elif ekr > 20:
            result = 1
        elif (ekr >= 10 and ekr <= 20):
            result = 0
        else:
            result = -1

        return result
Exemplo n.º 6
0
class CIndicatorKGV(CIndicator):
    def __init__(self):
        CIndicator.__init__(self)
        self.__Onvista = COnvista()
        self.__StockDict = dict()
        self._Name = str(self.__class__)

    def getPoints(self, stock):
        '''
        check if this stock has already been processed
        '''

        if stock in self.__StockDict:
            kgv = self.__StockDict[stock]
        else:
            kgv = self.__Onvista.getKGVAktJahr(stock)
            self.__StockDict[stock] = kgv

        result = 0

        if kgv == "NA":
            result = 0
            print "Warnung: " + self._Name + ": " + stock.Name + ": Wert nicht verfuegbar"
        elif kgv < 12:
            result = 1
        elif (kgv >= 12 and kgv <= 16):
            result = 0
        else:
            result = -1

        return result
Exemplo n.º 7
0
class CIndicatorEigenkapital(CIndicator):

    def __init__(self):
        CIndicator.__init__(self)
        self.__Onvista = COnvista()
        self.__StockDict = dict()
        self._Name = str(self.__class__)
        
    def getPoints(self, stock):    
        
        '''
        check if this stock has already been processed
        '''
        
        if stock in self.__StockDict:
            ekr= self.__StockDict[stock]
        else:    
            ekr = self.__Onvista.getEigenkapitalquoteAktJahrProzent(stock)
            self.__StockDict[stock] = ekr
        
        result = 0
        
        if ekr == "NA":
            result = 0
            print "Warnung: " + self._Name + ": " + stock.Name + ": Wert nicht verfuegbar"
        elif ekr > 25:
            result = 1
        elif (ekr >= 15 and ekr <= 25):
            result = 0
        else:
            result = -1
        
        
        return result
Exemplo n.º 8
0
 def __init__(self):
     self.__FN = CFinanzenNet()
     self.__Onvista= COnvista()
     self.__StockList = list()
     
     self.__AnzahlAktienInIndex = 50
     self._strIndexFinanzenNet = "Euro_Stoxx_50"
     self.__strBoerseFinanzenNet = "FSE"
Exemplo n.º 9
0
 def __init__(self):
     CIndicator.__init__(self)
     self.__Onvista = COnvista()
     self.__StockDict = dict()
     self._Name = str(self.__class__)
Exemplo n.º 10
0
 def __init__(self):
     CIndicator.__init__(self)
     self.__Onvista = COnvista()
     self.__StockDict = dict()
     self._Name = str(self.__class__)