σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
Time Series skill›Module 2 · Models for the mean›Topic 2.2·~45 minIntermediate

Seasonality and calendar effects

Skill positionModule 2 of 5 · Topic 2 of 3
2.2 Seasonality and calendar effects
—Lab score— / 100Total XP—Streak—

Patterns that repeat on the calendar

A series is seasonal when it repeats a pattern with a fixed period sss: 5 trading days in a week, 12 months in a year, a trading day split into the same time slots. Markets have many such patterns. Intraday volume and volatility are high at the open and the close and low at lunchtime, a U shape that is large and reliable. Volatility also rises around scheduled announcements. Return effects such as the turn of the month, the day of the week or the January effect have been reported many times, but they are small and tend to weaken once published.

xt=∑j=1sβjDj,t+εt,Δsxt=xt−xt−s,t=xˉσ/nx_t=\sum_{j=1}^{s}\beta_jD_{j,t}+\varepsilon_t,\qquad \Delta_s x_t=x_t-x_{t-s},\qquad t=\frac{\bar x}{\sigma/\sqrt{n}}xt​=j=1∑s​βj​Dj,t​+εt​,Δs​xt​=xt​−xt−s​,t=σ/n​xˉ​(1)

There are three ways to deal with seasonality. Seasonal differencing Δsxt=xt−xt−s\Delta_sx_t=x_t-x_{t-s}Δs​xt​=xt​−xt−s​ removes a pattern that repeats exactly. A regression on dummy variables, one per slot (one fewer when there is an intercept), estimates the pattern so you can subtract it or trade it. A seasonal ARIMA, SARIMA(p,d,q)(P,D,Q)s(p,d,q)(P,D,Q)_s(p,d,q)(P,D,Q)s​, models the seasonal and non-seasonal parts together. You find the period by looking for spikes in the ACF at lags s,2s,3ss,2s,3ss,2s,3s. The statistical danger is data mining: a scan of 5 weekdays, 12 months and 31 days of the month tests about 48 effects, and at the 5% level two or three would come out significant by chance alone. Decide the buckets before you look, correct for the number tested (Bonferroni divides the level by the count) and confirm on data you did not use.

Is Monday really different?Suppose the mean Monday return is 0.04%0.04\%0.04% with a standard deviation of 1%1\%1% over n=500n=500n=500 Mondays. The standard error is 1%/500=0.0447%1\%/\sqrt{500}=0.0447\%1%/500​=0.0447%, so t=0.04/0.0447≈0.89t=0.04/0.0447\approx0.89t=0.04/0.0447≈0.89, far below 1.961.961.96. Even a mean of 0.12%0.12\%0.12% would give t≈2.7t\approx2.7t≈2.7, but if you had scanned all 5 weekdays, the Bonferroni level would be 5%/5=1%5\%/5=1\%5%/5=1% and the cut-off 2.582.582.58, which that result barely clears. A weekday effect has to survive the correction and an out-of-sample check before it is worth trading.
  • Seasonal differencing removes a pattern of fixed period sss; dummies estimate it.
  • Spikes in the ACF at lags s,2s,3ss,2s,3ss,2s,3s reveal the period.
  • Scanning many buckets finds false effects: correct for the count (Bonferroni) and confirm out of sample.

Lab · what's graded

  • A seasonal difference10 pts
  • A weekday t-statistic15 pts
  • A Bonferroni level15 pts
  • Counting dummy variables10 pts
  • Finding the period15 pts
  • Match the vocabulary15 pts
  • Testing a calendar effect10 pts
  • Too many buckets10 pts
0/ 8 answered
Tasks
1Numeric answer10 ptsNot answered

A monthly series equals 130130130 this month and 118118118 twelve months ago. What is the seasonal difference Δ12xt=xt−xt−12\Delta_{12}x_t=x_t-x_{t-12}Δ12​xt​=xt​−xt−12​?

d=d =d=accepted: ± 0.01
2Numeric answer15 ptsNot answered

The mean Monday return is 0.04%0.04\%0.04%, the standard deviation is 1%1\%1% and there are n=500n=500n=500 Mondays. What is t=xˉ/(σ/n)t=\bar x/(\sigma/\sqrt{n})t=xˉ/(σ/n​)? Give it to two decimals.

t=t =t=accepted: ± 0.02
3Numeric answer15 ptsNot answered

You test each of the 5 weekdays and want an overall false-positive rate of 5%. What significance level (as a percentage) does Bonferroni give each single test?

level=level =level=accepted: ± 0.01
4Numeric answer10 ptsNot answered

A regression on the 12 months of the year includes an intercept. How many month dummy variables does it need?

k=k =k=accepted: ± 0.01
5Choice15 ptsNot answered

The ACF of a monthly series has clear spikes at lags 12, 24 and 36. What does this suggest?

6Match15 ptsNot answered

Match each term with its meaning.

Pick the partner of each item on the left.

Seasonal differencing
Intraday U shape
Bonferroni correction
SARIMA
7Order the steps10 ptsNot answered

Put the steps in order.

Drag to reorder, or focus an item, press Space to lift it, the arrow keys to move it and Space to drop it.

  1. 1Confirm on data you did not use and check trading costs
  2. 2Define the buckets before looking at returns
  3. 3Correct the significance level for the number of buckets
  4. 4Estimate the mean and its t-statistic in each bucket
8Explain in words10 ptsNot answered

In one or two sentences, explain why scanning every weekday, month and day of the month for return effects is likely to turn up effects that are not real.

Math modeKeyboard or LaTeX inputTask 1 of 8 · Ctrl ⏎ to check

Log in to run your code.

Every lecture is free to read. Create an account or log in to run code, run tests and submit this lab.

  • In-browser IDE with a bash terminal — nothing to install
  • Instant grading, XP and your place on the skill
Create an accountLog in
OR
Continue with GitHub