Exemple #1
0
 def __init__(self,
              code,
              isonumber,
              twoletterscode,
              order,
              name,
              roundoff=4,
              default_country=None,
              fixeddc=None,
              floatdc=None,
              fixedfreq=None,
              floatfreq=None,
              future=None,
              symbol=r'\00a4',
              html=''):
     self.code = to_string(code)
     self.id = self.code
     self.isonumber = isonumber
     self.twoletterscode = to_string(twoletterscode)
     self.order = int(order)
     self.name = to_string(name)
     self.rounding = roundoff
     self.default_country = default_country
     self.symbol_raw = symbol
     self.symbol = symbol.encode('utf-8').decode('unicode_escape')
     self.html = html or self.symbol
     self.fixeddc = fixeddc
     self.floatdc = floatdc
     self.future = ''
     if future:
         self.future = str(future)
Exemple #2
0
 def __init__(self, code, isonumber, twoletterscode, order, name,
              roundoff=4,
              default_country=None,
              fixeddc=None,
              floatdc=None,
              fixedfreq=None,
              floatfreq=None,
              future=None,
              symbol=r'\00a4',
              html=''):
     #from qmpy.finance.dates import get_daycount
     self.code = to_string(code)
     self.id = self.code
     self.isonumber = isonumber
     self.twoletterscode = to_string(twoletterscode)
     self.order = int(order)
     self.name = to_string(name)
     self.rounding = roundoff
     self.default_country = default_country
     self.symbol_raw = symbol
     self.symbol = symbol.encode('utf-8').decode('unicode_escape')
     self.html = html or self.symbol
     self.fixeddc = fixeddc
     self.floatdc = floatdc
     #self.fixedfreq     = str(fixedfreq)
     #self.floatfreq     = str(floatfreq)
     self.future = ''
     if future:
         self.future = str(future)
Exemple #3
0
 def printinfo(self, stream=None):
     info = self.info()
     stream = stream or sys.stdout
     for k, v in info.items():
         stream.write(to_string('%s: %s\n' % (k, v)))
Exemple #4
0
 def printinfo(self, stream=None):
     info = self.info()
     stream = stream or sys.stdout
     for k, v in info.items():
         stream.write(to_string("%s: %s\n" % (k, v)))