r paste0(OPS_CHUNK, ": ", Standards_details$Context[Standards_details$Standard == OPS_CHUNK])

r Standards_details$Details[Standards_details$Standard == OPS_CHUNK]

OPS_TASKS_COMP <- perf_status_ops_temp %>%
  dplyr::filter(Standard == OPS_CHUNK, PerformanceMeasure == "Completed") %>%
  dplyr::pull(TaskVolume)

OPS_PERF_COMP <- perf_status_ops_temp %>%
  dplyr::filter(Standard == OPS_CHUNK, PerformanceMeasure == "Completed") %>%
  dplyr::pull(Performance)

OPS_TASKS_OUTS <- perf_status_ops_temp %>%
  dplyr::filter(Standard == OPS_CHUNK, PerformanceMeasure == "Outstanding") %>%
  dplyr::pull(TaskVolume)

OPS_PERF_OUTS <- perf_status_ops_temp %>%
  dplyr::filter(Standard == OPS_CHUNK, PerformanceMeasure == "Outstanding") %>%
  dplyr::pull(Performance)

OPS_SUMPERF3M_COMP <- perf_status_ops_temp %>%
  dplyr::filter(Standard == OPS_CHUNK, PerformanceMeasure == "Completed") %>%
  dplyr::pull(SumPerf3m)

OPS_SUMPERF3M_OUTS <- perf_status_ops_temp %>%
  dplyr::filter(Standard == OPS_CHUNK, PerformanceMeasure == "Outstanding") %>%
  dplyr::pull(SumPerf3m)

For r format(data.period, "%B-%Y"), r SHORT.NAME had:

Below is a graph showing r SHORT.NAME's historical performance for r OPS_CHUNK. MOSL action points and Rectification milestones are shown, if applicable.

on_plan <- any(perf_status_ops_temp$Rectification[perf_status_ops_temp$Standard == OPS_CHUNK])

graph <- perf_status_ops %>%
  dplyr::filter(TaskVolume > 0) %>%
  MOSLR::plot_perf_graph(
    df = ., 
    load.data = FALSE,
    standard = OPS_CHUNK,
    trading.party = TRADING.PARTY,
    period.start = data.period %m-% months(11),
    period.end = data.period, 
    action.points = TRUE,
    include.iprp = on_plan,
    graph.title = OPS_CHUNK,
    sub.title = Standards_details$Context[Standards_details$Standard == OPS_CHUNK],
    ) +
  ggplot2::theme(text = ggplot2::element_text(size = 15)) +
  ggplot2::facet_wrap(~PerformanceMeasure)

tryCatch(
  expr = {
    plot(graph)
    },
  error = function(e){
    print(e)
  }
  )

Over the last 12 months, for r OPS_CHUNK there have been:

r if (on_plan) { paste0(OPS_CHUNK, " is currently on a Rectification plan. See below for further details.") }

RATIONALE_CHUNK <- perf_status_ops %>% 
  dplyr::filter(
    Period >= data.period %m-% months(6),
    Trading.Party.ID == TRADING.PARTY, 
    Standard == OPS_CHUNK, 
    Action != "") %>%
  nrow() > 0

PFM_COMM_CHUNK <- perf_status_ops %>% 
  dplyr::filter(
    Period >= data.period %m-% months(6),
    Trading.Party.ID == TRADING.PARTY, 
    Standard == OPS_CHUNK, 
    !is.na(PFM_Commentary), 
    PFM_Commentary != "") %>%
  nrow() > 0


r if (RATIONALE_CHUNK) { paste0("The table below shows the rationale for MOSL actions regarding ", paste0(OPS_CHUNK), ".") }

