def CRSI(df1, df2, n, price1='Close', price2='Close'):
    """
    Comparative Relative Strength Index
    Returns: list of floats = jhta.CRSI(df1, df2, n, price1='Close', price2='Close')
    Source: https://www.fmlabs.com/reference/default.htm?url=RSIC.htm
    """
    crsi_list = []
    for i in range(len(df1[price1])):
        if i + 1 < n:
            crsi = float('NaN')
        else:
            crsi = (df1[price1][i] / df2[price2][i] - df1[price1][i - n] /
                df2[price2][i - n]) / (df1[price1][i - n] / df2[price2][i - n])
        crsi_list.append(crsi)
    return crsi_list
