Friday 14 December 2018

Logit Regression on Overnight S&P500 Performance Impact on KLCI


We often hear that overnight US stocks performance might have an impact on KLCI the next day.  But how shall we quantify this?  A simple linear regression could be used to estimate the KLCI performance based on overnight Wall Street results.  However, the goodness-of-fit is usually poor. 

Chart 1 and Table 1 shows the regression plot and ANOVA table for overnight S&P500 and next day’s KLCI index performance using daily closing data from November 2015 to December 2018.  The R2 is low at 0.1237.  Nevertheless, the significant of the slope’s p-value suggests that there are positive correlation between S&P500 and KLCI.

Chart 1 
  

Table 1


Let’s ask the next question – what is the probability of the KLCI to close positively or negatively, given the performance of overnight S&P500?  To answer the question, we could use logistic regression (“logit”) to study the probability.  Logistic regression is used in various fields, including machine learning (Read more here).  It uses a logistic function to model a binary dependent variable.  The logistic function is constructed based on linear regression model.

Linear regression model is


In logit model, Y value is labelled as “1” if KLCI gain on the next day or labelled as “0” if KLCI loss on the next day.  X is the overnight S&P500 performance while b0 and b1 are the coefficients.

The probability of the function with given X value is

The coefficients are then estimated using Maximum Likelihood Estimation (MLE)

Table 2 shows the first 5 rows of the data and their respective equations while Table 3 is the summary of the logistic regression with the estimated coefficients.  The p-values show that the slope is significant but the intercept is not significant.  However, the impact of the intercept to the estimated probability is about 0.5%, which is relatively small, and also the condition where X = 0 is not modeled in this setup.

Table 2



Table 3

 

Now back to our question, what is the probability of the KLCI to close positively or negatively, given the performance of overnight S&P500?  Chart 2 is the probability of KLCI Gain/Loss on next day given overnight S&P500 performance.  The probability distribution shows that if overnight S&P500 gained 5%, it is almost 99% sure that KLCI will gain on the following day.  If overnight S&P500 gained 1%, the chance for KLCI to gain on the next day is around 70%.  What if overnight S&P500 loss 2%?  Then the probability of KLCI to close positively on the following day would be around 15%.

Chart 2




2 comments:

  1. Some days in Malaysia and USA are holidays (missing data). Are you creating dummy values for these missing data?

    ReplyDelete
    Replies
    1. Very sharp observation! I deleted the holiday data, either US or Malaysia. The analysis only compare back to back trading day.

      Delete