stockparfait / experiments

Statistical experiments with financial data
Apache License 2.0
0 stars 0 forks source link

Extend Source to intraday series #130

Closed sergey-a-berezin closed 1 year ago

sergey-a-berezin commented 1 year ago

Currently, config.Source and the corresponding experiments.Source generate daily log-profits and daily OHCL price series using log-profit distributions from the previous close. This is not an accurate model, and moreover, it would be useful to match real intraday price series with synthetically generated intraday log-profits.

The idea is to introduce daily and intraday log-profit distributions, where daily is used to generate open[t+1]/close[t] log-profits, and intraday generates the high frequency log-profits from open to close of the same day. This, in turn, can either be used as intraday log-profits directly, or resampled to daily OHLC prices.

As an optimization, the same daily distribution can also be used to generateclose[t+1]/close[t] log-profits when only daily log-profits are desired.

The config, therefore, should be able to express the following situations:

sergey-a-berezin commented 1 year ago

One way to achieve it is to have the following fields:

sergey-a-berezin commented 1 year ago

Note, that for independent samples daily distribution can always stay as close[t+1]/close[t] log-profit, and the intraday distribution can generate samples "backwards" from close to open. However, I'm choosing to generate always forward to accommodate a possible stateful model refinement such as #122.