Graph two posts above it incorrect. Labels "A" and "B" were switched. Too late to edit.
Here is corrected version:
View attachment 316714
Kev, i got to work with
@sle on this problem and I wanted to post a real world example because the output im getting is iffy in a real world example. Im still going to use KO and PEP.
Current Ivols
PEP/USD 1 month = 16%
KO/USD 1 month = 12%
Forecasted 1 month Cor KO/USD, PEP/USD = 70%
formula:
c^2 = a^2 + b^2 - 2ab * cos(arccos(cor(a,b))
KO/PEPsigma^2 = KO/USDsigma^2 + PEP/USDsigma^2 - 2*KO/USDsigma *PEP/USDsigma*cos(arccos(.70))
In R:
.12^2 + .16^2 - 2*.12*.16 * cos(acos(.70))
[1] 0.01312
Now when i look at the 1 month realized vol of KO/PEP (plotted below) the min value i get is .0235 over the past 20 years. I tried changing my cor value but even at 0 cor i get a value only .03.
What i was expecting was a higher value that matches closer to what realized has been doing. Say .10. Ive even changed the vol numbers to .25 and .20 for KO and PEP but im not getting a value that would make sense in the real world
To get the KO/PEP vol graph below in R:
library(quantmod)
getSymbols(c("KO", "PEP"))
prices = na.omit(merge(Cl(KO), Cl(PEP)))
ko.pep = prices[,1]/prices[,2]
ko.pepVol = volatility(ko.pep, n = 20, N = 252, mean0 = T)