The project aims to perform a time series analysis of three major GPU companies (Nvidia, AMD, Intel), to forecast their volatility using the well known GARCH model and lastly to propose possible strategies of Portfolio Diversification based on the asset precision.
We've obtained historical stock data for Nvidia, AMD, and Intel from this Kaggle dataset. Our analysis focuses on the common time frame between January 25, 1999, and July 10, 2023, during which we computed both the Return and Log Return for each day.
Here is a visualization of the three time series with their relatives Log Returns:
It's intriguing to observe that there are certain dates or periods, both in the Adj.Close and LogReturns features, during which all three time series exhibit similar spike behavior.
To forecast the volatility we followed the GARCH (Generalized Autoregressive Conditional Heteroskedasticity) model, which defines
This was our setup:
And here it is in R code:
garch_model_code <- "
model
{
# Likelihood
for (t in 1:N) {
y[t] ~ dnorm(mu, 1/pow(sigma[t], 2))
}
sigma[1] ~ dunif(0,10)
for(t in 2:N) {
sigma[t] <- sqrt(omega + alpha * pow(y[t-1] - mu, 2) + beta * pow(sigma[t-1], 2))
}
# Priors
mu ~ dnorm(0, 0.01)
omega ~ dunif(0, 10)
alpha ~ dunif(0, 1)
beta ~ dunif(0, 1)
}
"From the three plots above, it appears that all three of our GARCH models effectively captured the volatility between January 25, 1999, and July 10, 2023.
It's also worth noting that both our models for AMD and Intel have demonstrated an unexpected ability to forecast volatility, even for the period we initially excluded from our analysis (1980-1999).
- Blind All-In (Baseline): in which we give at each stock a random weight (Blind) and we trade all our budget (All-In).
-
Univariate diagonal (UD) portfolio: this was a strategy proposed in a 2002 paper by Momtchil Pojarliev and Wolfgang Polasek. It consists in weighting each stocks by the precision (inverse of
$\sigma^2$ ) of the next day. -
Optimized UD: This is a personal adjustment to the Univariate diagonal portfolio strategy in which we don’t always buy all stocks each day, but we implement a decision strategy for which we buy a stock only if its
$p_t$ (the forecasted precision) is above a certain threshold$\tilde{p}$ .
Using the forcasted values for
It also seems that the resulting portfolios have a better Sharpe Ratio score.
| Strategy | Return | Sharpe Ratio | Return Increase from Baseline (%) | Sharpe Ratio Increase from Baseline (%) |
|---|---|---|---|---|
| Blind All-In | 6.84 | 0.07 | 0.00 | 0.00 |
| UD | 8.42 | 0.09 | 23.08 | 27.26 |
| Optimized UD | 12.56 | 0.13 | 83.59 | 86.91 |
Note: To perform our evaluations we obtained the most recent two months of data for each company from Yahoo Finance, spanning from July 10, 2023, to September 8, 2023.






