Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Gold Price VS. Market Volatility

Hi everyone,

We are Jennifer Jiang and Varisara Pongpairoj. We've been using Quantopian for the Quant Finance lectures run at the BU Finance and Investment Club.

Recently, we made a hypothesis test to see whether gold price return and market volatility have positive relationship or not We made an assumption that GLD tracks actual gold price. We also decided to calculate variance of S&P 500 returns within each 11 market opening days instead of VIX because we want more flexibility, for instance, we can freely choose any number of days to calculate market volatility. We partially referenced Preston Yadegar's Python code for "Interest Rates v. Market Volatility" (https://www.quantopian.com/posts/interest-rates-v-market-volatility). In addition, we also built a linear regression model for GLD price and market volatility, which is significant at alpha =0.1. We would like to get some feedback on our project.

We first did a regression with rolling GLD mean returns and rolling SPY variance over 1400 days. Then we tried method to test whether there is a relationship. We divided our data into two groups based on whether the gold price is increasing or decreasing and used the Levene Test to compare the variances of S&P 500 (market volatility) for GLD_returns>0 and GLD_returns<0.

Thanks a lot!

Jennifer and Varisara

2 responses

Good analysis process by using different testings.
Question 1. Several names are confusing. 1. The legend name of your first graph is better changed to "change % of the gold price" instead of gold interest rate. 2. Fed Fund rate is totally different from S&P 500 volatility.
Question 2: According to your hypothesis, you are meant to measure the correlation between the price of the gold and the volatility of S&P 500 so the first data set you need to pull out is the gold price, which is a upward trending line, instead of the gold price return. The second series of data you need to pull out is the each period's deviation of the S&P 500 instead of its return over time.
I may made mistake in my statement listed above since it is just my personal opinion and I did not attend all of the classes so if you have any suggestion or comment, just leave it below.

Hi Siqi,

Thank you for reading our codes and giving feedback. Sorry for the confusing comments and legends, we just fixed them. The reason why we use GLD return is because we want to divided our data into two groups based on whether the gold price is increasing or decreasing and then test the variances between two groups.

Thanks a lot!

Best,
Jennifer and Varisara