as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
write a function to calculate the root mean squared error (rmse).
user
def rmse(actual_values, predicted_values):
    """
    function to calculate the root mean squared error (rmse)
    """
    #initializing the rmse to 0
    rmse = 0
    # calculating rmse
    for i in range(len(actual_values)):
        rmse += (pow(float(actual_values[i]) - float(predicted_values[i]), 2))
    rmse /= len(actual_values)
    rmse = pow(rmse, 0.5)
    return rmse
assistant