def numTradesPerYear(actionHistory):
    count = 0
    for i in range(1, len(actionHistory)):
        if (actionHistory[i] != actionHistory[(i - 1)]):
            count += 1
    return (count / 252)
def numTradesPerYear(actionHistory):
    count = 0
    for i in range(1, len(actionHistory)):
        if (actionHistory[i] != actionHistory[(i - 1)]):
            count += 1
    return (count / 252)