ores.synthetic.variance_calibration_input
Table of Contents
One capture of the data a variance calibration reads: the item that was read for a
pair, under which calibration policy, over which window, and whether its value was
inverted to reach the pair's market convention. Each fixing date of the window is
a variance_calibration_input_point, kept whether it was used or not, so a reader
can see every number a fit saw. A fit reads only a stored input, never the live
fixings, so the same input always gives the same fit. See "A calibration is stored
and reviewed before a feed runs it" in
Volatility clustering and GARCH models.
Who captured the input and when are the performed_by and valid_from every row
carries. A capture over the same window of the same item is a new version of the
input, not a second input, by the natural key: the party, the fixing URI and the
window. The item names the pair it is read for, so the pair is not part of the key.
1. Flags
2. Columns
2.1. id
Surrogate UUID uniquely identifying this input.
2.2. party_id
Owning party this input belongs to: the system party, as for the feeds.
ctx.generate_uuid()
2.3. base_currency_code
The pair's base currency, in the pair's market convention.
std::string("EUR")
2.4. quote_currency_code
The pair's quote currency.
std::string("USD")
2.5. fixing_uri
The oresmd fixing URI of the item that was read, such as
oresmd://fx/USD?type=fixing&index=fx&source=IMF&ccy=AUD.
std::string("oresmd://fx/EUR?type=fixing&index=fx&source=ECB&ccy=USD")
2.6. provider_code
The provider whose fixings of the item were read, chosen by the policy's provider order.
std::string("ecb")
2.7. inverted
Whether the item quotes the pair the other way round, so each fixing was read as one over its value; the points' returns are in the pair's market convention either way.
faker::datatype::boolean()
2.8. policy_id
Soft reference to the calibration_policy the item and the window were chosen
under.
ctx.generate_uuid()
2.9. policy_version
The version of that policy, so a later change to the policy does not rewrite what this input was read under.
1
2.10. window_end
The last date of the window: the newest fixing date the capture asked for.
std::chrono::year_month_day{std::chrono::floor<std::chrono::days>(ctx.past_timepoint())}
2.11. window_days
The length of the window in calendar days, the policy's variance window at the time of the capture.
1826
2.12. point_count
How many fixing dates the window held, each a point of this input.
faker::number::integer(100, 1300)
2.13. used_count
How many of those points gave a return the fit may use.
faker::number::integer(0, 100)
3. SQL
3.1. Flags
3.2. Checks
| expression |
|---|
| "base_currency_code" <> "quote_currency_code" |
| "fixing_uri" <> '' |
| "provider_code" <> '' |
| "window_days" between 30 and 3660 |
| "point_count" >= 0 |
| "used_count" between 0 and "point_count" |
4. Insert trigger
4.1. Validations
| column | validation_function |
|---|---|
| base_currency_code | ores_refdata_validate_currency_fn |
| quote_currency_code | ores_refdata_validate_currency_fn |
5. C++
5.1. Flags
5.2. Repository
The inputs belong to the system tenant, as the feeds they calibrate do, and every tenant reads them.
5.3. Domain includes
#include <boost/uuid/uuid.hpp> #include <chrono> #include <string>
5.4. Entity includes
#include <string>
5.5. Conventions
5.6. Table display
| column | header |
|---|---|
| base_currency_code | Base |
| quote_currency_code | Quote |
| provider_code | Provider |
| window_end | Window End |
| window_days | Days |
| used_count | Used |
| point_count | Points |
| version | Version |
6. See also
- Variance Calibration Input Point – the fixing dates of an input.
- Variance Calibration – what a fit made of an input.
- Volatility clustering and GARCH models – the workflow these records hold.