Talk:SEDOL

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

UK?[edit]

shouldn't it be United Kingdom rather than England?

Dummy codes[edit]

Can someone describe the rules for creating valid "dummy" sedol codes? Is it just that they start with a "9" or is there more to it than that?

Validation of SEDOLs[edit]

Is the source code for validation really necessary in wikipedia? Surely some well-written pseudocode would be just as useful - the full source could just be put somewhere else in the commons and referenced from here. 206.195.19.51 (talk) 08:18, 10 July 2008 (UTC)[reply]

FYI, python code that will validate a SEDOL string:

class SEDOLException(Exception):
    """Blank exception"""
    pass

def validateSEDOL(sedol_str):
    """Check a SEDOL string for correctness"""
    if len(sedol_str) != 7:
        raise SEDOLException('SEDOL must be 7 characters long')
    correct_checkDigit = calcSEDOLCheckDigit(sedol_str[:-1])
    if correct_checkDigit != sedol_str[-1:]:
        raise SEDOLException("Checkdigit '%s' is incorrect. It should be '%s'" % (sedol_str[-1:], correct_checkDigit))

def calcSEDOLCheckDigit(sedol_str):
    """Calculate the checkdigit for a 6 character SEDOL"""
    digit_weight = [1, 3, 1, 7, 3, 9]
    #Convert letters to digits
    sedol_digits = []
    for char in sedol_str:
        if char.isalpha():
            sedol_digits.append((string.ascii_uppercase.index(char.upper()) + 9 + 1))
        else:
            sedol_digits.append(char)
    #Multiply each digit by the appropriate weight
    sedol_sum = sum([int(sedol_digits[i])*digit_weight[i] for i in range(6)])
    checkdigit = ((10 - (sedol_sum % 10))) % 10
    return str(checkdigit)

Rob cowie 12:22, 15 December 2006 (UTC)[reply]

Incorrect Validation of SEDOLS[edit]

Most of the validation sections of the examples, including the Python above, but with the exception of the new Python example in the article, don't take account of the fact that SEDOLs don't include the vowels (according to the description at time of writing). --Paddy (talk) 07:33, 3 August 2008 (UTC)[reply]

Extra modulo?[edit]

It seems like there's an extra modulo in the formula to calculate the check digit. It's given as (10 − (weighted sum modulo 10)) modulo 10 (adding an extra parenthesis where the programs seem to add it). The last modulo doesn't seem to do anything. "(10 − (weighted sum modulo 10))" will already be less than 10 and not negative. Am I crazy? --Mwn3d (talk) 19:49, 22 September 2009 (UTC)[reply]

I was crazy. Refer to the talk on Rosetta Code for an explanation. --Mwn3d (talk) 20:20, 4 February 2010 (UTC)[reply]

Conversion[edit]

Not convinced that a conversion of SEDOL to ISIN is purely the padding. ISIN cover a single stock, where SEDOL covers the lines of stock. E.g. Total being traded on the French Bourse and the DAX would have two differnt SEDOLs but the same ISIN —Preceding unsigned comment added by 82.28.40.161 (talk) 18:16, 25 July 2010 (UTC)[reply]