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) -> SampleBarsA seeded synthetic sample. seed has no default: an unseeded call is a TypeError.
Parameters
| Name | Type | Default |
|---|---|---|
| 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 |
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).