1
$\begingroup$

This is more of a generic question, but I'm sure it has a best answer/methodology which is what I'm trying to reach. I'm trying to figure out a solid line of thought when looking at a time series X and seeing if it can predict some stock prices. I've gone through a few threads on this site.

The problem statement can be thought of as follows: given the daily closing prices of a stock, let's say AAPL, and an arbitrary predictor time series $X$ that is also given daily at close. Is $X$ a good predictor of AAPL's movement and how far in the future does it predict the price?

Here's what I've resolved to doing:

  1. Split data into training/testing.

  2. In order to make the time series stationary, you do first differencing on both time series. (i.e. compute the percent change for each period)

  3. Compute pearson correlation across different lags of $X$, find the highest value.

  4. Find out if you're over-fitting or not by testing that lag with the test dataset.

  5. ???? How do i then use this information. Let's say pearson correlation is 0.45 with a p-value of 2e-9 on the test dataset. Is this good? not good enough? How do I then trade on this information?

I've read online about the Granger-Causality test, which sounds like it could help here. But I'm also just not sure about a lot of the assumptions I'm making here. Is percent-change the way to do it? What are the cutoffs for good vs. bad correlations? Also, there are very little posts I could find online that go past this point. I'm not sure what the intuition is here. If they're correlated, and $X$ is found to have the highest lag around 3 days before. Then what do i do?

TL;DR -

  • how do i best test causality/effectiveness of a given predictor series (transforming data+statistical tests)?

  • how do i find best lag for the test?

  • how do i then use this knowledge?

$\endgroup$

1 Answer 1

1
$\begingroup$

Probably the simplest place to start is to pick some binarized features and targets and stay very low dimensional. You can look at mutual information or other distributional estimates to test for causal linkages.

I think typically most causal network discovery is either a full sweep or some heuristic basiced on Lasso in higher dimensions.

Prado has a lot of heuristics for stationarity but I have always found it a bit unsatisfying from a core learning point of view. Feels like the need for stationarity should arise from out model of uncertainty and locality.

$\endgroup$
2
  • $\begingroup$ The given time series looks almost exactly the same as the price series except on a different scale. When I overlay both of them on separate y-axes, I get a very similar graph (correlation of 0.99). I'm not looking for any advanced Neural Network work here. I'm just asking for a basic linear correlation/causality $\endgroup$
    – Joe
    Commented Mar 16, 2020 at 20:03
  • $\begingroup$ So if this is 1d ... probably look at differencing or fractional differencing (see Prado's book) if you want to get fancy. The ACF can help too. Then use a few lags of the diffs and do some simple regressions. $\endgroup$
    – safetyduck
    Commented Mar 17, 2020 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.