synthetic

forge.testingfunctionSince Forge API 1
Signaturepython
forge.testing.synthetic(like: str | SampleBars | pd.DataFrame | None = None,*,seed: int,timeframe: str = 'H1',days: int = 180,weekends: bool = True,gaps: int = 0,halts: int = 0,spikes: int = 0,symbol: str | None = None) -> SampleBars

A seeded synthetic sample. seed has no default: an unseeded call is a TypeError.

Parameters

NameTypeDefault
likestr | SampleBars | pd.DataFrame | NoneNone
seedint
timeframestr'H1'
daysint180
weekendsboolTrue
gapsint0
haltsint0
spikesint0
symbolstr | NoneNone

like is a sample's name or a SampleBars, whose walk and symbol are copied, or a frame of bars whose volatility is estimated from its closes. With like=None the walk is that of symbol (EURUSD when it is also None).