Following a recent question of mine on the number of consecutive pos and neg returns in a series. I mixed things I found out on SO. I hoped to come up with something (much) more elegant (more 'pythonic'), to be honest. There are CBoT soybean futures daily closing prices from 1988 if you are curious about it.
Last edited by tagoma
on February 3rd, 2016, 11:00 pm, edited 1 time in total.