INTRODUCTION

The purpose of this project was to investigate the strategy of selling shares of Akamai Technologies (AKAM) using the tools and techniques learned in the course Financial Econometrics in Social Sciences using R. The impetus for taking up this topic was personal motivation - my friend bought shares of Akamai, and I, out of sheer curiosity, decided to see if it was possible to create a simple, empirically based strategy for determining the timing of an exit based on analysis of financial data.

The project used empirical daily data of Akamai’s stock quotes from 2020 to today. The analysis began with an exploration of the distribution of logarithmic returns (including Jarque-Bera test, Ljung-Box tests, ARCH-LM test) to test the underlying statistical assumptions. Next, the focus was on volatility modeling, using the classic GARCH(1,1) model with a t-distribution of innovations. The GARCH model was estimated using the maximum likelihood method, and its quality was assessed using criterion information (AIC, BIC), diagnostic tests and residual analysis. On this basis, a simple volatility exit investment strategy was constructed, which involved selling stocks when the forecasted volatility exceeded a set threshold (e.g., 75th percentile). The strategy was compared with a passive Buy & Hold approach, analyzing cumulative returns, daily returns and maximum capital slips.

Akamai Technologies, Inc. is a U.S.-based technology company specializing in cloud services, cybersecurity and Content Delivery Network (CDN), the delivery of web content in a fast and secure manner. Its infrastructure underpins the operation of thousands of websites and applications around the world - Akamai handles traffic for media companies, e-commerce and financial institutions, among others.

ANALYTICS

Daily closing prices of Akamai shares from January 2020 to June 2025

General Price Dynamics:

  • 2020–2021: The stock experienced upward movement from below $100 to over $110, despite significant volatility during the COVID-19 pandemic.
  • 2022–2023: A sharp correction occurred, with prices dropping to around $75, followed by a strong rebound back toward $120.
  • 2024–2025: A clear downward trend emerged, with prices declining and stabilizing around $80—similar to levels seen at the beginning of the observed period.

Volatility:

The stock exhibits considerable volatility, with noticeable swings throughout the period. This behavior supports the application of volatility modeling techniques, such as GARCH-family models, to better understand risk and improve forecasting.

Daily logarithmic returns on Akamai shares

Plot Observations:

  • No clear mean trend: The average return hovers around zero — a typical pattern in daily financial data.

  • Non-stationary volatility (volatility clustering): There are distinct periods of heightened fluctuations (e.g., around the turn of 2024/2025), followed by calmer periods.
    This is a classic case of volatility clustering, a phenomenon that GARCH models are designed to capture.

  • Presence of extreme values / outliers: Some days exhibit unusually large positive or negative returns, suggesting the presence of kurtosis (fat tails), which implies a greater likelihood of extreme events than predicted by a normal distribution.

Log-returns are commonly used in economics and finance because they are time-additive and more accurately reflect percentage changes in asset prices. Such characteristics make this dataset a strong foundation for a volatility-based trading strategy

Histogram of standardized daily returns

The following histogram compares the empirical distribution of Akamai’s standardized daily returns with both the normal distribution (blue line) and the Student’s t-distribution with 5 degrees of freedom (orange line).

Empirical vs. Normal Distribution

  • The histogram reveals that the empirical return distribution is slightly flatter in the center than the normal distribution and has fatter tails.
  • This suggests leptokurtosis—i.e., a higher likelihood of extreme values than predicted by a normal distribution.

Fit of the Student’s t-Distribution

  • The orange line (Student’s t with df = 5) aligns more closely with the histogram, particularly in the tails (especially the left tail).
  • This indicates that the Student’s t-distribution provides a better fit to the observed return data than the normal distribution.

Statistical tests of normality and autocorrelation

## 
##  Jarque Bera Test
## 
## data:  akam_returns
## X-squared = 29011, df = 2, p-value < 2.2e-16

