Skip to content

MonteCarloSettings.Iterations

property · MonteCarloSettings · cAlgo.API Since 5.10

DesktopCLICloud

Gets the number of simulated iterations. When it is 0, the default, the method default is used, which is 1000 for the resampling methods and 100 for SyntheticPricePath. Any other value outside the range of the method, which is 100 to 100000 for the resampling methods and 100 to 1000 for SyntheticPricePath, is reported as an invalid settings error instead of being clamped.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

public int Iterations {get; set;}
monteCarloSettings.Iterations: int

Returns int

Examples

var monteCarlo = new MonteCarloSettings(MonteCarloMethod.Bootstrap, @"C:\Temp\montecarlo-result.json") { Iterations = 5000 };
Print("Monte Carlo iterations: {0}", monteCarlo.Iterations);
monteCarlo = MonteCarloSettings(MonteCarloMethod.Bootstrap, r"C:\Temp\montecarlo-result.json")
monteCarlo.Iterations = 5000
api.Print(f"Monte Carlo iterations: {monteCarlo.Iterations}")