aboutsummaryrefslogtreecommitdiffstats
path: root/R/pretty_plots.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/pretty_plots.R')
-rw-r--r--R/pretty_plots.R18
1 files changed, 18 insertions, 0 deletions
diff --git a/R/pretty_plots.R b/R/pretty_plots.R
new file mode 100644
index 00000000..bb9be08b
--- /dev/null
+++ b/R/pretty_plots.R
@@ -0,0 +1,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")