## 
##  Box-Ljung test
## 
## data:  akam_returns
## X-squared = 14.372, df = 10, p-value = 0.1567
## 
##  ARCH LM-test; Null hypothesis: no ARCH effects
## 
## data:  akam_returns
## Chi-squared = 9.4819, df = 10, p-value = 0.4871

The ACF chart suggests that:

  • Akamai’s stock returns do not show autocorrelation at the 10 lag level,

  • The data can be treated as whitespace in terms of returns,

CHOICE OF MODEL

GARCH(1,1) modeling with t-distribution

## 
## *---------------------------------*
## *          GARCH Model Fit        *
## *---------------------------------*
## 
## Conditional Variance Dynamics    
## -----------------------------------
## GARCH Model  : sGARCH(1,1)
## Mean Model   : ARFIMA(0,0,0)
## Distribution : std 
## 
## Optimal Parameters
## ------------------------------------
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000927    0.000346   2.6803 0.007355
## omega   0.000031    0.000011   2.8498 0.004375
## alpha1  0.130247    0.038747   3.3615 0.000775
## beta1   0.814069    0.045137  18.0356 0.000000
## shape   3.017674    0.262851  11.4805 0.000000
## 
## Robust Standard Errors:
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000927    0.000334   2.7722 0.005569
## omega   0.000031    0.000013   2.3689 0.017840
## alpha1  0.130247    0.056183   2.3183 0.020434
## beta1   0.814069    0.060950  13.3562 0.000000
## shape   3.017674    0.292425  10.3195 0.000000
## 
## LogLikelihood : 3718.832 
## 
## Information Criteria
## ------------------------------------
##                     
## Akaike       -5.4455
## Bayes        -5.4264
## Shibata      -5.4455
## Hannan-Quinn -5.4383
## 
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                      1.225  0.2683
## Lag[2*(p+q)+(p+q)-1][2]     1.435  0.3763
## Lag[4*(p+q)+(p+q)-1][5]     2.291  0.5515
## d.o.f=0
## H0 : No serial correlation
## 
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                    0.01369  0.9069
## Lag[2*(p+q)+(p+q)-1][5]   0.20737  0.9920
## Lag[4*(p+q)+(p+q)-1][9]   0.46321  0.9988
## d.o.f=2
## 
## Weighted ARCH LM Tests
## ------------------------------------
##             Statistic Shape Scale P-Value
## ARCH Lag[3]    0.1417 0.500 2.000  0.7066
## ARCH Lag[5]    0.3376 1.440 1.667  0.9301
## ARCH Lag[7]    0.5274 2.315 1.543  0.9758
## 
## Nyblom stability test
## ------------------------------------
## Joint Statistic:  2.8787
## Individual Statistics:             
## mu     0.1198
## omega  0.4139
## alpha1 1.6695
## beta1  0.7344
## shape  1.3338
## 
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic:          1.28 1.47 1.88
## Individual Statistic:     0.35 0.47 0.75
## 
## Sign Bias Test
## ------------------------------------
##                    t-value   prob sig
## Sign Bias           0.6499 0.5159    
## Negative Sign Bias  0.3490 0.7271    
## Positive Sign Bias  0.2153 0.8296    
## Joint Effect        1.5258 0.6763    
## 
## 
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
##   group statistic p-value(g-1)
## 1    20     18.96       0.4593
## 2    30     27.88       0.5245
## 3    40     42.33       0.3291
## 4    50     57.26       0.1954
## 
## 
## Elapsed time : 0.1860051

GARCH diagnostics plots

## 
##  Box-Ljung test
## 
## data:  resids
## X-squared = 14.573, df = 20, p-value = 0.8003
## 
##  Box-Ljung test
## 
## data:  resids^2
## X-squared = 1.8582, df = 20, p-value = 1
## 
##  Jarque Bera Test
## 
## data:  resids
## X-squared = 63648, df = 2, p-value < 2.2e-16

Alternative model: eGARCH with GED distribution

