forked from rossb34/PortfolioAnalyticsPresentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata_prep.R
More file actions
25 lines (19 loc) · 825 Bytes
/
data_prep.R
File metadata and controls
25 lines (19 loc) · 825 Bytes
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
##### Equity Data for Example 1 and Example 2 #####
load("data/crsp_weekly.rda")
equity.data <- cbind(largecap_weekly[,1:15],
midcap_weekly[,1:15],
smallcap_weekly[,1:5])
market <- largecap_weekly[,21]
Rf <- largecap_weekly[,22]
##### edhec Data for Example 3 and Example 4 #####
# Load the updated edhec dataset
load("data/edhec.rda")
# Prep data for Examples 3 and 4
R <- edhec[,c("Convertible.Arbitrage", "Equity.Market.Neutral",
"Fixed.Income.Arbitrage",
"CTA.Global", "Emerging.Markets", "Global.Macro")]
# Abreviate column names for convenience and plotting
colnames(R) <- c("CA", "EMN", "FIA", "CTAG", "EM", "GM")
# clean up and remove the data we don't need
rm(largecap_weekly, midcap_weekly, smallcap_weekly, microcap_weekly)
rm(edhec)