``` {r message = FALSE, echo = FALSE, error = TRUE, warning = FALSE, results = "asis", eval = RATIONALE_CHUNK}

comment_date <- perf_status_ops_temp %>% dplyr::filter(Standard == OPS_CHUNK) %>% dplyr::mutate( check = any(OnWatch, Rectification, PerfFlag3m, UnderReview), date = dplyr::if_else(check, as.Date("2018-04-01"), data.period %m-% months(6)) ) %>% dplyr::pull(date)

perf_status_ops %>% dplyr::filter( Period >= comment_date, Trading.Party.ID == TRADING.PARTY, Standard == OPS_CHUNK, Action != "" ) %>% dplyr::select(Period, PerformanceMeasure, Action, Rationale) %>% dplyr::mutate(Period = format(as.Date(Period), "%Y-%m")) %>% kableExtra::kable( format = "latex", caption = paste0("Rationale for Recent MOSL Actions for ", OPS_CHUNK), linesep = "", #longtable = TRUE, booktabs = TRUE, col.names = c("Period", "Performance Measure", "Action", "Rationale") ) %>% kableExtra::column_spec(4, width = "7cm") %>% kableExtra::kable_styling( font_size = 10, latex_options = c( "repeat_header", "HOLD_position", full_width = TRUE, "striped" ) ) %>% kableExtra::row_spec(0, bold = TRUE)

<br> 

`r if (PFM_COMM_CHUNK) { paste0("The table below shows MOSL commentary regarding ",  paste0(OPS_CHUNK), ".") }`

``` {r message = FALSE, echo = FALSE, error = TRUE, warning = FALSE, results = "asis", eval = PFM_COMM_CHUNK}

perf_status_ops %>%
  dplyr::filter(
    Period >= comment_date,
    Trading.Party.ID == TRADING.PARTY,
    Standard == OPS_CHUNK,
    !is.na(PFM_Commentary), 
    PFM_Commentary != ""
    ) %>%
  dplyr::select(
    Period, PerformanceMeasure, PFM_Commentary
    ) %>%
  dplyr::mutate(
    Period = format(as.Date(Period), "%Y-%m")
    ) %>%
  kableExtra::kable(
    format = "latex", 
    caption = paste0("MOSL Commentary for ", OPS_CHUNK),
    linesep = "",
    #longtable = TRUE, 
    booktabs = TRUE,
    col.names = c("Period", "Performance Measure", "Portfolio Manager Commentary")
    ) %>%
  kableExtra::column_spec(3, width = "10cm") %>%
  kableExtra::kable_styling(
    font_size = 10,
    latex_options = c(
      "repeat_header",
      "HOLD_position",
      "striped"
      )
    ) %>%
  kableExtra::row_spec(0, bold = TRUE)


r if (on_plan) { paste0("A summary of ", SHORT.NAME, "'s performance against its Rectification plan is shown in the table below.") }

``` {r message = FALSE, echo = FALSE, error = TRUE, warning = FALSE, results = "asis", eval = on_plan}

perf_status_ops %>% dplyr::filter( Trading.Party.ID == TRADING.PARTY, Standard == OPS_CHUNK, ) %>% dplyr::mutate_if(is.numeric, scales::percent_format(accuracy = 1)) %>% dplyr::select( Period, PerformanceMeasure, Performance, Planned_Perf, DeltaQuant, Status ) %>% tidyr::drop_na() %>% dplyr::mutate(Period = format(as.Date(Period), "%Y-%m")) %>% kableExtra::kable( format = "latex", caption = "Rectification Performance Tracking", linesep = "", #longtable = TRUE, booktabs = TRUE, col.names = c("Period", "Performance Measure", "Actual Performance", "Planned Performance", "Relative Difference", "Rectification Status"), align = rep("c", 5) ) %>% kableExtra::column_spec(2:6, width = "2.5cm") %>% kableExtra::kable_styling( font_size = 10, latex_options = c( "repeat_header", "HOLD_position", "striped" ) ) %>% kableExtra::row_spec(0, bold = TRUE)

```


r if (on_plan) { paste0("For this standard there have been:") }

r if (on_plan) { paste0("* ", sum(perf_status_ops_temp$CumResubmit[perf_status_ops_temp$Standard == OPS_CHUNK]), " resubmission(s)") } r if (on_plan) { paste0("* ", sum(perf_status_ops_temp$UnderReview[perf_status_ops_temp$Standard == OPS_CHUNK]), " review(s)") }



austl001/MOSLR documentation built on Aug. 17, 2022, 12:07 a.m.