##                       
## Akaike       -5.445502
## Bayes        -5.426374
## Shibata      -5.445529
## Hannan-Quinn -5.438342
##                       
## Akaike       -5.397792
## Bayes        -5.374838
## Shibata      -5.397830
## Hannan-Quinn -5.389200

Based on information criteria, GARCH(1,1) with Student-t innovations is selected for further analysis.

WHEN TO SELL?

Overview

Below project focuses on designing, implementing, and analyzing a trading strategy based on forecasted market volatility using the GARCH(1,1) model. The core idea is to exit the market when risk (volatility) is high and re-enter when it’s low — a concept we refer to as the “Volatility Exit” strategy.

Methodology

  • Data: Daily log-returns of Akamai stock from January 2020 to May 2025.
  • Model: GARCH(1,1) with t-Student distribution to better capture fat tails and volatility clustering.
  • Forecast Horizon: Out-of-sample rolling forecast on the last 200 observations.
  • Trading Logic:
    • Buy when forecasted volatility is below the 75th percentile.
    • Exit the market otherwise.
    • Delay the signal by one day (trading on next day’s open).

Strategy Evaluation – (Volatility Exit) vs Buy & Hold

##                 Strategy Buy...Hold
## Observations    199.0000   199.0000
## NAs               0.0000     0.0000
## Minimum          -0.2450    -0.2450
## Quartile 1       -0.0048    -0.0092
## Median            0.0000     0.0009
## Arithmetic Mean  -0.0023    -0.0015
## Geometric Mean   -0.0026    -0.0019
## Quartile 3        0.0068     0.0100
## Maximum           0.0407     0.1127
## SE Mean           0.0018     0.0021
## LCL Mean (0.95)  -0.0059    -0.0055
## UCL Mean (0.95)   0.0013     0.0026
## Variance          0.0007     0.0008
## Stdev             0.0256     0.0290
## Skewness         -5.8084    -3.7186
## Kurtosis         46.5246    28.9994

Panel 1: Cumulative Return

  • Orange Line: “Volatility Exit” strategy – enters the market during low-risk (low-volatility) periods.
  • Blue Line: Buy & Hold benchmark – holds the stock throughout the period.

From August to November 2024, both strategies perform similarly. In November–December 2024, the strategy exits during a period of high volatility and avoids losses.In early 2025, the strategy misses a recovery phase, reflected by the flat black line, while Buy & Hold rebounds with high volatility.

Panel 2: Daily Return

  • Bar chart of daily returns shows that:
    • The strategy reduces frequency of large negative returns.
    • Still occasionally suffers losses when in the market.

The strategy limits exposure to turbulent days, leading to lower volatility.

Panel 3: Drawdown

  • Drawdown measures the maximum drop from a previous peak.
  • The orange line shows frequent flat periods — indicating the strategy is out of the market, hence avoiding losses.
  • The blue line shows deeper drawdowns under Buy & Hold.

The strategy significantly reduces drawdown risk.

Summary of the “Volatility Exit” Strategy

Advantages:
  • Protects against major downturns.
  • Reduces drawdowns and volatility exposure.
  • Provides a smoother equity curve during turbulent periods.

Drawbacks:

  • May exit too early and miss rebounds.
  • In quiet markets, might remain inactive despite upward trends.

Additional Insights

Buy & Hold Explanation:
  • Simple, passive strategy: Buy and never sell.
  • Assumes long-term growth, ignores short-term volatility.
Impact of Political Events (e.g., US Elections in 2024):
  • Can trigger spikes in volatility due to uncertainty.
  • Strategy may exit before or during elections: avoiding losses or missing rebounds.
  • Market response post: election is hard to predict but the strategy adapts by adjusting exposure.

Strategic Takeaways

  • The model offers probabilistic guidance for selling — not exact signals.
  • Selling is advised when:
    • Forecasted volatility exceeds a predefined threshold.
    • Signal changes from 1 (hold) to 0 (exit).

This strategy forms a solid foundation for risk-aware trading. It’s designed not to beat the market in all cases but to avoid large losses while remaining exposed during calmer periods.