Class APnLVectorSubstitutionRestService<T extends PnLVectorSubstitutionDTO>

    • Field Detail

      • datastore

        protected com.qfs.store.IDatastore datastore
    • Constructor Detail

      • APnLVectorSubstitutionRestService

        public APnLVectorSubstitutionRestService​(com.qfs.store.IDatastore datastore)
    • Method Detail

      • generateTradeCondition

        public com.qfs.condition.ICondition generateTradeCondition​(PnLVectorSubstitutionDTO dto)
        Generate the ICondition used to retrieve the data corresponding to the trades to substitute
        Parameters:
        dto - the DTO
        Returns:
        ICondition
      • getPreviousDayVectors

        public Map<String,​com.qfs.vector.IVector> getPreviousDayVectors​(PnLVectorSubstitutionDTO dto)
        Retrieve the PnL vectors for previous day
        Parameters:
        dto - the DTO
        Returns:
        A map with the risk factor as key and the PnL vector as value
      • getPreviousAsOfDates

        public javax.ws.rs.core.Response getPreviousAsOfDates​(String tradeId,
                                                              String asOfDate,
                                                              String scenarioSet,
                                                              String calculationId,
                                                              String riskFactor)
        RESTFul call to retrieve the previous as of dates for a given set of criteria
        Specified by:
        getPreviousAsOfDates in interface IPnLVectorSubstitutionRestService<T extends PnLVectorSubstitutionDTO>
        Parameters:
        tradeId - the tradeId
        asOfDate - the asOfDate
        scenarioSet - the scenarioSet
        calculationId - the calculationId
        riskFactor - the riskFactor
        Returns:
        Response
      • getPreviousAsOfDates

        public Set<String> getPreviousAsOfDates​(com.qfs.condition.ICondition condition)
        Retrieve the set of previous as of dates for a given ICondition
        Parameters:
        condition - the ICondition
        Returns:
        the set of as of dates
      • parseAsOfDate

        public LocalDate parseAsOfDate​(String asOfDate)
        Parse the as of date string representation into a LocalDate
        Parameters:
        asOfDate - string representation of the as of date
        Returns:
        LocalDate