aboutsummaryrefslogtreecommitdiffstats
path: root/R/pretty_plots.R
blob: bb9be08b4d98f2ee8654eca0ffc0e4bb85c95bfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
load("/home/share/CorpCDOs/Scenarios/Intex Curves_2015-11-30/csv/wthrs4.RData")
wthrs4.dist <- dist.joint
load("/home/share/CorpCDOs/Scenarios/Intex Curves_2015-11-30/csv/saturn.RData")
saturn.dist <- dist.joint

##5 year
ggplot() +
    geom_line(aes(x=support, y=rowSums(wthrs4.dist[17,,]), colour='Whitehorse IV')) +
    geom_line(aes(x=support, y=rowSums(saturn.dist[17,,]), colour='Saturn CLO')) +
    ylab("loss density")+xlab("percentage of loss") +
    geom_vline(aes(colour='Market assumption', xintercept=0.03)) +
    annotate("text", x=0.5, y=0.025, label="T=5 year", size=4) +
    annotate("text", x=0.5, y=0, label="2 CDR, 70% recovery", colour="#F8766D", size=4) +
labs(colour="") +
    theme(legend.position="bottom")

ggsave("Loss distribution.png", width=4.35, height=4)
##ggsave("Loss distribution.png")