经管之家App
让优质教育人人可得
立即打开
全部版块
我的主页
›
论坛
›
金融投资论坛 六区
›
金融实务版
portfolio in R
楼主
showhsu
11981
31
收藏
2009-09-04
用R寫的一本投資組合的書,A new Ebook on Portfolio in R:
Portfolio Optimization with R/R metrics
Part I Managing Data Sets of Assets 3
Introduction 5
1 Generic Functions to Manipulate Assets 7
1.1 timeDate and timeSeries Objects . . . . . . . . . . . . . . . . . . . . 8
1.2 Loading timeSeries Data Sets . . . . . . . . . . . . . . . . . . . . . . 9
1.3 Sorting and Reverting Assets . . . . . . . . . . . . . . . . . . . . . . 11
1.4 Alignment of Assets . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5 Binding and Merging Assets . . . . . . . . . . . . . . . . . . . . . . 15
1.6 Subsetting Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.7 Aggregating Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.8 Rolling Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2 Financial Functions to Manipulate Assets 31
2.1 Price and Index Series . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2 Return and Cumulated Return Series . . . . . . . . . . . . . . . . . 32
2.3 Drawdowns Series . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.4 Durations Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.5 How to Add Your Own Functions . . . . . . . . . . . . . . . . . . . 36
3 Basic Statistics of Financial Assets 41
3.1 Summary Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.2 Sample Mean and Covariance Estimates . . . . . . . . . . . . . . . . 44
3.3 Estimates for Higher Moments . . . . . . . . . . . . . . . . . . . . . 46
3.4 Quantiles and Related Risk Measures . . . . . . . . . . . . . . . . . 47
3.5 Computing Column Statistics . . . . . . . . . . . . . . . . . . . . . 49
3.6 Computing Cumulated Column Statistics . . . . . . . . . . . . . . . 50
4 Robust Mean and Covariance Estimates of Assets 51
4.1 Robust Covariance Estimators . . . . . . . . . . . . . . . . . . . . . 52
4.2 Comparisons of Robust Covariances . . . . . . . . . . . . . . . . . . 54
4.3 Minimum Volume Ellipsoid Estimator . . . . . . . . . . . . . . . . . 54
4.4 Minimum Covariance Determinant Estimator . . . . . . . . . . . . . 55
4.5 Orthogonalized Gnanadesikan-Kettenring Estimator . . . . . . . . . . 59
4.6 Nearest-Neighbour Variance Estimator . . . . . . . . . . . . . . . . . 59
4.7 Shrinkage Estimator . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.8 Bagging Estimator . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.9 How to Add a New Estimator to the Suite . . . . . . . . . . . . . . . 63
4.10 How to Detect Outliers in a Set of Assets . . . . . . . . . . . . . . . 64
Part II Exploratory Data Analysis of Assets 67
Introduction 6
Contents xix
5 Plotting Financial Time Series And Their Properties 71
5.1 Financial Time Series Plots . . . . . . . . . . . . . . . . . . . . . . . 71
5.2 Box Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.3 Histogram and Density Plots . . . . . . . . . . . . . . . . . . . . . . 87
5.4 Quantile-Quantile Plots . . . . . . . . . . . . . . . . . . . . . . . . 90
6 Customization of Plots 95
6.1 Plot Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
6.2 More About Plot Function Arguments . . . . . . . . . . . . . . . . . 98
6.3 Selecting Colours . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
6.4 Selecting Character Fonts . . . . . . . . . . . . . . . . . . . . . . . . 109
6.5 Selecting Plot Symbols . . . . . . . . . . . . . . . . . . . . . . . . . 112
7 Modelling Asset Returns 117
7.1 Testing Asset returns for Normality . . . . . . . . . . . . . . . . . . 117
7.2 Fitting Asset returns . . . . . . . . . . . . . . . . . . . . . . . . . . 120
7.3 Simulating Asset Returns from a given Distribution . . . . . . . . . . 123
8 Selecting Similar or Dissimilar Assets 125
8.1 Functions for Grouping Similar Assets . . . . . . . . . . . . . . . . . 125
8.2 Grouping Asset Returns by Hierarchical Clustering . . . . . . . . . . 126
8.3 Grouping Asset Returns by k-means Clustering . . . . . . . . . . . . 131
8.4 Grouping Asset Returns through Eigenvalue Analysis . . . . . . . . . 133
8.5 Grouping Asset Returns by Contributed Cluster Algorithms . . . . . . 133
8.6 Ordering Data Sets of Assets . . . . . . . . . . . . . . . . . . . . . . 137
9 Comparing Multivariate Return and Risk Statistics 139
9.1 Star and Segment Plots . . . . . . . . . . . . . . . . . . . . . . . . . 139
9.2 Segment Plots of Basic Return Statistics . . . . . . . . . . . . . . . . 141
9.3 Segment Plots of Distribution Moments . . . . . . . . . . . . . . . . 141
9.4 Segment Plots of Box Plot Statistics . . . . . . . . . . . . . . . . . . . 144
9.5 How to Position Stars and Segments in Star Plots . . . . . . . . . . . 144
10 Pairwise Dependencies of Assets 147
10.1 Simple Pairwise Scatter Plots of Assets . . . . . . . . . . . . . . . . . 147
10.2 Pairwise Correlations Between Assets . . . . . . . . . . . . . . . . . 152
10.3 Tests of Pairwise Correlations . . . . . . . . . . . . . . . . . . . . . 156
10.4 Image Plot of Correlations . . . . . . . . . . . . . . . . . . . . . . . 157
10.5 Bivariate Histogram Plots . . . . . . . . . . . . . . . . . . . . . . . 159
Part III Portfolio Framework 165
Introduction 167
11 S4 Portfolio Specification Class 169
11.1 Class Representation . . . . . . . . . . . . . . . . . . . . . . . . . . 169
11.2 The Model Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
11.3 The Portfolio Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
11.4 The Optim Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
11.5 The Message Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
11.6 Consistency Checks on Specifications . . . . . . . . . . . . . . . . . 188
12 S4 Portfolio Data Class 189
12.1 Class Representation . . . . . . . . . . . . . . . . . . . . . . . . . . 189
12.2 The Data Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
12.3 The Statistics Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
13 S4 Portfolio Constraints Class 197
13.1 Class Representation . . . . . . . . . . . . . . . . . . . . . . . . . . 197
13.2 Long-Only Constraint String . . . . . . . . . . . . . . . . . . . . . . 200
13.3 Unlimited Short Selling Constraint String . . . . . . . . . . . . . . . 202
13.4 Box Constraint Strings . . . . . . . . . . . . . . . . . . . . . . . . . 202
13.5 Group Constraint Strings . . . . . . . . . . . . . . . . . . . . . . . . 204
13.6 Covariance Risk Budget Constraint Strings . . . . . . . . . . . . . . . 205
13.7 Non-Linear Weight Constraint Strings . . . . . . . . . . . . . . . . . 207
13.8 Case study: How To Construct Complex Portfolio Constraints . . . . . 208
14 Portfolio Functions 213
14.1 S4 Class Representation . . . . . . . . . . . . . . . . . . . . . . . . 213
附件列表
fPortfolio.rar
大小:4.82 MB
只需: 10 个论坛币
马上下载
本附件包括:
fPortfolio_clean.pdf
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
全部回复
沙发
swtzang
2009-10-10 06:27:04
Thanks a lot.
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
藤椅
lwell20
2009-11-24 15:41:33
Thanks !!!!!
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
板凳
Isscaliu
2009-11-24 23:35:16
这么好的书怎么没有人顶?大大力的顶!!!
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
报纸
harryzhang
2009-11-25 00:17:43
thanks very much, it is just i want!
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
地板
harryzhang
2009-11-25 00:19:33
建议版主奖励!
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
点击查看更多内容…
7楼
cylo
2009-11-25 09:01:05
非常不错的书啊!谢谢楼主!
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
8楼
bigty
2010-2-18 13:44:32
买了学学,谢谢了
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
9楼
flyingbird
2010-4-5 00:27:46
不错不错~~~
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
10楼
economy02
2010-4-26 06:56:40
非常好的书! 太谢谢LZ 了!
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
11楼
shewenhao
2010-5-3 16:40:48
强烈的顶啊,太谢谢了
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
12楼
nychole
2010-6-19 17:14:45
thx so much!!!!!!!!!
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
13楼
shuxia
2010-12-1 09:49:59
狠狠心,花钱买了吗?
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
14楼
shuxia
2010-12-1 09:50:32
嘿嘿,写错了。总之谢谢了
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
15楼
tangzq1206
2010-12-20 13:26:04
请问楼主的书是完整的么?
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
16楼
brands
2011-2-6 01:10:09
1#
showhsu
excellent, thanks a lot
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
17楼
yuchieh_y
2011-3-1 14:12:28
Thanks a lot.
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
18楼
michaelmai
2011-3-27 18:03:43
谢谢分享!
书是完整的,希望楼主能够继续贡献其它Rmetrics的Ebook,楼主加油!
https://www.rmetrics.org/ebooks
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
19楼
zyh0218
2011-3-27 19:46:02
受到警告
ddddddddddddddddddddd
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
20楼
DavidLung
2011-4-16 23:51:39
的确不错,在介绍R的书中独领风骚,别具一格,希望论坛中能有更多Rmetrics的相关分享!
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
21楼
pingliliu
2012-3-20 10:07:08
正在找这本书,很好,可惜我论坛币不够了
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
22楼
danphil
2012-6-11 00:12:12
好东西。
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
23楼
yanbridge
2012-7-23 15:49:33
终于找到了
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
24楼
ljf2007
2012-7-27 23:19:22
非常好的书,物有所值
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
25楼
逸竹
2012-9-28 15:24:49
O(∩_∩)O谢谢楼主分享
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
26楼
yeyeming
2012-11-27 09:59:20
thank you so much, it is what i want
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
27楼
shrink
2012-11-30 05:25:35
good book, expensive ya
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
28楼
jgchen1966
2012-12-11 12:57:05
very good .. thank you
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
29楼
crownreserch
2013-2-20 09:30:08
非常好的电子版,多谢LZ.
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
30楼
shufelyc
2013-11-19 19:09:27
好书
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
首页
上一页
下一页
跳至第
页
相关推荐
求助个关于选择portfolio的问题
PORTFOLIO STRAT
PortfolioMMWD 很炫。。。
求教:关于用SAS组成portfolio 测定收益率的问题~
关于bond portfolio 调息问题
有关corner portfolio的疑问
fPortfolio包加载不了
谁能发一个fPortfolio的包给我?
为什么fPortfolio安装不了
R fportfolio程序包加载
栏目导航
金融实务版
案例库
计量经济学与统计软件
微观经济学
爱问频道
人工智能论文版
热门文章
2026“课题申报”抢跑号角的已吹响!国社科 ...
CDA 认证考试大纲 2025 重磅更新:一二级考 ...
电子行业深度报告:量子深潜-计算篇:从比特 ...
您提出了一个足以获得诺贝尔奖的核心概念— ...
您提出了一个足以获得诺贝尔奖的核心概念— ...
CDA 数据分析师:特征处理核心指南
制造业全要素生产率(2000-2024年)
签个到
中国财经文本语料数据
达富发投资关于晶雪节能行情数据分析及投资 ...
推荐文章
10月重磅来袭|《打造Coze/Dify专属学术智能 ...
高校老师和学生都在偷偷上的智能体课,到底 ...
最快1年拿证,学费不足5W!热门美国人工智能 ...
关于如何利用文献的若干建议
关于学术研究和论文发表的一些建议
关于科研中如何学习基础知识的一些建议 (一 ...
一个自编的经济学建模小案例 --写给授课本科 ...
AI智能体赋能教学改革: 全国AI教育教学应用 ...
2025中国AIoT产业全景图谱报告-406页
关于文献求助的一些建议
说点什么
分享
微信
QQ空间
QQ
微博
扫码加好友,拉您进群
各岗位、行业、专业交流群