Class Bootstrap
A class for bootstrapping a return stream.
public class Bootstrap
- Inheritance
-
Bootstrap
- Inherited Members
- Extension Methods
Properties
Iterations
Gets/sets the number of iterations. Defaults to 1000.
public int Iterations { get; set; }
Property Value
Length
Gets/sets the length of the bootstrapped return stream. If null, the length of the return stream passed to Run is used. Can be used to create shorter return streams or longer ones if sampling with replacement.
public int? Length { get; set; }
Property Value
- int?
Replace
Gets/sets whether we sample with replacement. Defaults to true.
public bool Replace { get; set; }
Property Value
RiskFreeRate
Gets/sets the risk free rate in decimal terms (e.g. 5% = 0.05).
public double RiskFreeRate { get; set; }
Property Value
SampleGrouping
Gets/sets the number of consecutive observations to group together to preserve any serial correlation that may be present in the data.
public int SampleGrouping { get; set; }
Property Value
Seed
Gets/sets the seed value to use for randomization.
public int? Seed { get; set; }
Property Value
- int?
Methods
Run(TimeSeries)
Returns bootstrap results for the specified return stream.
public BootstrapResults Run(TimeSeries returns)
Parameters
returns
TimeSeries
Returns
Run(double[], int)
Returns bootstrap results for the specified return stream.
public BootstrapResults Run(double[] returns, int periodsPerYear = 252)