Grey model forecasting (differential equations)

84 Views Asked by At

I'm many years removed from my last formal calculus class, but I've been making attempts recently to re-learn as much as possible in order to understand a few differential equation models, one of them being the "Grey Model" or GM(1,1). Here's a paper that introduces the concept (starting at the end of p. 4): Predicting changes in Bitcoin price using grey system theory.

The basic idea is to build a model for short time interval data using a differential equation and then solve for optimal coefficients given the data. The first piece is the data itself, which is assumed to be non-negative. The raw data is referred to as $X^0$ and indexed by $k$ where:

$$k = 1,2,3,...n$$ $$X^0 = x^0(1),x^0(2),x^0(3),...x^0(n)$$

The first step is to accumulate the data as a running sum at each step where:

$$x^1(k) = \sum^{k}_{i=1} x^0(i)$$ $$e.g.,\,\,\,\, X^0 = [1,1.2,1.5,1.2],\,\,\,\,\,\, X^1 = [1,2.2,3.7,4.9]$$

The next step is to formulate differential equations based on $X^1$. The paper includes continuous time and discretized versions, respectively:

$$\dfrac{dx^1(t)}{dt} + ax^1(t) = b$$ $$x^0(k) + az^1(k) = b$$

The $Z^1$ series used in the discretized formula above is defined as the average of each step $k$ in $X^1$ and the preceding step:

$$z^1(k) = \dfrac{1}{2}x^1(k-1) + \dfrac{1}{2}x^1(k)$$

The $a$ and $b$ coefficients are solved via least squares, which I'll skip for the sake of brevity (see the paper for this step). The solution is used to predict the next time step, $\hat{x}^1(k+1)$ and then $\hat{x}^0(k+1)$:

$$\hat{x}^1(k+1) = [x^0(1)-\dfrac{b}{a}]e^{-ak}+\dfrac{b}{a}$$ $$\hat{x}^0(k+1) = \hat{x}^1(k+1) - \hat{x}^1(k)$$

That should largely sum up the technique. I understand pieces of it and I've been able to determine with Python that it produces something that is at least somewhat reasonable, but I'm struggling with the intuition. So I have a number of high level questions (again, bear with me on the lack of knowledge):

  1. The accumulation phase of building $X^1$ seems to be a discrete analog of integration over a continuous range. Why is it that this is necessary rather than directly fitting an equation on the raw $X^0$ series? What's the advantage of this method compared to simply taking the log of the $X^0$ data and fitting a line?
  2. In the discretized version of the differential equation, the left hand side makes sense based on how $X^0$ and $X^1$ are defined as $x^0(k)$ is the exact difference between $x^1(k)$ and $x^1(k-1)$. However, I don't know why $z^1(k)$ in the discretized equation makes sense as a replacement for $x^1(t)$ from the continuous time version.
  3. I'm able to solve the continuous time differential equation into the form of: $$Ce^{-at} + \dfrac{b}{a}$$ What's the intuition for why $C$ takes the following value in the discretized version? $$C = x^0(1) - \dfrac{b}{a}$$
  4. Why does the solution include the term $e^{-ak}$ to predict $k+1$. Given that $k$ becomes an integer input in the solution, why are the $k$ terms not in alignment?

Any help or general comments are appreciated.