全文阅读:https://www.lianxh.cn/news/3bda6629305d4.html
下面是公司财务课程教材中部分范例的 Stata 实现代码,以便大家对相关的概念和计算方法有更深入的理解。
教材: Berk, Jonathan, and Peter DeMarzo, 2014. Corporate finance (4th, Golbal Edition), Pearson Press.
第 11 章 表 11.1
global path "D:\stata15\ado\personal\CF10\chp11"
cd "$path"
*----------------------
*- Table 11.1
* Returns for Three Stocks, and Portfolios of Pairs of Stocks
*----------------------
clear
input year NorthAir WestAir TexOil
2007 0.21 0.09 -0.02
2008 0.30 0.21 -0.05
2009 0.07 0.07 0.09
2010 -0.05 -0.02 0.21
2011 -0.02 -0.05 0.30
2012 0.09 0.30 0.07
end
tsset year
*-Stock Returns
sum N W T
*-Portfolio Returns
gen P_NW = 0.5*N + 0.5*W
gen P_WT = 0.5*W + 0.5*T
list, sep(0) noobs
sum P_NW P_WT
save "CF_tab_11_1.dta", replace