Class SensitivityCsvWriter


  • public final class SensitivityCsvWriter
    extends java.lang.Object
    Writes sensitivities to a CSV file.

    This takes a Strata CurveSensitivities instance and creates a matching CSV file. The output is written in standard format, with no identifier columns. The parameter metadata must contain tenors.

    • Method Detail

      • standard

        public static SensitivityCsvWriter standard()
        Obtains an instance that uses the standard set of reference data.
        Returns:
        the loader
      • of

        public static SensitivityCsvWriter of​(SensitivityCsvInfoSupplier supplier)
        Obtains an instance that uses the specified supplier for additional information.
        Parameters:
        supplier - the supplier used to extract additional information to output
        Returns:
        the loader
      • write

        public void write​(CurveSensitivities curveSens,
                          java.lang.Appendable output)
        Write sensitivities to an appendable in the standard sensitivities format.

        The output is written in standard format, with no identifier columns. The parameter metadata must contain tenors.

        Parameters:
        curveSens - the curve sensitivities to write
        output - the appendable to write to
        Throws:
        java.lang.IllegalArgumentException - if the metadata does not contain tenors
        java.io.UncheckedIOException - if an IO error occurs