def composite_index(data):
    """
    Create a composite index based on the sentiment analysis based on Loughran and McDonald's
    dictionary and script.

    :param data: String to analyse.
    :return: List of values. See unused variable OUTPUT_FIELDS in the source, there is a lot.
    """
    OUTPUT_FIELDS = ['file type', 'file size', 'number of words',
        '% positive', '% negative', '% uncertainty', '% litigious',
        '% modal-weak', '% modal moderate', '% modal strong',
        '% constraining', '# of alphabetic', '# of digits', '# of numbers',
        'avg # of syllables per word', 'average word length', 'vocabulary']
    if data[2] + data[3] + data[4]:
        result = (data[3] - data[4]) / data[2]
    else:
        result = 0
    return result
