MonteCarloSettings.BlockSize
property · MonteCarloSettings · cAlgo.API Since 5.10
DesktopCLICloud
Gets the number of consecutive trades that are kept together when resampling. It is used only by the BlockBootstrap and StationaryBootstrap methods and is ignored by the others. It must be greater than or equal to 1 and the default value is 5.
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 BlockSize {get; set;}
monteCarloSettings.BlockSize: int
Returns int
Examples
var monteCarlo = new MonteCarloSettings(MonteCarloMethod.BlockBootstrap, @"C:\Temp\montecarlo-result.json") { BlockSize = 10 };
Print("Monte Carlo block size: {0}", monteCarlo.BlockSize);
monteCarlo = MonteCarloSettings(MonteCarloMethod.BlockBootstrap, r"C:\Temp\montecarlo-result.json")
monteCarlo.BlockSize = 10
api.Print(f"Monte Carlo block size: {monteCarlo.BlockSize}")