Created
April 12, 2025 07:50
-
-
Save kikoso/15d0d002d6f22ef077d4924e99383c22 to your computer and use it in GitHub Desktop.
Portfolio Simulation with a Time Based Seed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val rng = Random(System.currentTimeMillis()) | |
val accumulatedResults = (1..simulations).map { | |
val accumulatedReturnsA = simulatePortfolioAccumulatedReturns(portfolioA, rng) | |
val accumulatedReturnsB = simulatePortfolioAccumulatedReturns(portfolioB, rng) | |
SimulationResult(it, accumulatedReturnsA, accumulatedReturnsB) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment