Created
April 12, 2025 07:48
-
-
Save kikoso/cfecbc8c171f7649732bde16f75bcc40 to your computer and use it in GitHub Desktop.
Portfolio Simulation using the same 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 rng1 = Random(123) | |
val rng2 = Random(123) | |
val accumulatedResults = (1..simulations).map { | |
val accumulatedReturnsA = simulatePortfolioAccumulatedReturns(portfolioA, rng1) | |
val accumulatedReturnsB = simulatePortfolioAccumulatedReturns(portfolioB, rng2) | |
SimulationResult(it, accumulatedReturnsA, accumulatedReturnsB) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment