arch.bootstrap.IIDBootstrap.bootstrap¶
- IIDBootstrap.bootstrap(reps: int) Generator[tuple[tuple[ndarray | DataFrame | Series, ...], dict[str, ndarray | DataFrame | Series]], None, None] [source]¶
Iterator for use when bootstrapping
Examples
The key steps are problem dependent and so this example shows the use as an iterator that does not produce any output
>>> from arch.bootstrap import IIDBootstrap >>> import numpy as np >>> bs = IIDBootstrap(np.arange(100), x=np.random.randn(100)) >>> for posdata, kwdata in bs.bootstrap(1000): ... # Do something with the positional data and/or keyword data ... pass
Note
Note this is a generic example and so the class used should be the name of the required bootstrap
Notes
The iterator returns a tuple containing the data entered in positional arguments as a tuple and the data entered using keywords as a dictionary