I have a set of EURUSD data and looking at arbitrage opportunities. The data is formatted as shown in photo.
mispricing_1=yes
when buy_b_sell_A>0
and mispricing_2=yes
when buy_A_sell_B>0
In the photo there is no datapoint where exploitable=yes
however when the buy_b_sell_A>6
or when buy_A_sell_B>6
, then we get exploitable=yes
I am looking to calculate the average length of time an exploitable arbitrage opportunity is present, shown by exploitable=yes
How can I calculate the length of time that there are consecutive exploitable=yes
so that I can plot a distribution and then also calculate the average?