Volatility of the returns

The overnight returns were better than the intraday returns, but how about the volatility? Returns are always judged on a risk-adjusted basis, so let's see how the overnight trades compared to the intraday trades on the basis of their standard deviation.

We can use NumPy to calculate this for us as follows:

np.std(spy['Daily Change']) 

This generates the following output:

spy['Overnight Change'] = pd.Series(spy['Open'] - spy['Close'].shift(1)) 
 
np.std(spy['Overnight Change']) 

This generates the following output:

So our overnight trading not only had higher gains, but lower volatility as well, compared to the intraday trading. But not all volatility is created equal. Let's compare the mean change on downside days versus upside days for both strategies:

 spy[spy['Daily Change']<0]['Daily Change'].mean() 

This code generates the following output:

Run this code for upside days:

 spy[spy['Overnight Change']<0]['Overnight Change'].mean() 

We get the output as follows:

Again, we see that the average downside volatility is far less for our overnight trading strategy than our intraday trading strategy.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset