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) -> None

A set of bars for tests, with the facts of the instrument they imitate.

Parameters

NameTypeDefault
namestr
symbolstr
timeframestr
framepd.DataFrame
factsMapping[str, Any]
seedint
versionint
descriptionstr
minutespd.DataFrame | NoneNone
utc_offset_minutesnp.ndarray | NoneNone
bricksAnyNone

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.