SPB Git

Repository Public

garch-volatility.ts 34.8 KB 339 lines typescript

1import type { Locale, SheetInput } from "@/schema";2import type { TemplateDef } from "../types";3import { T, doiSource, r, round } from "./shared";45/** Variance forecast of a GARCH(1,1), in units of the unconditional variance: 1 + rho^(h-1) (s1 - 1). */6const forecastPath = (rho: number, start: number) =>7  Array.from({ length: 30 }, (_, i) => ({ x: 1 + i * 2, y: round(1 + rho ** (i * 2) * (start - 1), 4) }));89function build(locale: Locale): SheetInput {10  const t = T(locale);11  return {12    schemaVersion: 1,13    metadata: {14      title: t("Le modèle GARCH(1,1) et la dynamique de la volatilité", "The GARCH(1,1) model and volatility dynamics"),15      locale,16      summary: t(17        "Comment une récurrence à trois paramètres reproduit les grappes de volatilité des rendements financiers, à quelles conditions elle est stationnaire et comment on l'estime par quasi-maximum de vraisemblance.",18        "How a three-parameter recursion reproduces the volatility clustering of financial returns, when it is stationary, and how it is estimated by quasi-maximum likelihood.",19      ),20      topics: [t("Économétrie", "Econometrics"), "Finance", t("Séries temporelles", "Time series")],21      tags: ["GARCH", "ARCH", t("volatilité", "volatility"), t("variance conditionnelle", "conditional variance"), t("quasi-maximum de vraisemblance", "quasi-maximum likelihood")],22      level: "intermediate",23      kind: "explainer",24      objectives: [25        t("Écrire la récurrence de variance conditionnelle d'un GARCH(1,1) et interpréter $\\omega$, $\\alpha$ et $\\beta$.", "Write the conditional variance recursion of a GARCH(1,1) and interpret $\\omega$, $\\alpha$ and $\\beta$."),26        t("Relier la persistance $\\alpha+\\beta$ à la variance inconditionnelle, à la demi-vie d'un choc et à la prévision de variance.", "Relate the persistence $\\alpha+\\beta$ to the unconditional variance, the half-life of a shock and the variance forecast."),27        t("Énoncer les contraintes de positivité et de stationnarité, et distinguer stationnarité au second ordre et stationnarité stricte.", "State the positivity and stationarity constraints, and tell covariance stationarity from strict stationarity."),28        t("Décrire l'estimation par quasi-maximum de vraisemblance et le rôle des écarts-types robustes.", "Describe quasi-maximum likelihood estimation and the role of robust standard errors."),29      ],30      example: true,31    },32    theme: { preset: "finance", accent: "teal" },33    blocks: [34      { id: "title", type: "heading", level: 1, eyebrow: t("Économétrie financière", "Financial econometrics"), text: t("Le modèle GARCH(1,1) et la dynamique de la volatilité", "The GARCH(1,1) model and volatility dynamics") },35      {36        id: "lead", type: "paragraph", lead: true,37        text: t(38          "Les rendements financiers sont presque imprévisibles en niveau, mais leur **amplitude** ne l'est pas : les périodes agitées suivent les périodes agitées. Le modèle ARCH d'Engle[^engle-1982], généralisé en GARCH par Bollerslev[^bollerslev-1986], décrit ce phénomène en faisant de la variance d'aujourd'hui une fonction du choc et de la variance d'hier.",39          "Financial returns are close to unpredictable in level, but their **magnitude** is not: turbulent periods follow turbulent periods. Engle's ARCH model[^engle-1982], generalised to GARCH by Bollerslev[^bollerslev-1986], captures this by making today's variance a function of yesterday's shock and yesterday's variance.",40        ),41      },4243      { id: "sec-model", type: "heading", level: 2, eyebrow: t("Le modèle", "The model"), text: t("Trois paramètres, une récurrence", "Three parameters, one recursion") },44      {45        id: "eq-return", type: "equation", span: 6, label: t("Rendement et innovation", "Return and innovation"),46        latex: r`r_t = \mu + \varepsilon_t, \qquad \varepsilon_t = \sigma_t\, z_t, \qquad z_t \overset{\text{i.i.d.}}{\sim} (0,\,1)`,47        explanation: t(48          "Le choc $\\varepsilon_t$ est un bruit standardisé $z_t$ mis à l'échelle par l'écart-type conditionnel $\\sigma_t$, connu dès la date $t-1$.",49          "The shock $\\varepsilon_t$ is a standardised noise $z_t$ scaled by the conditional standard deviation $\\sigma_t$, which is known at date $t-1$.",50        ),51        variables: [52          { symbol: r`r_t`, meaning: t("rendement (logarithmique) de la période $t$", "(log) return over period $t$"), unit: t("% par période", "% per period") },53          { symbol: r`\mu`, meaning: t("moyenne conditionnelle, ici constante", "conditional mean, constant here") },54          { symbol: r`\varepsilon_t`, meaning: t("innovation : rendement non anticipé", "innovation: unexpected return") },55          { symbol: r`\sigma_t`, meaning: t("écart-type conditionnel (volatilité), fonction de l'information en $t-1$", "conditional standard deviation (volatility), a function of information at $t-1$") },56          { symbol: r`z_t`, meaning: t("bruit i.i.d. de moyenne nulle et de variance unitaire", "i.i.d. noise with zero mean and unit variance") },57        ],58      },59      {60        id: "eq-variance", type: "equation", span: 6, label: t("Variance conditionnelle GARCH(1,1)", "GARCH(1,1) conditional variance"), sourceIds: ["bollerslev-1986"],61        latex: r`\sigma_t^2 = \omega + \alpha\,\varepsilon_{t-1}^2 + \beta\,\sigma_{t-1}^2`,62        explanation: t(63          "La variance d'aujourd'hui combine un niveau de base, la **nouvelle** d'hier (choc au carré) et la **mémoire** de la variance d'hier. Avec $\\beta=0$ on retrouve l'ARCH(1).",64          "Today's variance combines a baseline level, yesterday's **news** (squared shock) and the **memory** of yesterday's variance. Setting $\\beta=0$ gives back ARCH(1).",65        ),66        variables: [67          { symbol: r`\sigma_t^2`, meaning: t("variance conditionnelle de $\\varepsilon_t$ sachant le passé", "conditional variance of $\\varepsilon_t$ given the past"), unit: t("%² par période", "%² per period") },68          { symbol: r`\omega`, meaning: t("constante, $\\omega>0$", "intercept, $\\omega>0$") },69          { symbol: r`\alpha`, meaning: t("réaction au choc de la veille (effet ARCH), $\\alpha\\ge 0$", "reaction to the previous shock (ARCH effect), $\\alpha\\ge 0$") },70          { symbol: r`\beta`, meaning: t("inertie de la variance (effet GARCH), $\\beta\\ge 0$", "inertia of the variance (GARCH effect), $\\beta\\ge 0$") },71        ],72      },73      {74        id: "diagram-recursion", type: "diagram", span: 8, kind: "flow", direction: "LR", routing: "curved",75        title: t("La boucle de rétroaction de la volatilité", "The volatility feedback loop"),76        caption: t(77          "À chaque date, la variance est calculée à partir du passé, puis un choc est tiré ; ce choc et cette variance alimentent la date suivante.",78          "At each date the variance is computed from the past, then a shock is drawn; that shock and that variance feed the next date.",79        ),80        alt: t(81          "Schéma en boucle : la constante oméga, le choc au carré de la veille pondéré par alpha et la variance de la veille pondérée par bêta s'additionnent pour former la variance conditionnelle du jour ; celle-ci met à l'échelle un bruit standardisé pour produire l'innovation et le rendement ; l'innovation au carré et la variance repartent vers la date suivante. Un second groupe montre l'estimation : rendements observés, vraisemblance gaussienne, optimisation, paramètres estimés et écarts-types robustes.",82          "Loop diagram: the constant omega, yesterday's squared shock weighted by alpha and yesterday's variance weighted by beta add up to today's conditional variance; that variance scales a standardised noise to produce the innovation and the return; the squared innovation and the variance flow back to the next date. A second group shows estimation: observed returns, Gaussian likelihood, optimisation, estimated parameters and robust standard errors.",83        ),84        groups: [85          { id: "g-past", label: t("Information en t−1", "Information at t−1"), tone: "neutral" },86          { id: "g-now", label: t("Date t", "Date t"), tone: "teal" },87          { id: "g-est", label: t("Estimation", "Estimation"), tone: "violet" },88        ],89        nodes: [90          { id: "n-omega", label: "ω", sublabel: t("niveau de base", "baseline level"), shape: "pill", tone: "neutral", group: "g-past" },91          { id: "n-eps-lag", label: "ε²(t−1)", sublabel: t("nouvelle d'hier", "yesterday's news"), shape: "round", tone: "amber", group: "g-past" },92          { id: "n-sig-lag", label: "σ²(t−1)", sublabel: t("variance d'hier", "yesterday's variance"), shape: "round", tone: "blue", group: "g-past" },93          { id: "n-sig", label: "σ²(t)", sublabel: t("variance conditionnelle", "conditional variance"), shape: "hexagon", tone: "teal", icon: "sigma", group: "g-now" },94          { id: "n-z", label: "z(t)", sublabel: t("bruit i.i.d. (0, 1)", "i.i.d. noise (0, 1)"), shape: "circle", tone: "neutral", group: "g-now" },95          { id: "n-eps", label: "ε(t) = σ(t)·z(t)", sublabel: t("innovation", "innovation"), shape: "round", tone: "amber", group: "g-now" },96          { id: "n-ret", label: "r(t) = μ + ε(t)", sublabel: t("rendement observé", "observed return"), shape: "rect", tone: "green", icon: "trend", group: "g-now" },97          { id: "n-data", label: t("Rendements r(1)…r(T)", "Returns r(1)…r(T)"), shape: "cylinder", tone: "green", icon: "database", group: "g-est" },98          { id: "n-lik", label: t("Quasi-vraisemblance gaussienne", "Gaussian quasi-likelihood"), shape: "round", tone: "violet", icon: "function", group: "g-est" },99          { id: "n-opt", label: t("Maximisation numérique", "Numerical maximisation"), sublabel: t("sous contraintes", "under constraints"), shape: "round", tone: "violet", icon: "gear", group: "g-est" },100          { id: "n-theta", label: t("ω, α, β estimés", "Estimated ω, α, β"), sublabel: t("écarts-types robustes", "robust standard errors"), shape: "rect", tone: "violet", icon: "check", group: "g-est" },101        ],102        edges: [103          { id: "e-omega", from: "n-omega", to: "n-sig", label: "+ ω", tone: "neutral" },104          { id: "e-alpha", from: "n-eps-lag", to: "n-sig", label: "× α", tone: "amber" },105          { id: "e-beta", from: "n-sig-lag", to: "n-sig", label: "× β", tone: "blue" },106          { id: "e-scale", from: "n-sig", to: "n-eps", label: t("met à l'échelle", "scales"), tone: "teal" },107          { id: "e-z", from: "n-z", to: "n-eps", tone: "neutral" },108          { id: "e-ret", from: "n-eps", to: "n-ret", tone: "green" },109          { id: "e-fb-eps", from: "n-eps", to: "n-eps-lag", label: t("au carré → t+1", "squared → t+1"), style: "dashed", tone: "amber" },110          { id: "e-fb-sig", from: "n-sig", to: "n-sig-lag", label: "→ t+1", style: "dashed", tone: "blue" },111          { id: "e-obs", from: "n-ret", to: "n-data", label: t("observé", "observed"), style: "dotted", tone: "green" },112          { id: "e-lik", from: "n-data", to: "n-lik", tone: "violet" },113          { id: "e-opt", from: "n-lik", to: "n-opt", tone: "violet" },114          { id: "e-theta", from: "n-opt", to: "n-theta", tone: "violet" },115        ],116        legend: [117          { label: t("Flèche pleine : calcul à la date t", "Solid arrow: computation at date t"), tone: "teal", shape: "arrow" },118          { label: t("Flèche tiretée : report vers la date suivante", "Dashed arrow: carried over to the next date"), tone: "blue", shape: "dashed" },119          { label: t("Ambre : canal du choc (α)", "Amber: shock channel (α)"), tone: "amber", shape: "square" },120          { label: t("Bleu : canal de la mémoire (β)", "Blue: memory channel (β)"), tone: "blue", shape: "square" },121          { label: t("Violet : estimation à partir des données", "Violet: estimation from the data"), tone: "violet", shape: "square" },122        ],123      },124      {125        id: "cards-params", type: "cards", span: 4, columns: 2,126        items: [127          { icon: "scale", title: "ω", badge: t("niveau", "level"), tone: "neutral", text: t("Fixe, avec $\\alpha+\\beta$, le niveau moyen de la variance. Doit être strictement positif.", "Sets, together with $\\alpha+\\beta$, the average level of the variance. Must be strictly positive.") },128          { icon: "bolt", title: "α", badge: t("réaction", "reaction"), tone: "amber", text: t("Force avec laquelle un choc récent relève la variance. Un $\\alpha$ élevé donne une volatilité nerveuse.", "How strongly a recent shock lifts the variance. A high $\\alpha$ gives a jumpy volatility.") },129          { icon: "memory", title: "β", badge: t("mémoire", "memory"), tone: "blue", text: t("Part de la variance d'hier reconduite aujourd'hui. Un $\\beta$ élevé donne une volatilité lisse.", "Share of yesterday's variance carried into today. A high $\\beta$ gives a smooth volatility.") },130          { icon: "clock", title: "α + β", badge: t("persistance", "persistence"), tone: "teal", text: t("Vitesse à laquelle un choc de variance s'efface. Proche de 1 : les épisodes de turbulence durent.", "How fast a variance shock dies out. Close to 1: turbulent episodes last.") },131        ],132      },133134      { id: "sec-dynamics", type: "heading", level: 2, eyebrow: t("Dynamique", "Dynamics"), text: t("Persistance, variance de long terme et retour à la moyenne", "Persistence, long-run variance and mean reversion") },135      {136        id: "eq-uncond", type: "equation", span: 6, label: t("Variance inconditionnelle", "Unconditional variance"), sourceIds: ["bollerslev-1986"],137        latex: r`\bar\sigma^2 \;=\; \mathbb{E}\!\left[\varepsilon_t^2\right] \;=\; \frac{\omega}{1-\alpha-\beta}, \qquad \alpha+\beta<1`,138        explanation: t(139          "On prend l'espérance de la récurrence en utilisant $\\mathbb{E}[\\varepsilon_{t-1}^2]=\\mathbb{E}[\\sigma_{t-1}^2]=\\bar\\sigma^2$. La formule n'a de sens que si $\\alpha+\\beta<1$.",140          "Take expectations of the recursion using $\\mathbb{E}[\\varepsilon_{t-1}^2]=\\mathbb{E}[\\sigma_{t-1}^2]=\\bar\\sigma^2$. The formula only makes sense when $\\alpha+\\beta<1$.",141        ),142        variables: [143          { symbol: r`\bar\sigma^2`, meaning: t("variance de long terme vers laquelle $\\sigma_t^2$ revient", "long-run variance towards which $\\sigma_t^2$ reverts"), unit: t("%² par période", "%² per period") },144          { symbol: r`\alpha+\beta`, meaning: t("persistance de la variance", "persistence of the variance") },145        ],146      },147      {148        id: "eq-forecast", type: "equation", span: 6, label: t("Prévision à l'horizon h", "Forecast at horizon h"), derivation: "derived",149        latex: r`\mathbb{E}_t\!\left[\sigma_{t+h}^2\right] = \bar\sigma^2 + (\alpha+\beta)^{\,h-1}\left(\sigma_{t+1}^2-\bar\sigma^2\right), \qquad h_{1/2} = \frac{\ln(1/2)}{\ln(\alpha+\beta)}`,150        explanation: t(151          "Obtenu en itérant $\\mathbb{E}_t[\\sigma_{t+h}^2]=\\omega+(\\alpha+\\beta)\\,\\mathbb{E}_t[\\sigma_{t+h-1}^2]$. L'écart à la variance de long terme décroît géométriquement ; $h_{1/2}$ est le nombre de périodes au bout duquel il est divisé par deux.",152          "Obtained by iterating $\\mathbb{E}_t[\\sigma_{t+h}^2]=\\omega+(\\alpha+\\beta)\\,\\mathbb{E}_t[\\sigma_{t+h-1}^2]$. The gap to the long-run variance decays geometrically; $h_{1/2}$ is the number of periods after which it is halved.",153        ),154        variables: [155          { symbol: r`\mathbb{E}_t[\cdot]`, meaning: t("espérance conditionnelle à l'information disponible en $t$", "expectation conditional on information available at $t$") },156          { symbol: r`\sigma_{t+1}^2`, meaning: t("variance du lendemain, connue en $t$", "next-period variance, known at $t$") },157          { symbol: r`h`, meaning: t("horizon de prévision", "forecast horizon"), unit: t("périodes", "periods") },158          { symbol: r`h_{1/2}`, meaning: t("demi-vie d'un choc de variance", "half-life of a variance shock"), unit: t("périodes", "periods") },159        ],160      },161      {162        id: "chart-forecast", type: "chart", span: 8, kind: "line", dataKind: "illustrative",163        title: t("Retour de la variance prévue vers son niveau de long terme", "Forecast variance reverting to its long-run level"),164        caption: t(165          "Courbes calculées avec la formule de prévision, pour une variance de départ égale à trois fois la variance de long terme (normalisée à 1). Valeurs choisies pour illustrer la forme, non estimées sur des données.",166          "Curves computed from the forecast formula, starting from a variance three times the long-run variance (normalised to 1). Values chosen to show the shape, not estimated from data.",167        ),168        alt: t(169          "Deux courbes décroissantes partant de 3 et convergeant vers 1. Avec une persistance de 0,90 la courbe est presque revenue à 1 après une trentaine de périodes ; avec une persistance de 0,98 elle est encore proche de 1,6 à l'horizon 59.",170          "Two decreasing curves starting at 3 and converging to 1. With a persistence of 0.90 the curve is almost back to 1 after about thirty periods; with a persistence of 0.98 it is still near 1.6 at horizon 59.",171        ),172        x: { label: t("Horizon de prévision h", "Forecast horizon h"), unit: t("périodes", "periods"), min: 1, max: 59 },173        y: { label: t("Variance prévue / variance de long terme", "Forecast variance / long-run variance"), min: 0.8, max: 3.2 },174        series: [175          { name: "α + β = 0,90".replace(",", locale === "fr" ? "," : "."), tone: "teal", points: forecastPath(0.9, 3) },176          { name: "α + β = 0,98".replace(",", locale === "fr" ? "," : "."), tone: "amber", points: forecastPath(0.98, 3) },177        ],178        annotations: [{ y: 1, label: t("variance de long terme", "long-run variance") }],179      },180      {181        id: "callout-clustering", type: "callout", span: 4, tone: "definition", title: t("Grappes de volatilité", "Volatility clustering"),182        text: t(183          "On parle de **grappes de volatilité** lorsque les grandes variations de prix tendent à être suivies de grandes variations, de signe quelconque, et les petites de petites. Dans un GARCH(1,1), les rendements ne sont pas autocorrélés, mais leurs carrés le sont : $\\varepsilon_t^2$ suit un ARMA(1,1) de coefficient autorégressif $\\alpha+\\beta$[^bollerslev-1986].",184          "**Volatility clustering** means that large price changes tend to be followed by large changes, of either sign, and small ones by small ones. In a GARCH(1,1), returns are not autocorrelated but their squares are: $\\varepsilon_t^2$ follows an ARMA(1,1) with autoregressive coefficient $\\alpha+\\beta$[^bollerslev-1986].",185        ),186      },187      {188        id: "sim-garch", type: "simulation", kind: "garch", params: { omega: 0.05, alpha: 0.08, beta: 0.9, n: 400 }, config: {}, seed: 7,189        title: t("Simuler une trajectoire GARCH(1,1)", "Simulate a GARCH(1,1) path"),190        caption: t(191          "Données synthétiques : rendements tirés du modèle avec les paramètres choisis et une graine fixe. Rapprochez $\\alpha+\\beta$ de 1 pour voir les grappes s'allonger.",192          "Synthetic data: returns drawn from the model with the chosen parameters and a fixed seed. Move $\\alpha+\\beta$ towards 1 to see the clusters lengthen.",193        ),194        alt: t(195          "Simulation interactive : une série de rendements simulés et, en dessous, la volatilité conditionnelle correspondante avec son niveau de long terme ; des curseurs règlent oméga, alpha, bêta et le nombre de périodes, et les périodes de forte amplitude apparaissent regroupées.",196          "Interactive simulation: a series of simulated returns and, below it, the matching conditional volatility with its long-run level; sliders set omega, alpha, beta and the number of periods, and high-amplitude periods appear grouped together.",197        ),198      },199200      { id: "sec-constraints", type: "heading", level: 2, eyebrow: t("Conditions", "Conditions"), text: t("Positivité et stationnarité", "Positivity and stationarity") },201      {202        id: "table-constraints", type: "table", span: 8, headerColumn: true,203        caption: t("Contraintes sur les paramètres d'un GARCH(1,1) et ce qu'elles garantissent.", "Parameter constraints of a GARCH(1,1) and what they guarantee."),204        columns: [{ label: t("Propriété", "Property") }, { label: t("Condition", "Condition") }, { label: t("Conséquence", "Consequence") }],205        rows: [206          [t("Positivité", "Positivity"), r`$\omega>0,\ \alpha\ge 0,\ \beta\ge 0$`, t("$\\sigma_t^2>0$ à chaque date, quelle que soit la trajectoire des chocs.", "$\\sigma_t^2>0$ at every date, whatever the path of shocks.")],207          [t("Stationnarité au second ordre", "Covariance stationarity"), r`$\alpha+\beta<1$`, t("Variance inconditionnelle finie $\\omega/(1-\\alpha-\\beta)$ ; les prévisions de variance convergent[^bollerslev-1986].", "Finite unconditional variance $\\omega/(1-\\alpha-\\beta)$; variance forecasts converge[^bollerslev-1986].")],208          [t("Stationnarité stricte", "Strict stationarity"), r`$\mathbb{E}\!\left[\ln(\beta+\alpha z_t^2)\right]<0$`, t("Condition plus faible que la précédente : elle admet $\\alpha+\\beta\\ge 1$[^nelson-1990].", "Weaker than the previous condition: it allows $\\alpha+\\beta\\ge 1$[^nelson-1990].")],209          [t("Moment d'ordre 4 fini ($z_t$ gaussien)", "Finite fourth moment (Gaussian $z_t$)"), r`$3\alpha^2+2\alpha\beta+\beta^2<1$`, t("Kurtosis $3\\,\\dfrac{1-(\\alpha+\\beta)^2}{1-(\\alpha+\\beta)^2-2\\alpha^2}>3$ : queues plus épaisses que la loi normale[^bollerslev-1986].", "Kurtosis $3\\,\\dfrac{1-(\\alpha+\\beta)^2}{1-(\\alpha+\\beta)^2-2\\alpha^2}>3$: tails fatter than the normal distribution[^bollerslev-1986].")],210        ],211      },212      {213        id: "callout-igarch", type: "callout", span: 4, tone: "warning", title: t("Le cas limite α + β = 1", "The boundary case α + β = 1"),214        text: t(215          "Lorsque $\\alpha+\\beta=1$ (GARCH intégré, ou IGARCH), la variance inconditionnelle est infinie et un choc de variance ne s'efface jamais des prévisions. Le processus reste pourtant **strictement stationnaire** lorsque $\\omega>0$[^nelson-1990] : « persistance infinie » en espérance ne veut pas dire trajectoire explosive.",216          "When $\\alpha+\\beta=1$ (integrated GARCH, or IGARCH), the unconditional variance is infinite and a variance shock never fades from the forecasts. Yet the process remains **strictly stationary** when $\\omega>0$[^nelson-1990]: \"infinite persistence\" in expectation does not mean an explosive path.",217        ),218      },219220      { id: "sec-estimation", type: "heading", level: 2, eyebrow: t("Estimation", "Estimation"), text: t("Quasi-maximum de vraisemblance", "Quasi-maximum likelihood") },221      {222        id: "eq-qml", type: "equation", span: 6, label: t("Quasi-log-vraisemblance gaussienne", "Gaussian quasi-log-likelihood"), sourceIds: ["bollerslev-wooldridge-1992"],223        latex: r`\hat\theta = \arg\max_{\theta}\; \sum_{t=1}^{T} \ell_t(\theta), \qquad \ell_t(\theta) = -\frac{1}{2}\left[\ln(2\pi) + \ln \sigma_t^2(\theta) + \frac{\varepsilon_t^2(\theta)}{\sigma_t^2(\theta)}\right]`,224        explanation: t(225          "On maximise la vraisemblance **comme si** $z_t$ était gaussien. Si la moyenne et la variance conditionnelles sont bien spécifiées, l'estimateur reste convergent même lorsque $z_t$ ne l'est pas ; seuls les écarts-types doivent être corrigés[^bollerslev-wooldridge-1992].",226          "The likelihood is maximised **as if** $z_t$ were Gaussian. If the conditional mean and variance are correctly specified, the estimator remains consistent even when $z_t$ is not; only the standard errors need correcting[^bollerslev-wooldridge-1992].",227        ),228        variables: [229          { symbol: r`\theta`, meaning: t("vecteur des paramètres $(\\mu,\\omega,\\alpha,\\beta)$", "parameter vector $(\\mu,\\omega,\\alpha,\\beta)$") },230          { symbol: r`\ell_t(\theta)`, meaning: t("contribution de l'observation $t$ à la log-vraisemblance", "contribution of observation $t$ to the log-likelihood") },231          { symbol: r`\varepsilon_t(\theta)`, meaning: t("résidu $r_t-\\mu$", "residual $r_t-\\mu$") },232          { symbol: r`\sigma_t^2(\theta)`, meaning: t("variance obtenue en déroulant la récurrence depuis une valeur initiale", "variance obtained by running the recursion from a starting value") },233          { symbol: r`T`, meaning: t("nombre d'observations", "number of observations") },234        ],235      },236      {237        id: "steps-estimation", type: "steps", span: 6,238        items: [239          { icon: "filter", title: t("Filtrer la moyenne", "Filter the mean"), text: t("Calculer les résidus $\\varepsilon_t=r_t-\\mu$ (ou ceux d'un modèle de moyenne plus riche).", "Compute the residuals $\\varepsilon_t=r_t-\\mu$ (or those of a richer mean model).") },240          { icon: "arrows", title: t("Initialiser et dérouler la récurrence", "Initialise and run the recursion"), text: t("Fixer $\\sigma_1^2$, par exemple à la variance empirique des résidus, puis calculer $\\sigma_t^2$ de proche en proche.", "Set $\\sigma_1^2$, for instance to the sample variance of the residuals, then compute $\\sigma_t^2$ recursively.") },241          { icon: "function", title: t("Maximiser la quasi-vraisemblance", "Maximise the quasi-likelihood"), text: t("Optimisation numérique sous les contraintes $\\omega>0$, $\\alpha,\\beta\\ge 0$.", "Numerical optimisation under the constraints $\\omega>0$, $\\alpha,\\beta\\ge 0$.") },242          { icon: "shield", title: t("Écarts-types robustes", "Robust standard errors"), text: t("Utiliser la matrice de covariance « sandwich » de Bollerslev et Wooldridge, valide sans normalité[^bollerslev-wooldridge-1992].", "Use the Bollerslev–Wooldridge \"sandwich\" covariance matrix, valid without normality[^bollerslev-wooldridge-1992].") },243          { icon: "search", title: t("Diagnostiquer", "Check"), text: t("Les résidus standardisés $\\hat z_t=\\hat\\varepsilon_t/\\hat\\sigma_t$ et leurs carrés ne doivent plus être autocorrélés.", "Standardised residuals $\\hat z_t=\\hat\\varepsilon_t/\\hat\\sigma_t$ and their squares should no longer be autocorrelated.") },244        ],245      },246      {247        id: "callout-assumption", type: "callout", tone: "assumption", title: t("Ce que le GARCH(1,1) suppose", "What GARCH(1,1) assumes"),248        text: t(249          "La variance réagit au **carré** du choc : une hausse et une baisse de même ampleur ont le même effet. Le modèle de base ne capte donc pas l'asymétrie souvent observée sur les actions ; des extensions (EGARCH, GJR-GARCH, entre autres) ont été proposées pour cela[^francq-zakoian-2019].",250          "The variance reacts to the **squared** shock: a rise and a fall of the same size have the same effect. The baseline model therefore misses the asymmetry often observed in equities; extensions (EGARCH, GJR-GARCH, among others) were proposed for it[^francq-zakoian-2019].",251        ),252      },253254      { id: "sec-check", type: "heading", level: 2, eyebrow: t("À retenir", "Takeaways"), text: t("Vérifier sa compréhension", "Check your understanding") },255      {256        id: "quiz-persistence", type: "quiz", span: 6,257        question: t(258          "Un GARCH(1,1) a pour paramètres $\\omega=0{,}02$, $\\alpha=0{,}08$ et $\\beta=0{,}90$. Quelle est sa variance inconditionnelle ?",259          "A GARCH(1,1) has parameters $\\omega=0.02$, $\\alpha=0.08$ and $\\beta=0.90$. What is its unconditional variance?",260        ),261        choices: [262          { text: "1", correct: true, explanation: t("$\\omega/(1-\\alpha-\\beta)=0{,}02/0{,}02=1$.", "$\\omega/(1-\\alpha-\\beta)=0.02/0.02=1$.") },263          { text: t("0,02", "0.02"), correct: false, explanation: t("C'est $\\omega$, la constante de la récurrence, non la variance de long terme.", "That is $\\omega$, the intercept of the recursion, not the long-run variance.") },264          { text: t("0,98", "0.98"), correct: false, explanation: t("C'est la persistance $\\alpha+\\beta$.", "That is the persistence $\\alpha+\\beta$.") },265          { text: t("Elle est infinie", "It is infinite"), correct: false, explanation: t("Elle ne serait infinie que si $\\alpha+\\beta\\ge 1$.", "It would be infinite only if $\\alpha+\\beta\\ge 1$.") },266        ],267      },268      {269        id: "accordion-mistakes", type: "accordion", span: 6,270        items: [271          {272            title: t("Confondre variance conditionnelle et variance inconditionnelle", "Confusing conditional and unconditional variance"),273            text: t(274              "$\\sigma_t^2$ change à chaque date et dépend du passé ; $\\bar\\sigma^2$ est une constante. Un GARCH stationnaire est **homoscédastique inconditionnellement** et hétéroscédastique conditionnellement.",275              "$\\sigma_t^2$ changes at every date and depends on the past; $\\bar\\sigma^2$ is a constant. A stationary GARCH is **unconditionally homoskedastic** and conditionally heteroskedastic.",276            ),277          },278          {279            title: t("Croire que le modèle prévoit le signe des rendements", "Believing the model predicts the sign of returns"),280            text: t(281              "Le GARCH décrit l'amplitude attendue, pas la direction : $\\mathbb{E}_{t-1}[\\varepsilon_t]=0$ quelle que soit $\\sigma_t$.",282              "GARCH describes the expected magnitude, not the direction: $\\mathbb{E}_{t-1}[\\varepsilon_t]=0$ whatever $\\sigma_t$.",283            ),284          },285          {286            title: t("Lire α + β ≥ 1 comme une trajectoire explosive", "Reading α + β ≥ 1 as an explosive path"),287            text: t(288              "La condition $\\alpha+\\beta<1$ porte sur l'existence de la variance. La stationnarité stricte obéit à une condition plus faible[^nelson-1990].",289              "The condition $\\alpha+\\beta<1$ is about the existence of the variance. Strict stationarity obeys a weaker condition[^nelson-1990].",290            ),291          },292          {293            title: t("Utiliser les écarts-types du maximum de vraisemblance gaussien sans correction", "Using Gaussian maximum-likelihood standard errors uncorrected"),294            text: t(295              "Si les innovations standardisées ne sont pas gaussiennes, l'inverse de la hessienne n'estime plus correctement la variance de l'estimateur : il faut la forme robuste[^bollerslev-wooldridge-1992].",296              "If the standardised innovations are not Gaussian, the inverse Hessian no longer estimates the variance of the estimator correctly: the robust form is required[^bollerslev-wooldridge-1992].",297            ),298          },299          {300            title: t("Oublier l'unité de temps", "Forgetting the time unit"),301            text: t(302              "Les paramètres dépendent de la fréquence d'observation : un GARCH estimé sur des rendements quotidiens ne s'applique pas tel quel à des rendements mensuels.",303              "Parameters depend on the sampling frequency: a GARCH estimated on daily returns does not apply as is to monthly returns.",304            ),305          },306        ],307      },308      { id: "refs", type: "references", title: t("Références", "References") },309    ],310    sources: [311      doiSource("engle-1982", "article", "Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation", ["Robert F. Engle"], 1982, "Econometrica, 50(4), 987", "10.2307/1912773"),312      doiSource("bollerslev-1986", "article", "Generalized autoregressive conditional heteroskedasticity", ["Tim Bollerslev"], 1986, "Journal of Econometrics, 31(3), 307–327", "10.1016/0304-4076(86)90063-1"),313      doiSource("nelson-1990", "article", "Stationarity and Persistence in the GARCH(1,1) Model", ["Daniel B. Nelson"], 1990, "Econometric Theory, 6(3), 318–334", "10.1017/S0266466600005296"),314      doiSource("bollerslev-wooldridge-1992", "article", "Quasi-maximum likelihood estimation and inference in dynamic models with time-varying covariances", ["Tim Bollerslev", "Jeffrey M. Wooldridge"], 1992, "Econometric Reviews, 11(2), 143–172", "10.1080/07474939208800229"),315      doiSource("francq-zakoian-2019", "book", "GARCH Models", ["Christian Francq", "Jean-Michel Zakoian"], 2019, "Wiley", "10.1002/9781119313472"),316    ],317    claims: [318      { id: "c-arch", text: t("Le modèle ARCH a été introduit par Engle (1982) et généralisé en GARCH par Bollerslev (1986).", "The ARCH model was introduced by Engle (1982) and generalised to GARCH by Bollerslev (1986)."), status: "sourced", sourceIds: ["engle-1982", "bollerslev-1986"], blockId: "lead" },319      { id: "c-recursion", text: t("La variance conditionnelle d'un GARCH(1,1) suit σ²(t) = ω + α ε²(t−1) + β σ²(t−1).", "The conditional variance of a GARCH(1,1) follows σ²(t) = ω + α ε²(t−1) + β σ²(t−1)."), status: "sourced", sourceIds: ["bollerslev-1986"], blockId: "eq-variance" },320      { id: "c-uncond", text: t("Si α + β < 1, le processus est stationnaire au second ordre et sa variance inconditionnelle vaut ω / (1 − α − β).", "If α + β < 1 the process is covariance stationary with unconditional variance ω / (1 − α − β)."), status: "sourced", sourceIds: ["bollerslev-1986"], blockId: "eq-uncond" },321      { id: "c-forecast", text: t("L'écart de la variance prévue à la variance de long terme décroît au taux géométrique α + β.", "The gap between the forecast variance and the long-run variance decays at the geometric rate α + β."), status: "derived", sourceIds: ["bollerslev-1986"], blockId: "eq-forecast" },322      { id: "c-strict", text: t("La stationnarité stricte du GARCH(1,1) requiert E[ln(β + α z²)] < 0, condition satisfaite par l'IGARCH avec ω > 0.", "Strict stationarity of GARCH(1,1) requires E[ln(β + α z²)] < 0, which holds for IGARCH with ω > 0."), status: "sourced", sourceIds: ["nelson-1990"], blockId: "table-constraints" },323      { id: "c-kurtosis", text: t("Avec des innovations gaussiennes, le moment d'ordre 4 existe si 3α² + 2αβ + β² < 1 et la kurtosis dépasse alors 3.", "With Gaussian innovations the fourth moment exists if 3α² + 2αβ + β² < 1, and the kurtosis then exceeds 3."), status: "sourced", sourceIds: ["bollerslev-1986"], blockId: "table-constraints" },324      { id: "c-qml", text: t("Le quasi-maximum de vraisemblance gaussien est convergent sans normalité si les deux premiers moments conditionnels sont bien spécifiés ; l'inférence demande une covariance robuste.", "Gaussian quasi-maximum likelihood is consistent without normality when the first two conditional moments are correctly specified; inference requires a robust covariance."), status: "sourced", sourceIds: ["bollerslev-wooldridge-1992"], blockId: "eq-qml" },325    ],326  };327}328329export const garchVolatility: TemplateDef = {330  id: "garch-volatility",331  title: { fr: "GARCH(1,1) et dynamique de la volatilité", en: "GARCH(1,1) and volatility dynamics" },332  description: {333    fr: "Récurrence de variance conditionnelle, persistance, variance inconditionnelle, contraintes de stationnarité et estimation par quasi-maximum de vraisemblance.",334    en: "Conditional variance recursion, persistence, unconditional variance, stationarity constraints and quasi-maximum likelihood estimation.",335  },336  category: "finance",337  build,338};339
Files main
Menu

Theme