SampleBars
forge.testingclassSince Forge API 1
Signaturepython
forge.testing.SampleBars(name: str,symbol: str,timeframe: str,frame: pd.DataFrame,facts: Mapping[str, Any],seed: int,version: int,description: str,minutes: pd.DataFrame | None = None,utc_offset_minutes: np.ndarray | None = None,bricks: Any = None) -> NoneA set of bars for tests, with the facts of the instrument they imitate.
Parameters
| Name | Type | Default |
|---|---|---|
| name | str | |
| symbol | str | |
| timeframe | str | |
| frame | pd.DataFrame | |
| facts | Mapping[str, Any] | |
| seed | int | |
| version | int | |
| description | str | |
| minutes | pd.DataFrame | None | None |
| utc_offset_minutes | np.ndarray | None | None |
| bricks | Any | None |
frame is close-labelled in broker time. minutes is the minute path the bars were built
from, in
UTC, so a sample can be rebuilt at another timeframe. utc_offset_minutes holds one offset
for each bar
when the broker's clock changes inside the sample, and is None otherwise. The prices are
Forge's own
seeded synthetic prices, never real market data.