The FX spot generation config
Table of Contents
1. Summary
An fx_spot_generation_config describes how to synthesise the tick stream
for one FX spot rate. It is declared in
ores.synthetic.api/domain/fx_spot_generation_config.hpp, it hangs under a
market_data_generation_config through config_id, and its mixture
components are separate gmm_component rows.
2. Detail
2.1. What the row names
- The pair, as
base_currency_codeandquote_currency_code. Both are soft foreign keys to currencies. - The datum, as
oresmd_uri, the quote URI of the spot rate that the vendor instrument maps to, for example"oresmd://fx/EUR?type=quote&instrument=fx_spot"e=rate&ccy=USD". It is derived from the pair rather than typed. The feed reads it with the strict codec at construction, and refuses a URI that is not anfx_spotquote or whose pair differs from the two currencies. See oresmd: ORE Studio Market Data URI and The oresmd datum identity. - The vendor instrument, as
provider_code,id_scheme,external_idandfield, for examplebloomberg,bbg_ticker,EURUSD CurncyandPX_LAST. It is the id the simulator publishes under, and it is unique among generators. The generator carries no source name and no mark of the simulator. - The cadence, as
ticks_per_hour.
2.2. Where the initial price comes from
price_source holds "fixing" or "fixed", and a SQL check restricts the
column to those two. A new config starts on "fixing".
- Under
"fixing"the feed starts from the newest public fixing of its pair, read at feed start, and its mixture is sized to the spread of the fixings over a window. The candidates come from the class's calibration policy and the series that cover the pair, unless the config names its own items infx_spot_fixing_itemor overrides the window incalibration_window_days. See Publish public fixings through an adapter. - Under
"fixed"the process starts fromgmm_initial_priceas entered. This is the stated fallback for a pair no public source fixes. A"fixing"config that finds no fixing also keepsgmm_initial_price, unless the policy refuses to start it.
gmm_initial_price is greater than zero under either value, since it is the
fallback level. No feed reads a dated reference observation as its start.
ticks_per_hour has its own check and must be greater than zero. It sets the
publish cadence only. The mixture moments are already per tick, so the
process step does not change with the cadence.
2.3. The process choice
process_type holds "geometric", "arithmetic" or
"ornstein_uhlenbeck", and a SQL check restricts the column to those three
strings. The default is "geometric".
The column is a plain string and not a foreign key. An unrecognised value is
therefore not rejected at write time. It is forwarded to
process_factory::make_process, which falls back to the geometric engine for
any string it does not recognise. See
The generator library.
The mixture itself is not on this row. The means, standard deviations and
weights live as gmm_component children. See
The GMM component.
2.4. enabled and auto_start
The two flags are orthogonal and they answer different questions.
enabledsays the config is startable at all. A disabled config may not be started by an auto-start pass or by a manual Start action.auto_startsays the config starts on its own when the service comes up, in every active tenant. A generator reads its fixings as the system service and needs no grant. A config can be enabled and not auto-start, which is the shape a legacy or alternate-index variant takes when it lives beside a currency's primary config.
Starting a generator is refused outright when another generator already serves the same vendor instrument. Nothing auto-disables the running one, so a switch is a Stop followed by a Start.
2.5. The fact the code shape does not show
folder_id is optional, and only the bundle path fills it. A rate made by hand
has no position in the Market Simulator tree.
The pair is not the process identity. Two configs for the same pair differ by their component rows, and the collision rule binds them by the vendor instrument alone, so they cannot run at the same time whatever else differs.
3. See also
- Market Data Architecture — the structure note that orders this cluster, and where to read this page in it.
- The generation config collection and folders, which owns this row.
- The GMM component, one row per weighted Gaussian.
- The FX spot producer, which starts from this row.
- The generator library, which turns
process_typeinto an engine. - The IR curve generation config, the second asset class, whose choices differ in the places noted there.