Closed sergey-a-berezin closed 1 year ago
One way to achieve it is to have the following fields:
daily distribution
- optional. Without intraday distribution
it generates close[t+1]/close[t]
daily log-profits, and SourceMap
provides only daily LogProfits
. With intraday distribution
and a non-trivial intraday range
it generates the open[t+1]/close[t]
log-profits, i.e. the price change between sessions. It is not used for LogProfits
with intraday only
or when intraday range
is not present or has no bounds.intraday distribution
- optional; when present, SourceMap
generates intraday LogProfits
for each ticker. It is also required for SourceMapPrices
to generate OHLC daily price series.intraday range
defines the start
and end
times of day for a day trading session.intraday resolution
defines the intraday bar duration in minutes; allowed values are 1, 5, 15 and 30 minutes. Together with the intraday range
it also determines the number of intraday samples in each day.intraday only
filters out between-sessions log-profits. It makes intraday distribution
required.days
- what is currently samples
, the number of days for each ticker to generate. Note, that the number of samples is a lot more that days when intraday log-profits are generated, thus the rename.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.
Currently,
config.Source
and the correspondingexperiments.Source
generate daily log-profits and daily OHCL price series using log-profit distributions from the previousclose
. 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
andintraday
log-profit distributions, wheredaily
is used to generateopen[t+1]/close[t]
log-profits, andintraday
generates the high frequency log-profits fromopen
toclose
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:
close/close
)