
    Given a customer's historical monthly credit scores, develop an algorithm to identify the strongest positive trend in their creditworthiness by finding the sequence of improving scores that, when multiplied together, yields the highest product value. This score will be used as a key metric in the automated loan approval system to evaluate the customer's credit behavior improvement over time.
    

    
def max_product(arr):
    """
    Given a customer's historical monthly credit scores, develop an algorithm to identify the strongest positive trend in their creditworthiness by finding the sequence of improving scores that, when multiplied together, yields the highest product value. This score will be used as a key metric in the automated loan approval system to evaluate the customer's credit behavior improvement over time.
    

    """
def max_product(arr):
    """
    Given a customer's historical monthly credit scores, develop an algorithm to identify the strongest positive trend in their creditworthiness by finding the sequence of improving scores that, when multiplied together, yields the highest product value. This score will be used as a key metric in the automated loan approval system to evaluate the customer's credit behavior improvement over time.
    

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