mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-16 17:48:05 +00:00
doc headers
This commit is contained in:
@@ -105,13 +105,13 @@ public class PacfValidationTests
|
||||
// For AR(1) process: x_t = φ*x_{t-1} + ε_t
|
||||
// PACF should be significant at lag 1 and cut off (near zero) after
|
||||
double phi = 0.7; // AR(1) coefficient
|
||||
var random = new Random(42);
|
||||
var random = new GBM(startPrice: 100.0, sigma: 1.0, seed: 42);
|
||||
var arProcess = new List<double> { 100.0 };
|
||||
|
||||
// Generate AR(1) process
|
||||
for (int i = 1; i < 500; i++)
|
||||
{
|
||||
double noise = random.NextDouble() * 2 - 1; // Small noise
|
||||
double noise = Math.Log(random.Next().Close / 100.0); // ~N(0, vol²*dt) noise
|
||||
double newValue = phi * arProcess[^1] + noise;
|
||||
arProcess.Add(newValue);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
# PACF: Partial Autocorrelation Function
|
||||
|
||||
| Property | Value |
|
||||
| ---------------- | -------------------------------- |
|
||||
| **Category** | Statistic |
|
||||
| **Inputs** | Source (close) |
|
||||
| **Parameters** | `period`, `lag` (default 1) |
|
||||
| **Outputs** | Single series (Pacf) |
|
||||
| **Output range** | Varies (see docs) |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
|
||||
- The Partial Autocorrelation Function (PACF) measures the correlation between a time series and its lagged values, after removing the effects of all...
|
||||
- Parameterized by `period`, `lag` (default 1).
|
||||
- Output range: Varies (see docs).
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
> "Strip away the intermediaries, and you'll see the true direct relationship."
|
||||
|
||||
The Partial Autocorrelation Function (PACF) measures the correlation between a time series and its lagged values, after removing the effects of all intermediate lags. While ACF shows total correlation at each lag, PACF isolates the direct correlation, making it essential for AR model identification.
|
||||
@@ -194,4 +211,4 @@ PACF is used in linear prediction and filter design, where the partial correlati
|
||||
- Box, G.E.P., Jenkins, G.M. (1970). *Time Series Analysis: Forecasting and Control*. Holden-Day.
|
||||
- Durbin, J. (1960). "The fitting of time series models." *Review of the International Statistical Institute*, 28, 233-243.
|
||||
- Levinson, N. (1946). "The Wiener RMS error criterion in filter design and prediction." *Journal of Mathematics and Physics*, 25, 261-278.
|
||||
- Hamilton, J.D. (1994). *Time Series Analysis*. Princeton University Press.
|
||||
- Hamilton, J.D. (1994). *Time Series Analysis*. Princeton University Press.
|
||||
|
||||
Reference in New Issue
Block a user