
    Design a fraud detection algorithm that calculates the highest risk severity score by multiplying sequential risk indicators from a user's transaction history, where each indicator in the sequence must be higher than the previous one. The risk severity score helps identify potentially fraudulent behavior patterns where transactions or risk factors show an escalating trend.
    

    
def max_product(arr):
    """
    Design a fraud detection algorithm that calculates the highest risk severity score by multiplying sequential risk indicators from a user's transaction history, where each indicator in the sequence must be higher than the previous one. The risk severity score helps identify potentially fraudulent behavior patterns where transactions or risk factors show an escalating trend.
    

    """
def max_product(arr):
    """
    Design a fraud detection algorithm that calculates the highest risk severity score by multiplying sequential risk indicators from a user's transaction history, where each indicator in the sequence must be higher than the previous one. The risk severity score helps identify potentially fraudulent behavior patterns where transactions or risk factors show an escalating trend.
    

    """
    n = len(arr)
    mpis = arr[:]
    for i in range(n):
        current_prod = arr[i]
        j = i + 1
        while j < n:
            if arr[j - 1] > arr[j]:
                break
            current_prod *= arr[j]
            if current_prod > mpis[j]:
                mpis[j] = current_prod
            j = j + 1
    return max(mpis)