Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (vicknick, howardR, sleakz), 674 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to make synthetic price series #485672
04/12/22 07:58
04/12/22 07:58
Joined: Feb 2022
Posts: 21
T
TrumpLost Offline OP
Newbie
TrumpLost  Offline OP
Newbie
T

Joined: Feb 2022
Posts: 21
Has anyone here had success generating synthetic data based on real historical data? I think it would be really useful for strategy development, if we could create any number of artificial time series sets which recreate the same statistical behaviors of a given real data set.

And I feel like it should be possible.

I found this very cool demo with the R packages gratis and tsfeatures:
https://www.youtube.com/watch?v=F3lWECtFa44

But it looks like you can't expect this to work on every price series of every timeframe. For example, I wanted to use this with the 5min data for ETH/USD. The other thing I notice and wonder about is how this method could possibly account for the change in market behavior over time. We would have to have some method tracking the change in statistical measures over time. I suppose one experiment to try would be to break the series down into increments (perhaps 1hour each) and then produce a table, one row for every hour of data, each row storing the statical measures generated by tsfeatures, and then use each of these as the input to generate multiple series of synthetic prices histories, which would then be stitched together.

Here is a different technique, which looks very promising for generating synthetic returns, but I don't see a method for analyzing a given set of real data, and accessing the anomaly features within the noise.
https://www.kdnuggets.com/2021/10/synthetic-time-series-anomaly-signatures-python.html

From this article, I'm thinking it seems reasonable that I could generate a synthetic TS using the following steps:
1) take the real data and convert from prices to returns (the lag-1 diff)
2) do some magical analysis to measure the size, frequency, and bias, of return anomalies
3) take the resulting parameters and feed them into the function shown in the article
4) take the resulting series (which would be a series of returns) and convert it to a price curve

But the same challenges I mentioned earlier, would still apply. I think we would need to have some method of breaking the curve down into segments and output a set of parameters for each subset of data analyzed, store those in a table, and then read them back out. But I'm not really sure how we should find the ideal subset length.

This next article looks really promising.
https://oguzserbetci.github.io/generate-time-series/

Unfortunately, a lot of the concepts in this article are over my head. If someone understands this stuff and would be willing to help me out somehow, that would be so amazing. Thankfully it has a github, so maybe with some more time, I'll get there.

If you have experience going down this path, please share. Thanks for reading.

Last edited by TrumpLost; 04/12/22 08:08.
Re: How to make synthetic price series [Re: TrumpLost] #485686
04/13/22 17:05
04/13/22 17:05
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Creating artificial price series with any statistical property is easy, but you cannot replicate anomalies and market inefficiencies in them. For this you had to model the complete market. There's still no way around using the real stuff.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1