
    Design a fraud detection algorithm that calculates the highest risk score by multiplying sequential transaction amounts from a customer's history where each amount is larger than the previous one. This risk assessment helps identify potentially fraudulent behavior patterns where criminals test increasing transaction limits on stolen cards.
    

    
def max_product(arr):
    """
    Design a fraud detection algorithm that calculates the highest risk score by multiplying sequential transaction amounts from a customer's history where each amount is larger than the previous one. This risk assessment helps identify potentially fraudulent behavior patterns where criminals test increasing transaction limits on stolen cards.
    

    """
def max_product(arr):
    """
    Design a fraud detection algorithm that calculates the highest risk score by multiplying sequential transaction amounts from a customer's history where each amount is larger than the previous one. This risk assessment helps identify potentially fraudulent behavior patterns where criminals test increasing transaction limits on stolen cards.
    

    """
    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)