-
Notifications
You must be signed in to change notification settings - Fork 30
/
binary-Q1CGARCH.Rmd
118 lines (86 loc) · 5.03 KB
/
binary-Q1CGARCH.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
title: "<img src='www/binary-logo-resize.jpg' width='240'>"
subtitle: "[binary.com](https://github.com/englianhu/binary.com-interview-question) Interview Question I - Copula DCC GARCH"
author: "[®γσ, Lian Hu](https://englianhu.github.io/) <img src='www/RYO.jpg' width='24'> <img src='www/RYU.jpg' width='24'> <img src='www/ENG.jpg' width='24'>®"
date: "`r lubridate::today('Asia/Tokyo')`"
output:
html_document:
number_sections: yes
toc: yes
toc_depth: 4
toc_float:
collapsed: yes
smooth_scroll: yes
code_folding: hide
---
```{r, warning=FALSE}
suppressPackageStartupMessages(library('BBmisc'))
#'@ suppressPackageStartupMessages(library('rmsfuns'))
pkgs <- c('knitr', 'kableExtra', 'tint', 'devtools', 'lubridate', 'data.table', 'feather', 'quantmod', 'tidyquant', 'tidyr', 'timetk', 'plyr', 'stringr', 'magrittr', 'dplyr', 'tidyverse', 'memoise', 'htmltools', 'formattable', 'zoo', 'forecast', 'seasonal', 'seasonalview', 'rugarch', 'rmgarch', 'mfGARCH', 'sparklyr', 'microbenchmark', 'dendextend')
# https://github.com/mpiktas/midasr
# https://github.com/onnokleen/mfGARCH
suppressAll(lib(pkgs))
#'@ load_pkg(pkgs)
funs <- c('uv_fx.R', 'opt_arma.R', 'opt_arma.R', 'filterFX.R', 'filter_spec.R', 'mv_fx.R', 'task_progress.R', 'read_umodels.R', 'convertOHLC.R')
l_ply(funs, function(x) source(paste0('./function/', x)))
spark_install()
sc <- spark_connect(master = 'local')
.cl = FALSE
options(warn = -1)
rm(pkgs)
```
# Introduction
Due to the paper <span style='color:goldenrod'>*binary.com Interview Question I - Multivariate GARCH Models*</span> unable to execute the copula-DCC-GARCH models smoothly where I believed the Copula-GARCH and also GO-GARCH models will be better fit than normal DCC models, here I try to refer to more reference like <span style='color:goldenrod'>*Higher Moment Models for Risk and Portfolio Management*</span> etc. The author published a thesis which contains a series of GARCH models.
[Copulas and Financial Time Series](https://www.r-bloggers.com/copulas-and-financial-time-series/) apply univariate and also multivariate GARCH models onto the financial market.
Yihui, Xie used to publish a post which is [我手头关于Copula的20篇论文资料(下载)](https://d.cosx.org/d/6181-6181), the Copula-GARCH model widely use in financial market. <span style='color:goldenrod'>*Enjoy the Joy of Copulas - With a Package `copula`*</span>...
# Data
# Modelling
# Conclusion
```{r option, echo = FALSE}
## Set options back to original options
options(warn = 0)
```
# Appendix
## Documenting File Creation
It's useful to record some information about how your file was created.
- File creation date: 2018-10-18
- File latest updated date: `r today('Asia/Tokyo')`
- `r R.version.string`
- R version (short form): `r getRversion()`
- [**rmarkdown** package](https://github.com/rstudio/rmarkdown) version: `r packageVersion('rmarkdown')`
- File version: 1.0.1
- Author Profile: [®γσ, Eng Lian Hu](https://beta.rstudioconnect.com/content/4352/)
- GitHub: [Source Code](https://github.com/englianhu/binary.com-interview-question)
- Additional session information:
```{r info, echo=FALSE, warning=FALSE, results='asis'}
sys1 <- session_info()$platform %>%
unlist %>%
data.frame(Category = names(.), session_info = .)
rownames(sys1) <- NULL
sys2 <- data.frame(Sys.info()) %>%
mutate(Category = rownames(.)) %>%
.[2:1]
names(sys2)[2] <- c('Sys.info')
rownames(sys2) <- NULL
if (nrow(sys1) == 7 & nrow(sys2) == 8) {
sys1 %<>% rbind(., data.frame(
Category = 'Current time',
session_info = paste(as.character(lubridate::now('Asia/Tokyo')), 'JST')))
} else {
sys2 %<>% rbind(., data.frame(
Category = 'Current time',
Sys.info = paste(as.character(lubridate::now('Asia/Tokyo')), 'JST')))
}
cbind(sys1, sys2) %>%
kable(caption = 'Additional session information:') %>%
kable_styling(bootstrap_options = c('striped', 'hover', 'condensed', 'responsive'))
rm(sys1, sys2)
```
## Reference
01. [Enjoy the Joy of Copulas - With a Package `copula`](https://github.com/englianhu/binary.com-interview-question/blob/master/reference/Enjoy%20the%20Joy%20of%20Copulas%20-%20With%20a%20ackage%20copula.pdf)
02. [Modeling Multivariate Count Data using Copulas](https://github.com/englianhu/binary.com-interview-question/blob/master/reference/Modeling%20Multivariate%20Count%20Data%20using%20Copulas.pdf)
03. [Modeling Multivariate Distributions using Copulas](https://github.com/englianhu/binary.com-interview-question/blob/master/reference/Modeling%20Multivariate%20Distributions%20using%20Copulas.pdf)
04. [Higher Moment Models for Risk and Portfolio Management](https://github.com/englianhu/binary.com-interview-question/blob/master/reference/Higher%20Moment%20Models%20for%20Risk%20and%20Portfolio%20Management.pdf)
05. [binary.com Interview Question I - Multivariate GARCH Models](http://rpubs.com/englianhu/binary-Q1Multi-GARCH)
---
<span style='color:RoyalBlue'>**Powered by - Copyright® Intellectual Property Rights of [<img src='www/scb_logo.jpg' width='64'>®](http://www.scibrokes.com)個人の経営企業**</span>