code.R
library(DiagrammeR)
library(htmltools)
library(pipeR)
tagList(
tags$div(style = "height:700px;width:600px;"
,DiagrammeR("
graph LR;
A[Forecast Asset Class<br/>Risks and Returns]-->H;
B[Liquidity Constraints] --> H;
C[Maturity Constraints] --> H;
D[Currency Distribution Constraints] --> H;
E[Minimum Allocation to Sovereigns] --> H;
F[Cost of Swap Funding/ Maximum<br/>Allocation to Swap Funding] --> H;
G[Risk Constraints] --> H;
H[Maximize<br/>Net Returns<br/>Subject to<br/>Constraints<br/>] --> I[Optimal<br/>Portfolio<br/><br/>Strategic<br/>Benchmark<br/>];
class A,B,C,D,E,F,G colone;
class H coltwo;
class I colthree;
classDef colone fill:blue;
classDef coltwo fill:gray;
classDef colthree fill:green;
classDef node color:white;
"
, height = 700
, width = 600
)
, tags$p(style="position:absolute;top:500px;left:400px;font-style:italic;font-size:70%"
," source: "
,tags$a(
href = "http://www.fin.gc.ca/treas/evaluations/eaafefa-ecracfc-eng.asp"
,"Department of Finance Canada"
)
)
)
) %>>% html_print