Skip to content

Instantly share code, notes, and snippets.

@ahouts
Created October 31, 2025 15:03
Show Gist options
  • Select an option

  • Save ahouts/e2adc5a4a9241bbf42c448d81d248c60 to your computer and use it in GitHub Desktop.

Select an option

Save ahouts/e2adc5a4a9241bbf42c448d81d248c60 to your computer and use it in GitHub Desktop.
Finding the most recent fee trade for a portfolio
portfolio.trades()
.stream()
.filter(trade -> trade instanceof Fee)
.max(Comparators.comparing(Trade::date));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment