|
|
@@ -15,6 +15,7 @@ class Action():
|
|
|
self.Journee = {}
|
|
|
|
|
|
self.valeur = 0
|
|
|
+ self.valref = 0
|
|
|
|
|
|
#nombre d'action
|
|
|
self.possedent = 0
|
|
|
@@ -22,30 +23,30 @@ class Action():
|
|
|
self.valeurAchat = 0
|
|
|
|
|
|
#NBNeurone par action
|
|
|
- self.Tab = [0]*NBNeurone
|
|
|
+ self.Tab = [1]*NBNeurone
|
|
|
|
|
|
self.chaleur = 0
|
|
|
|
|
|
def MajQuotidient(self,date):
|
|
|
name=self.path+self.name+"-"+date
|
|
|
- print(name)
|
|
|
F_Journee = open(name,"r")
|
|
|
self.Journee = ast.literal_eval(F_Journee.readline())
|
|
|
Quoti = ast.literal_eval(F_Journee.readline())
|
|
|
- self.Tab[0]=float(Quoti["1semaine"][0].strip("%"))
|
|
|
- self.Tab[1]=float(Quoti["1mois"][0].strip("%"))
|
|
|
- self.Tab[2]=float(Quoti["3mois"][0].strip("%"))
|
|
|
- self.Tab[3]=float(Quoti["6mois"][0].strip("%"))
|
|
|
- self.Tab[4]=float(Quoti["1an"][0].strip("%"))
|
|
|
+ self.valref = float(Quoti["1semaine"][1])
|
|
|
+ self.Tab[0]=float(Quoti["1semaine"][0].strip("%"))/100
|
|
|
+ self.Tab[1]=float(Quoti["1mois"][0].strip("%"))/100
|
|
|
+ self.Tab[2]=float(Quoti["3mois"][0].strip("%"))/100
|
|
|
+ self.Tab[3]=float(Quoti["6mois"][0].strip("%"))/100
|
|
|
+ self.Tab[4]=float(Quoti["1an"][0].strip("%"))/100
|
|
|
_3ans=Quoti["3ans"][0].strip("%")
|
|
|
if (_3ans != '-'):
|
|
|
- self.Tab[5]=float(_3ans)
|
|
|
+ self.Tab[5]=float(_3ans)/100
|
|
|
_5ans=Quoti["5ans"][0].strip("%")
|
|
|
if (_5ans != '-'):
|
|
|
- self.Tab[6]=float(_5ans)
|
|
|
+ self.Tab[6]=float(_5ans)/100
|
|
|
_10ans=Quoti["10ans"][0].strip("%")
|
|
|
if (_10ans != '-'):
|
|
|
- self.Tab[7]=float(_10ans)
|
|
|
+ self.Tab[7]=float(_10ans)/100
|
|
|
|
|
|
#Plus tard ajout des NM ...
|
|
|
#self.Tab[0]=Quoti["MM20"]
|
|
|
@@ -56,13 +57,13 @@ class Action():
|
|
|
|
|
|
def Maj1min(self,heure):
|
|
|
val=self.Journee.get(heure)
|
|
|
- if (val != None):
|
|
|
- self.Tab.insert(NBInfoSupplementaire,val)
|
|
|
- self.Tab=self.Tab[0:-1]
|
|
|
- else : # SI on est égale a none on ajout la derniere valeurs L'enregistrement des valeurs a commencé plus tard
|
|
|
- val=self.Tab[NBInfoSupplementaire+1]
|
|
|
- self.Tab.insert(NBInfoSupplementaire,val)
|
|
|
- self.Tab=self.Tab[0:-1]
|
|
|
+ while (val == None):
|
|
|
+ heure = minute[minute.index(heure)+1]
|
|
|
+ val=self.Journee.get(heure)
|
|
|
+ self.Tab.insert(NBInfoSupplementaire,val/self.valref)
|
|
|
+ self.Tab=self.Tab[0:-1]
|
|
|
+
|
|
|
+
|
|
|
|
|
|
def getTable(self):
|
|
|
return self.Tab
|