From c8dce7755b1ec7d18b50cdd6df254180f67975fb Mon Sep 17 00:00:00 2001 From: albie Date: Wed, 28 May 2025 21:19:50 +0100 Subject: [PATCH 1/3] feat(exchange_rate): add purpose to exchange rate schema --- documentation/properties/purpose.md | 19 ++++++++++++++++++- schemas/exchange_rate.json | 18 ++++++++++++++++-- v1-dev/exchange_rate.json | 18 ++++++++++++++++-- 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/documentation/properties/purpose.md b/documentation/properties/purpose.md index 505e8826..5431efea 100644 --- a/documentation/properties/purpose.md +++ b/documentation/properties/purpose.md @@ -1,7 +1,7 @@ --- layout: property title: "purpose" -schemas: [account, loan, security, derivative, derivative_cash_flow] +schemas: [account, loan, security, derivative, derivative_cash_flow, exchange_rate] --- # purpose @@ -979,6 +979,23 @@ Use this enum to refer to funds reserved for the purpose of implementing, from a --- +# exchange_rate + +The exchange rate type represents different types of exchange rates used for various financial calculations and reporting purposes. + +```bash +├── average_rate +└── closing_rate +``` + +### average_rate +An exchange rate that represents the user-defined average over a specific period, used for P&L reporting. + +### closing_rate +The point-in-time exchange rate based on the reporting date, used for balance sheet items. + +--- + [reg]: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32009R0494&from=EN [midifdir]: https://eur-lex.europa.eu/legal-content/en/TXT/?uri=CELEX:32014L0065 [crr]: http://eur-lex.europa.eu/legal-content/EN/TXT/?uri=celex%3A32013R0575 diff --git a/schemas/exchange_rate.json b/schemas/exchange_rate.json index 1a180212..6c85852f 100644 --- a/schemas/exchange_rate.json +++ b/schemas/exchange_rate.json @@ -17,6 +17,14 @@ "description": "The base currency in accordance with ISO 4217 standards.", "$ref": "https://raw.githubusercontent.com/SuadeLabs/fire/master/schemas/common.json#/currency_code" }, + "purpose": { + "description": "Defines whether the exchange rate represents a user-defined average over a specific period (for P&L) or a point-in-time rate (for balance sheet).", + "type": "string", + "enum": [ + "average_rate", + "closing_rate" + ] + }, "quote": { "description": "The amount of the quote currency received in exchange for 1 unit of the base currency.", "type": "number" @@ -34,6 +42,12 @@ "type": "string" } }, - "required": ["id", "date", "base_currency_code", "quote", "quote_currency_code"], + "required": [ + "id", + "date", + "base_currency_code", + "quote", + "quote_currency_code" + ], "additionalProperties": true -} +} \ No newline at end of file diff --git a/v1-dev/exchange_rate.json b/v1-dev/exchange_rate.json index 1a180212..6c85852f 100644 --- a/v1-dev/exchange_rate.json +++ b/v1-dev/exchange_rate.json @@ -17,6 +17,14 @@ "description": "The base currency in accordance with ISO 4217 standards.", "$ref": "https://raw.githubusercontent.com/SuadeLabs/fire/master/schemas/common.json#/currency_code" }, + "purpose": { + "description": "Defines whether the exchange rate represents a user-defined average over a specific period (for P&L) or a point-in-time rate (for balance sheet).", + "type": "string", + "enum": [ + "average_rate", + "closing_rate" + ] + }, "quote": { "description": "The amount of the quote currency received in exchange for 1 unit of the base currency.", "type": "number" @@ -34,6 +42,12 @@ "type": "string" } }, - "required": ["id", "date", "base_currency_code", "quote", "quote_currency_code"], + "required": [ + "id", + "date", + "base_currency_code", + "quote", + "quote_currency_code" + ], "additionalProperties": true -} +} \ No newline at end of file From 6083257a68825b6ba4635336e4d45a14eda3541f Mon Sep 17 00:00:00 2001 From: Albie Duffy <54245150+albieduffy@users.noreply.github.com> Date: Wed, 28 May 2025 21:22:13 +0100 Subject: [PATCH 2/3] Update purpose.md --- documentation/properties/purpose.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/properties/purpose.md b/documentation/properties/purpose.md index 5431efea..157c8cdb 100644 --- a/documentation/properties/purpose.md +++ b/documentation/properties/purpose.md @@ -981,7 +981,7 @@ Use this enum to refer to funds reserved for the purpose of implementing, from a # exchange_rate -The exchange rate type represents different types of exchange rates used for various financial calculations and reporting purposes. +The exchange rate purpose represents different types of exchange rates used for various financial calculations and reporting purposes. ```bash ├── average_rate @@ -989,10 +989,10 @@ The exchange rate type represents different types of exchange rates used for var ``` ### average_rate -An exchange rate that represents the user-defined average over a specific period, used for P&L reporting. +An exchange rate that represents the user-defined average over a specific period, used for profit and loss (P&L) reporting. ### closing_rate -The point-in-time exchange rate based on the reporting date, used for balance sheet items. +The point-in-time exchange rate based on the reporting date is used for balance sheet items. --- From 20a19a85f491eaedaf15c708b06fefc99ae93e74 Mon Sep 17 00:00:00 2001 From: murat Date: Fri, 30 May 2025 10:09:59 +0100 Subject: [PATCH 3/3] Adds period for exchange rate --- documentation/properties/period.md | 48 +++++++++++++++++++++++++++++ documentation/properties/purpose.md | 23 +++----------- schemas/exchange_rate.json | 11 ++++--- v1-dev/exchange_rate.json | 11 ++++--- 4 files changed, 66 insertions(+), 27 deletions(-) create mode 100644 documentation/properties/period.md diff --git a/documentation/properties/period.md b/documentation/properties/period.md new file mode 100644 index 00000000..7039af42 --- /dev/null +++ b/documentation/properties/period.md @@ -0,0 +1,48 @@ +--- +layout: property +title: "period" +schemas: [exchange_rate] +--- + +# period + +--- + + + +# Exchange Rate + +The period corresponds to the methodology and period over which the excange rate has been calculated. This assumes that the current **date** is the end of the period. So *avg_3m* can be understood as the average rate over the past 3 months. + +If period is blank, it can be assumed the that rate corresponds to the current spot rate (ie. no period). The spot rate is the reference rate that corresponds to the exchange rate on the provided **date**. Reference rates are rates determined by the firm or the relevant central bank for a given date for reporting purposes. (e.g. [ECB EUR Reference Rates][ecb-ref-rates], [BoE Reference Rates][boe-ref-rates]). If **type** is left blank that it can be assumed to be the spot rate for the given **date** of the data. + + +```bash +├── avg_1m +├── avg_3m +├── avg_6m +├── avg_12m +└── avg_ytd +``` + + +### avg_1m +The average rate over the past month. + +### avg_3m +The average rate over the past 3 months. + +### avg_6m +The average rate over the past 6 months. + +### avg_12m +The average rate over the past 12 months. + +### avg_ytd +The average rate since the start of the current calendar year. + + +--- + +[ecb-ref-rates]: https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html +[boe-ref-rates]: https://www.bankofengland.co.uk/statistics/exchange-rates diff --git a/documentation/properties/purpose.md b/documentation/properties/purpose.md index 157c8cdb..aa6ef669 100644 --- a/documentation/properties/purpose.md +++ b/documentation/properties/purpose.md @@ -1,7 +1,7 @@ --- layout: property title: "purpose" -schemas: [account, loan, security, derivative, derivative_cash_flow, exchange_rate] +schemas: [account, loan, security, derivative, derivative_cash_flow] --- # purpose @@ -953,7 +953,6 @@ In the context of [CRR][crr] Article 328, a reference security would be the unde ### share_capital This indicates shares that have been [issued][issued] for the purpose of raising capital for the company. -[issued]: https://www.investopedia.com/terms/s/sharecapital.asp ### non_controlling [Commission Regulation (EC) No 494/2009][reg] defines **non-controlling interest** as: @@ -968,31 +967,14 @@ Use this enumeration value to highlight back to back trades defined as "exactly ### single_collateral_pool Use this enumeration value to identify to securities which are placed into a central bank single collateral pool. A list of eligible security types for the Bank of England SCP can be found [here][scp] -[scp]: https://www.bankofengland.co.uk/markets/eligible-collateral ### ocir Use this enum to refer to funds reserved for the purpose of implementing, from an operational point of view, the resolution strategy and, consequently, to stabilise and restructure the bank. [Bank of England OCIR][ocir] -[ocir]: https://www.bankofengland.co.uk/-/media/boe/files/prudential-regulation/supervisory-statement/2021/ss421-may-2021.pdf ---- -# exchange_rate - -The exchange rate purpose represents different types of exchange rates used for various financial calculations and reporting purposes. - -```bash -├── average_rate -└── closing_rate -``` - -### average_rate -An exchange rate that represents the user-defined average over a specific period, used for profit and loss (P&L) reporting. - -### closing_rate -The point-in-time exchange rate based on the reporting date is used for balance sheet items. --- @@ -1008,4 +990,7 @@ The point-in-time exchange rate based on the reporting date is used for balance [osfi-bb]: https://www.osfi-bsif.gc.ca/en/data-forms/reporting-returns/filing-financial-returns/financial-reporting-instructions/irb-credit-data-wholesale-portfolio-part-1-bb [osfi-bd]: https://www.osfi-bsif.gc.ca/en/data-forms/reporting-returns/filing-financial-returns/financial-reporting-instructions/irb-credit-data-retail-portfolio-part-1-bd [osfi-b20]: https://www.osfi-bsif.gc.ca/Eng/Docs/b20_dft.pdf +[scp]: https://www.bankofengland.co.uk/markets/eligible-collateral +[issued]: https://www.investopedia.com/terms/s/sharecapital.asp +[ocir]: https://www.bankofengland.co.uk/-/media/boe/files/prudential-regulation/supervisory-statement/2021/ss421-may-2021.pdf diff --git a/schemas/exchange_rate.json b/schemas/exchange_rate.json index 6c85852f..2f1b24cf 100644 --- a/schemas/exchange_rate.json +++ b/schemas/exchange_rate.json @@ -17,12 +17,15 @@ "description": "The base currency in accordance with ISO 4217 standards.", "$ref": "https://raw.githubusercontent.com/SuadeLabs/fire/master/schemas/common.json#/currency_code" }, - "purpose": { - "description": "Defines whether the exchange rate represents a user-defined average over a specific period (for P&L) or a point-in-time rate (for balance sheet).", + "period": { + "description": "Describes the reference methodology and period for the exchange rate.", "type": "string", "enum": [ - "average_rate", - "closing_rate" + "avg_12m", + "avg_1m", + "avg_3m", + "avg_6m", + "avg_ytd" ] }, "quote": { diff --git a/v1-dev/exchange_rate.json b/v1-dev/exchange_rate.json index 6c85852f..2f1b24cf 100644 --- a/v1-dev/exchange_rate.json +++ b/v1-dev/exchange_rate.json @@ -17,12 +17,15 @@ "description": "The base currency in accordance with ISO 4217 standards.", "$ref": "https://raw.githubusercontent.com/SuadeLabs/fire/master/schemas/common.json#/currency_code" }, - "purpose": { - "description": "Defines whether the exchange rate represents a user-defined average over a specific period (for P&L) or a point-in-time rate (for balance sheet).", + "period": { + "description": "Describes the reference methodology and period for the exchange rate.", "type": "string", "enum": [ - "average_rate", - "closing_rate" + "avg_12m", + "avg_1m", + "avg_3m", + "avg_6m", + "avg_ytd" ] }, "quote": {