Skip to content

Commit b44f341

Browse files
committed
更新
1 parent 7978b64 commit b44f341

17 files changed

+2489
-3
lines changed

binary-Q1XREG-ARFIMAX-GARCH.Rmd

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ output:
2323
suppressPackageStartupMessages(require('BBmisc'))
2424
2525
## 读取程序包
26-
pkg <- c('lubridate', 'plyr', 'dplyr', 'magrittr', 'stringr', 'rugarch', 'forecast', 'quantmod', 'microbenchmark', 'knitr', 'kableExtra', 'formattable', 'quantmod', 'TTR')
26+
pkg <- c('lubridate', 'plyr', 'dplyr', 'magrittr', 'stringr', 'rugarch', 'forecast', 'quantmod', 'microbenchmark', 'knitr', 'kableExtra', 'formattable', 'quantmod', 'TTR', 'memoise')
2727
suppressAll(lib(pkg))
2828
rm(pkg)
2929
@@ -47,7 +47,7 @@ names(cr_code) <- c('USDAUD', 'USDEUR', 'USDGBP', 'USDCHF', 'USDCAD', 'USDCNY',
4747
price_type <- c('Op', 'Hi', 'Lo', 'Cl')
4848
4949
## 读取雅虎数据。
50-
mbase <- sapply(names(cr_code), function(x) readRDS(paste0('./data/', x, '.rds')) %>% na.omit)
50+
mbase <- sapply(names(cr_code), function(x) readRDS(paste0('/home/englianhu/Documents/GitHub/binary.com-interview-question-data/data/', x, '.rds')) %>% na.omit)
5151
```
5252

5353
数据简介报告。
@@ -659,6 +659,7 @@ rm(sys1, sys2)
659659
03. [Introduction to the `rugarch` Package](https://github.com/englianhu/binary.com-interview-question/blob/master/reference/Introduction%20to%20the%20rugarch%20Package.pdf)<img src='www/hot.jpg' width='20'>
660660
04. [GARCH模型中的ARIMA(p,d,q)参数最优化](http://rpubs.com/englianhu/binary-Q1FiGJRGARCH)
661661
05. [binary.com Interview Question I - Interday Betting Strategy Models Comparison (Financial Betting)](http://rpubs.com/englianhu/binary-Q1BET)
662+
06. [R语言中ARMA,ARIMA(BOX-JENKINS),SARIMA和ARIMAX模型用于预测时间序列数据](http://tecdat.cn/r%e8%af%ad%e8%a8%80%e4%b8%adarma%ef%bc%8carima%ef%bc%88box-jenkins%ef%bc%89%ef%bc%8csarima%e5%92%8carimax%e6%a8%a1%e5%9e%8b%e7%94%a8%e4%ba%8e%e9%a2%84%e6%b5%8b%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97)
662663

663664
--------------------
664665

copula-draft.R

+4
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ for(i in 1:out){
9595

9696
## R语言多元COPULA GARCH 模型时间序列预测
9797
## https://tecdat.cn/r%E8%AF%AD%E8%A8%80%E5%A4%9A%E5%85%83copula-garch-%E6%A8%A1%E5%9E%8B%E6%97%B6%E9%97%B4%E5%BA%8F%E5%88%97%E9%A2%84%E6%B5%8B
98+
##
99+
## R语言ARMA-GARCH-COPULA模型和金融时间序列案例
100+
## http://tecdat.cn/r%e8%af%ad%e8%a8%80copulas%e5%92%8c%e9%87%91%e8%9e%8d%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97%e6%a1%88%e4%be%8b
101+
##
98102

99103

100104

copula-draft2.R

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,8 @@ fc <- varxforecast(X = Dat, Bcoef = fit@mfit$stdresid, p = 4,
4545

4646
## R语言多元COPULA GARCH 模型时间序列预测
4747
## https://tecdat.cn/r%E8%AF%AD%E8%A8%80%E5%A4%9A%E5%85%83copula-garch-%E6%A8%A1%E5%9E%8B%E6%97%B6%E9%97%B4%E5%BA%8F%E5%88%97%E9%A2%84%E6%B5%8B
48-
48+
##
49+
## R语言ARMA-GARCH-COPULA模型和金融时间序列案例
50+
## http://tecdat.cn/r%e8%af%ad%e8%a8%80copulas%e5%92%8c%e9%87%91%e8%9e%8d%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97%e6%a1%88%e4%be%8b
51+
##
4952

Binary file not shown.

投资风险管理.html

+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
3+
<meta charset="utf-8">
4+
<meta name="generator" content="quarto-0.9.80">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
6+
<meta name="author" content="雷欧">
7+
<title>投资风险管理</title>
8+
<style>
9+
code{white-space: pre-wrap;}
10+
span.smallcaps{font-variant: small-caps;}
11+
span.underline{text-decoration: underline;}
12+
div.column{display: inline-block; vertical-align: top; width: 50%;}
13+
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
14+
ul.task-list{list-style: none;}
15+
</style>
16+
17+
<script src="投资风险管理_files/libs/clipboard/clipboard.min.js"></script>
18+
<script src="投资风险管理_files/libs/quarto-html/quarto.js"></script>
19+
<script src="投资风险管理_files/libs/quarto-html/popper.min.js"></script>
20+
<script src="投资风险管理_files/libs/quarto-html/tippy.umd.min.js"></script>
21+
<script src="投资风险管理_files/libs/quarto-html/anchor.min.js"></script>
22+
<link href="投资风险管理_files/libs/quarto-html/tippy.css" rel="stylesheet">
23+
<link href="投资风险管理_files/libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet">
24+
<script src="投资风险管理_files/libs/bootstrap/bootstrap.min.js"></script>
25+
<link href="投资风险管理_files/libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
26+
<link href="投资风险管理_files/libs/bootstrap/bootstrap.min.css" rel="stylesheet">
27+
<!--[if lt IE 9]>
28+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
29+
<![endif]-->
30+
</head>
31+
<body class="fullcontent">
32+
<div id="quarto-content" class="page-columns page-rows-contents page-layout-article">
33+
34+
<main class="content" id="quarto-document-content">
35+
<header id="title-block-header" class="quarto-title-block default">
36+
37+
38+
<div class="quarto-title"><h1 class="title display-7">投资风险管理</h1></div><div class="quarto-title-meta"><div><div class="quarto-title-meta-heading">Author</div><div class="quarto-title-meta-contents"><div class="quarto-title-authors"><p>雷欧</p></div></div></div></div></header>
39+
<section id="夏普率-sharpe-ratio" class="level2">
40+
<h2 class="anchored" data-anchor-id="夏普率-sharpe-ratio">夏普率 (Sharpe Ratio)</h2>
41+
<p></p>
42+
<div class="cell">
43+
44+
</div>
45+
</section>
46+
<section id="投资风险价值-var" class="level2">
47+
<h2 class="anchored" data-anchor-id="投资风险价值-var">投资风险价值 (VaR)</h2>
48+
<div class="cell">
49+
50+
</div>
51+
</section>
52+
<section id="参考文献" class="level2">
53+
<h2 class="anchored" data-anchor-id="参考文献">参考文献</h2>
54+
<ol type="1">
55+
<li><a href="http://tecdat.cn/r%e8%af%ad%e8%a8%80%e7%94%a8garch%e6%a8%a1%e5%9e%8b%e6%b3%a2%e5%8a%a8%e7%8e%87%e5%bb%ba%e6%a8%a1%e5%92%8c%e9%a2%84%e6%b5%8b%e3%80%81%e5%9b%9e%e6%b5%8bvar%e5%88%86%e6%9e%90%e8%82%a1%e5%b8%82%e6%94%b6">R语言用GARCH模型波动率建模和预测、回测风险价值 (VAR)分析股市收益率时间序列</a></li>
56+
<li><a href="http://tecdat.cn/r%e8%af%ad%e8%a8%80%e5%9f%ba%e4%ba%8earma-garch-var%e6%a8%a1%e5%9e%8b%e6%8b%9f%e5%90%88%e5%92%8c%e9%a2%84%e6%b5%8b%e5%ae%9e%e8%af%81%e7%a0%94%e7%a9%b6%e5%88%86%e6%9e%90%e6%a1%88%e4%be%8b">R语言基于ARMA-GARCH-VAR模型拟合和预测实证研究分析案例</a></li>
57+
<li><a href="http://tecdat.cn/r%e8%af%ad%e8%a8%80var%e6%a8%a1%e5%9e%8b%e7%9a%84%e4%b8%8d%e5%90%8c%e7%b1%bb%e5%9e%8b%e7%9a%84%e8%84%89%e5%86%b2%e5%93%8d%e5%ba%94%e5%88%86%e6%9e%90">R语言VAR向量自回归模型的不同类型的脉冲响应分析</a></li>
58+
<li><a href="http://tecdat.cn/r%e8%af%ad%e8%a8%80gibbs%e6%8a%bd%e6%a0%b7%e7%9a%84%e8%b4%9d%e5%8f%b6%e6%96%af%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92%e4%bb%bf%e7%9c%9f%e5%88%86%e6%9e%90">R语言GIBBS抽样的贝叶斯简单线性回归仿真分析</a></li>
59+
<li><a href="http://tecdat.cn/%e9%9a%8f%e6%9c%ba%e6%90%9c%e7%b4%a2%e5%8f%98%e9%87%8f%e9%80%89%e6%8b%a9ssvs%e4%bc%b0%e8%ae%a1%e8%b4%9d%e5%8f%b6%e6%96%af%e5%90%91%e9%87%8f%e8%87%aa%e5%9b%9e%e5%bd%92%ef%bc%88bvar%ef%bc%89%e6%a8%a1">R语言随机搜索变量选择SSVS估计贝叶斯向量自回归(BVAR)模型</a></li>
60+
<li><a href="http://tecdat.cn/r%e8%af%ad%e8%a8%80%e4%b8%ad%e7%9a%84stan%e6%a6%82%e7%8e%87%e7%bc%96%e7%a8%8bmcmc%e9%87%87%e6%a0%b7%e7%9a%84%e8%b4%9d%e5%8f%b6%e6%96%af%e6%a8%a1%e5%9e%8b">R语言中的STAN概率编程MCMC采样的贝叶斯模型</a></li>
61+
<li><a href="http://tecdat.cn/r%e8%af%ad%e8%a8%80%e4%bc%b0%e8%ae%a1%e6%97%b6%e5%8f%98var%e6%a8%a1%e5%9e%8b%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97%e7%9a%84%e5%ae%9e%e8%af%81%e7%a0%94%e7%a9%b6%e5%88%86%e6%9e%90%e6%a1%88%e4%be%8b">R语言估计时变VAR模型时间序列的实证研究分析案例</a></li>
62+
<li><a href="http://tecdat.cn/r%e8%af%ad%e8%a8%80%e4%b8%ad%e7%9a%84stan%e6%a6%82%e7%8e%87%e7%bc%96%e7%a8%8bmcmc%e9%87%87%e6%a0%b7%e7%9a%84%e8%b4%9d%e5%8f%b6%e6%96%af%e6%a8%a1%e5%9e%8b">R语言中的STAN概率编程MCMC采样的贝叶斯模型</a></li>
63+
<li><a href=""></a></li>
64+
<li><a href=""></a></li>
65+
<li><a href=""></a></li>
66+
<li><a href=""></a></li>
67+
<li><a href=""></a></li>
68+
<li><a href=""></a></li>
69+
<li><a href=""></a></li>
70+
<li><a href=""></a></li>
71+
<li><a href=""></a></li>
72+
<li><a href=""></a></li>
73+
<li><a href=""></a></li>
74+
<li><a href=""></a></li>
75+
<li><a href=""></a></li>
76+
</ol>
77+
</section>
78+
</main>
79+
<!-- /main column -->
80+
<script type="application/javascript">
81+
window.document.addEventListener("DOMContentLoaded", function (event) {
82+
const icon = "";
83+
const anchorJS = new window.AnchorJS();
84+
anchorJS.options = {
85+
placement: 'right',
86+
icon: icon
87+
};
88+
anchorJS.add('.anchored');
89+
const clipboard = new window.ClipboardJS('.code-copy-button', {
90+
target: function(trigger) {
91+
return trigger.previousElementSibling;
92+
}
93+
});
94+
clipboard.on('success', function(e) {
95+
// button target
96+
const button = e.trigger;
97+
// don't keep focus
98+
button.blur();
99+
// flash "checked"
100+
button.classList.add('code-copy-button-checked');
101+
setTimeout(function() {
102+
button.classList.remove('code-copy-button-checked');
103+
}, 1000);
104+
// clear code selection
105+
e.clearSelection();
106+
});
107+
function tippyHover(el, contentFn) {
108+
const config = {
109+
allowHTML: true,
110+
content: contentFn,
111+
maxWidth: 500,
112+
delay: 100,
113+
arrow: false,
114+
appendTo: function(el) {
115+
return el.parentElement;
116+
},
117+
interactive: true,
118+
interactiveBorder: 10,
119+
theme: 'quarto',
120+
placement: 'bottom-start'
121+
};
122+
window.tippy(el, config);
123+
}
124+
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
125+
for (var i=0; i<noterefs.length; i++) {
126+
const ref = noterefs[i];
127+
tippyHover(ref, function() {
128+
let href = ref.getAttribute('href');
129+
try { href = new URL(href).hash; } catch {}
130+
const id = href.replace(/^#\/?/, "");
131+
const note = window.document.getElementById(id);
132+
return note.innerHTML;
133+
});
134+
}
135+
var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
136+
for (var i=0; i<bibliorefs.length; i++) {
137+
const ref = bibliorefs[i];
138+
const cites = ref.parentNode.getAttribute('data-cites').split(' ');
139+
tippyHover(ref, function() {
140+
var popup = window.document.createElement('div');
141+
cites.forEach(function(cite) {
142+
var citeDiv = window.document.createElement('div');
143+
citeDiv.classList.add('hanging-indent');
144+
citeDiv.classList.add('csl-entry');
145+
var biblioDiv = window.document.getElementById('ref-' + cite);
146+
if (biblioDiv) {
147+
citeDiv.innerHTML = biblioDiv.innerHTML;
148+
}
149+
popup.appendChild(citeDiv);
150+
});
151+
return popup.innerHTML;
152+
});
153+
}
154+
});
155+
</script>
156+
</div> <!-- /content -->
157+
158+
159+
</body></html>

投资风险管理.qmd

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: "投资风险管理"
3+
author: "雷欧"
4+
format: html
5+
---
6+
7+
## 夏普率 (Sharpe Ratio)
8+
9+
...
10+
11+
```{r}
12+
13+
```
14+
15+
## 投资风险价值 (VaR)
16+
17+
```{r}
18+
19+
```
20+
21+
## 参考文献
22+
23+
1) [R语言用GARCH模型波动率建模和预测、回测风险价值 (VAR)分析股市收益率时间序列](http://tecdat.cn/r%e8%af%ad%e8%a8%80%e7%94%a8garch%e6%a8%a1%e5%9e%8b%e6%b3%a2%e5%8a%a8%e7%8e%87%e5%bb%ba%e6%a8%a1%e5%92%8c%e9%a2%84%e6%b5%8b%e3%80%81%e5%9b%9e%e6%b5%8bvar%e5%88%86%e6%9e%90%e8%82%a1%e5%b8%82%e6%94%b6)
24+
2) [R语言基于ARMA-GARCH-VAR模型拟合和预测实证研究分析案例](http://tecdat.cn/r%e8%af%ad%e8%a8%80%e5%9f%ba%e4%ba%8earma-garch-var%e6%a8%a1%e5%9e%8b%e6%8b%9f%e5%90%88%e5%92%8c%e9%a2%84%e6%b5%8b%e5%ae%9e%e8%af%81%e7%a0%94%e7%a9%b6%e5%88%86%e6%9e%90%e6%a1%88%e4%be%8b)
25+
3) [R语言VAR向量自回归模型的不同类型的脉冲响应分析](http://tecdat.cn/r%e8%af%ad%e8%a8%80var%e6%a8%a1%e5%9e%8b%e7%9a%84%e4%b8%8d%e5%90%8c%e7%b1%bb%e5%9e%8b%e7%9a%84%e8%84%89%e5%86%b2%e5%93%8d%e5%ba%94%e5%88%86%e6%9e%90)
26+
4) [R语言GIBBS抽样的贝叶斯简单线性回归仿真分析](http://tecdat.cn/r%e8%af%ad%e8%a8%80gibbs%e6%8a%bd%e6%a0%b7%e7%9a%84%e8%b4%9d%e5%8f%b6%e6%96%af%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92%e4%bb%bf%e7%9c%9f%e5%88%86%e6%9e%90)
27+
5) [R语言随机搜索变量选择SSVS估计贝叶斯向量自回归(BVAR)模型](http://tecdat.cn/%e9%9a%8f%e6%9c%ba%e6%90%9c%e7%b4%a2%e5%8f%98%e9%87%8f%e9%80%89%e6%8b%a9ssvs%e4%bc%b0%e8%ae%a1%e8%b4%9d%e5%8f%b6%e6%96%af%e5%90%91%e9%87%8f%e8%87%aa%e5%9b%9e%e5%bd%92%ef%bc%88bvar%ef%bc%89%e6%a8%a1)
28+
6) [R语言中的STAN概率编程MCMC采样的贝叶斯模型](http://tecdat.cn/r%e8%af%ad%e8%a8%80%e4%b8%ad%e7%9a%84stan%e6%a6%82%e7%8e%87%e7%bc%96%e7%a8%8bmcmc%e9%87%87%e6%a0%b7%e7%9a%84%e8%b4%9d%e5%8f%b6%e6%96%af%e6%a8%a1%e5%9e%8b)
29+
7) [R语言估计时变VAR模型时间序列的实证研究分析案例](http://tecdat.cn/r%e8%af%ad%e8%a8%80%e4%bc%b0%e8%ae%a1%e6%97%b6%e5%8f%98var%e6%a8%a1%e5%9e%8b%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97%e7%9a%84%e5%ae%9e%e8%af%81%e7%a0%94%e7%a9%b6%e5%88%86%e6%9e%90%e6%a1%88%e4%be%8b)
30+
8) []()
31+
9) []()
32+
10) []()
33+
11) []()
34+
12) []()
35+
13) []()
36+
14) []()
37+
15) []()
38+
16) []()
39+
17) []()
40+
18) []()
41+
19) []()
42+
20) []()
43+
21) []()
44+

0 commit comments

Comments
 (0)