You may find the following post helpful in solving this. It’s not the exact same case, but very comparable - calculating the number of simultaneous periods in which a number stayed the same sign (as opposed to the exact same value):
- Brian
You may find the following post helpful in solving this. It’s not the exact same case, but very comparable - calculating the number of simultaneous periods in which a number stayed the same sign (as opposed to the exact same value):