Interface StrategyYield

All Superinterfaces:
Event<Strategy>, StrategyEvent

public interface StrategyYield extends StrategyEvent
Represents a yield result from a Strategy
  • Field Details

  • Method Details

    • getInput

      BigDecimal getInput()
    • getOutput

      BigDecimal getOutput()
    • getYield

      default BigDecimal getYield()
    • getYieldPercent

      default BigDecimal getYieldPercent()
    • getCurrency

      Asset getCurrency()
      Gets the output yield currency
      Returns:
    • getInstrument

      Instrument getInstrument()
      Gets the instrument involved in this yield
      Returns:
    • totalAmount

      static <T extends StrategyYield> BigDecimal totalAmount(List<T> yields)
      Add all yield's amounts
      Type Parameters:
      T -
      Parameters:
      yields - List of yields
      Returns:
      Sum of all yield's amounts
    • totalPercent

      static <T extends StrategyYield> BigDecimal totalPercent(List<T> yields)
      Add all yield's percentages
      Type Parameters:
      T -
      Parameters:
      yields - List of yields
      Returns:
      Sum of all yield's percents