Statistical data (FX, Interest Rates, Other)

From cbwiki.net
Jump to: navigation, search
Please note that this page relates to a deprecated version of RSS-CB. Please find links to the current version via the RSS-CB home page

RSS is typically used to disseminate news items, such as press releases. However, the RSS format lends itself to the display of items not normally thought of as news, such as units of statistical data. Almost all central banks publish two types of statistical data of particular interest to many of their users, and which can be consistently represented using RSS-CB -- exchange rates and interest rates.

This document specifies the extension of RSS-CB for exchange and interest rates, and gives general guidelines for other types of statistical data. As part of RSS-CB, it follows the RSS-CB specification. It extends that specification by restricting the sub-elements of <item>, and adding new ones. This document covers those extensions.

This is RSS-CB version 1.0

Contents

Exchange Rates

As published on most central bank websites, exchange rates contain certain pieces of information that are required to make them unique and unambiguous:

  • country reporting the rate
  • base currency
  • target currency
  • units of target currency reported as equivalent to units of base currency
  • date of observation
  • institution reporting the rate
  • type of rate: noon, spot, closing, bid, asked, et al.

This leads to an RSS-CB feed with this structure:

Sample RSS-CB exchange rate feed

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://purl.org/rss/1.0/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:dcterms="http://purl.org/dc/terms/"
  xmlns:cb="http://www.centralbanks.org/rss-cb/1.0/"
  xmlns:yourinstitution="http://yoursite/yournamespace/"
  xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.w3c.org/1999/02/22-rdf-syntax-ns#rdf.xsd">

<channel rdf:about="http://newyorkfed.org/markets/fxrates/noon.cfm/">
  <title>NY Fed FX Rates</title>
  <link>http://newyorkfed.org/markets/fxrates/noon.cfm</link>
  <description>The noon buying rates in New York for cable 
transfers payable in foreign currencies are certified by the 
Federal Reserve Bank of New York for customs purposes, as required 
by Section 522 of the amended Tariff Act of 1930. The information 
is based on data collected by the Federal Reserve Bank of New York 
and is intended only for informational purposes. The data were 
obtained from sources believed to be reliable but this bank does 
not guarantee their accuracy, completeness or correctness. The 
Federal Reserve Bank of New York reserves the right to determine 
this information and the manner in which it is provided at its sole
discretion.</description>
  <items>
    <rdf:Seq>
      <rdf:li rdf:resource="http://newyorkfed.org/markets/fxrates/USD-CAD.xml" />
    </rdf:Seq>
  </items>
  <dc:language>en</dc:language>
  <dc:date>2006-08-15T16:14:36-05:00</dc:date>
  <dc:publisher>Federal Reserve Bank of New York</dc:publisher>
  <dcterms:license>http://newyorkfed.org/termsofuse.html</dcterms:license>
</channel>

<item rdf:about="http://newyorkfed.org/markets/fxrates/USD-CAD.xml">
  <title>US: 1.1250 CAD = 1 USD 2006-08-14 NYFed noon buying</title>
  <link>http://newyorkfed.org/markets/fxrates/noon.cfm</link>
  <description></description>
  <dc:language>en</dc:language>
  <dc:date>2006-08-14</dc:date>
  <cb:country>US</cb:country>
  <cb:baseCurrency>USD</cb:baseCurrency>
  <cb:targetCurrency>CAD</cb:targetCurrency>
  <cb:value frequency="daily" decimals="4">1.1240</cb:value>
  <cb:rateType>noon buying</cb:rateType>
  <cb:institutionAbbrev>NYFed</cd:institutionAbbrev>
  <cb:application>statistics</cb:application>
</item>

</rdf:RDF>

<title>

As discussed in the User Guide, some RSS readers display only the <title> for each <item> in a feed. Furthermore, some readers will truncate the <title> at around 50 characters. So it is important that all of the essential information about an exchange rate be expressed within the <title>, and in 50 characters or fewer.

In the example above, these RSS readers would display:


US: 1.1240 CAD = 1 USD 2006-08-14 NYFed noon buyin
Field separation

RSS-CB statistical feeds will be consumed by a variety of machine processes created by their consumers. For this reason, the fields are separated into individual elements within the RSS file. The title is intended primarily to give human readers all relevant information at a glance. However, to allow a process the additional option of parsing only the title, the information in the title is separated by set punctuation and blank spaces, until the last field, which may contain embedded blanks.

Field order and punctuation

To meet the needs of human users, the <title> has the more significant information before the less significant. The order is identity of country, units of target currency, code for target currency, units of base currency (normally 1, but possibly another power of 10), code for base currency, date of rate, institution, and type of rate.

The title has set punctuation. With this punctuation, a title has these elements, in this order:

  • Country code
  • colon
  • blank space
  • Units of target currency
  • blank space
  • Target currency code
  • blank space
  • equal sign
  • blank space
  • Units of base currency (set to a power of 10, normally '1')
  • blank space
  • Base currency code
  • blank space
  • Date (ISO-8601 format)
  • Institution identifier
  • Rate name

attribute rdf:about

Each value of an rdf:about attribute must be unique within an RSS document. This may require the construction of artificial URIs in an RSS feed that contains items for different exchange rates. Such URIs can be constructed with anchor tags. For example, if an actual resource is http://www.acb.org/fx/, two different items could be distinguished as http://www.acb.org/fx/#MXP and http://www.acb.org/fx/#ZAR.

<description>

The specification offers no guidance on the content of this element. In the example above, it is blank. Some RSS readers will display the contents of this field, so institutions may find it useful.

<dc:date>

Required. This contains the date of the observation of the exchange rate. The value contains the sixth field of the title, and may contain additional timestamp information. See User Guide

<cb:application>

Required. Set to the value statistics. See User Guide

<cb:country>

Required. This contains the ISO [1] value for the country responsible for the observation. The value is identical to the first field of the title, without the colon. See User Guide.

<cb:baseCurrency>

Required. This contains the ISO [2] representation of the base currency of the observation. The value is identical to the fifth field of the title.

unit_mult attribute

Optional. This contains an exponent of 10. The default is 0, for stating the baseCurrency in terms of 1 unit. See User Guide.

<cb:targetCurrency>

Required. This contains the ISO [3] representation of the target currency of the observation. The value is identical to the third field of the title. See User Guide.

<cb:value>

Required. This contains the value of the observation of the target currency, expressed in units of the base currency. The value is identical to the second field of the title. See User Guide

frequency attribute

This contains the value of the frequency. In the schema for exchange rates, the value will be limited to the enumerated values in a code list. See User Guide

decimals attribute

This contains the value of the decimal places used to express the value of the exchange rate. In the schema for exchange rates, the value will be limited to the enumerated values in a code list. See User Guide

<cb:rateType>

Required. This contains a free text value describing the rate type as identified by the reporting institution. The value is identical to the final field of the title. See User Guide


Interest Rates

Sample RSS-CB interest rate feed

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://purl.org/rss/1.0/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:dcterms="http://purl.org/dc/terms/"
  xmlns:cb="http://www.centralbanks.org/rss-cb/1.0/"
  xmlns:yourinstitution="http://yoursite/yournamespace/"
  xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.w3c.org/1999/02/22-rdf-syntax-ns# 
  rdf.xsd">

<channel rdf:about="http://newyorkfed.org/markets/omo/dmm/fedfundsdata.cfm/">
  <title>NY Fed | Fed Funds Rates</title>
  <link>http://newyorkfed.org/markets/omo/dmm/fedfundsdata.cfm</link>
  <description>The federal funds rate is the rate at which 
depository institutions lend balances to each other overnight.</description>
  <items>
    <rdf:Seq>
      <rdf:li rdf:resource="http://newyorkfed.org/markets/omo/dmm/fftoXML.cfm?type=daily" />
    </rdf:Seq>
  </items>
  <dc:language>en</dc:language>
  <dc:date>2007-04-30</dc:date>
  <dc:publisher>Federal Reserve Bank of New York</dc:publisher>
</channel>

<item rdf:about="http://newyorkfed.org/markets/omo/dmm/fftoXML.cfm?type=daily">
  <title>US: 5.29 FedFunds 2007-04-30 NYFed daily fed funds effective rate</title>
  <link>http://newyorkfed.org/markets/omo/dmm/fftoXML.cfm?type=daily</link>
  <description>The daily federal funds effective rate for 2007-04-30 is 5.29</description>
  <dc:language>en</dc:language>
  <dc:date>2007-04-30</dc:date>
  <cb:country>US</cb:country>
  <cb:simpleTitle>5.29 2007-04-30 daily fed funds effective</cb:simpleTitle>
  <cb:rateName>FedFunds</cb:rateName>
  <cb:rateType>daily fed funds effective</cb:rateType>
  <cb:value frequency="daily" decimals="2">5.29</cb:value>
  <cb:institutionAbbrev>NYFed</cb:institutionAbbrev>
  <cb:application>statistics</cb:application>
</item>

</rdf:RDF>

<title>

Required. As discussed above, some RSS readers display only the <title> for each <item> in a feed, and some readers will truncate this field at around 50 characters. So it is important that all of the essential information about any datum be expressed within the first 50 characters of <title>.

In the example above, RSS readers would display:

 US: 5.29 FedFunds 2007-04-30 NYFed daily fed funds effective rate

Field separation

RSS-CB statistical feeds will be consumed by a variety of machine processes created by their consumers. For this reason, the fields are separated into individual elements within the RSS file. Should a process wish to parse the title, the six fields it contains are separated by blank spaces. The sixth and last field may itself have embedded blank characters (as in "daily fed funds effective rate").

Field order

To meet the needs of human users, the <title> has the more significant information before the less significant. The order is ISO [4] country code followed by a colon, value of the interest rate, rate name, date of the observation, institution (abbreviation), rate type.

<description>

The specification offers no guidance on the content of this element. In the example above, it contains the explanation given on the New York Fed site for the rate being described.

<dc:date>

Required. This contains the date of the observation of the interest rate. The value contains the fourth field of the title, and may contain additional timestamp information. See User Guide.

<cb:rateName>

Required. This contains the higher-level local name for the rate. For the New York Fed, Fed Funds denotes a set of observations that include the daily effective rate, the high and low points in the range for the observation period, and more. This field indicates only the higher-level name. The value is identical to the third field of the title. See User Guide.

<cb:rateType>

Required. This contains a free text value describing the rate type as identified by the reporting institution. It is a refinement of the rate name. The value is identifical to the final field of the title. See User Guide.

<cb:value>

Required. This contains the value of the observation, expressed as a decimal. The value is identical to the second field of the title. See User Guide.

frequency attribute

This contains the value of the frequency. In the schema for interest rates, the value will be limited to the enumerated values in a code list. See User Guide.

decimals attribute

This contains the value of the decimal places used to express the value of the interest rate. In the schema for interest rates, the value will be limited to the enumerated values in a code list. See User Guide.

<cb:country>

Required. This contains the ISO value for the country responsible for the observation. The value is identical to the first field of the title, without the colon. See User Guide.

<cb:institutionAbbrev>

Required. This contains the abbreviation that signifies the identity of the institution. It contains no blanks. It is identical to the fifth field of the title.

<cb:application>

Required. Set to the value statistics. See User Guide.

Transactions

Sample RSS-CB transaction feed

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://purl.org/rss/1.0/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:dcterms="http://purl.org/dc/terms/"
  xmlns:cb="http://www.centralbanks.org/rss-cb/1.0/"
  xmlns:yourinstitution="http://yoursite/yournamespace/"
  xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.w3c.org/1999/02/22-rdf-syntax-ns# 
  rdf.xsd">

<channel rdf:about="http://www.newyorkfed.org/markets/pomo/display/index.cfm">
  <title>NY Fed | Permanent Open Market Operations</title>
  <link>http://www.newyorkfed.org/markets/pomo/display/index.cfm</link>
  <description>Monetary policy can be implemented through outright purchases or 
sales of securities, which permanently change the size of the Federal Reserve's 
System Open market Account portfolio.</description>
  <items>
    <rdf:Seq>
      <rdf:li rdf:resource="http://www.newyorkfed.org/markets/pomo/display/index.cfm/>
    </rdf:Seq>
  </items>
  <dc:language>en</dc:language>
  <dc:date>2007-04-23</dc:date>
  <dc:publisher>Federal Reserve Bank of New York</dc:publisher>
</channel>

<item rdf:about="http://www.newyorkfed.org/markets/pomo/display/index.cfm?type=daily">
  <title>US: $1.781B CouponPurchase 2007-04-23 NYFed permanent open market operations</title>
  <link>http://www.newyorkfed.org/markets/pomo/display/index.cfm</link>
  <description>Monetary policy can be implemented through outright purchases or 
sales of securities, which permanently change the size of the Federal Reserve's 
System Open market Account portfolio.</description>
  <dc:language>en</dc:language>
  <dc:date>2007-04-23</dc:date>
  <dc:format>text/html</dc:format>
  <cb:country>US</cb:country>
  <cb:simpleTitle>1.781B CouponPurchase 2007-04-23</cb:simpleTitle>
  <cb:transactionName>CouponPurchase</cb:transactionName>
  <cb:transactionType>permanent open market operations</cb:transactionType>
  <cb:value decimals="4" unit_mult="9">1.781</cb:value>
  <cb:currency>USD</cb:currency>
  <cb:institutionAbbrev>NYFed</cb:institutionAbbrev>
  <cb:application>statistics</cb:application>
</item>

</rdf:RDF>

<title>

Required. As discussed above, some RSS readers display only the <title> for each <item> in a feed, and some readers will truncate this field at around 50 characters. So it is important that all of the essential information about any datum be expressed within the first 50 characters of <title>.

In the example above, RSS readers would display:

 US: 1.781B CouponPurchase 2007-04-23 NYFed permanent open market operations
Field separation

RSS-CB statistical feeds will be consumed by a variety of machine processes created by their consumers. For this reason, the fields are separated into individual elements within the RSS file. Should a process wish to parse the title, the six fields it contains are separated by blank spaces. The sixth and last field may itself have embedded blank characters (as in "permanent open market operations").

Field order

To meet the needs of human users, the <title> has the more significant information before the less significant. The order is identity of ISO country code followed by a colon, transaction value, transaction name, date, institution (abbreviation), transaction type.

<description>

The specification offers no guidance on the content of this element. In the example above, it contains the explanation given on the New York Fed site for the rate being described.


<dc:date>

Required. This contains the date of the observation of the transaction. The value contains the fourth field of the title, and may contain additional timestamp information. See User Guide


<cb:transactionType>

Required. This contains a free text value describing the transaction type as identified by the reporting institution. It is a refinement of the transaction name. The value is identifical to the final field of the title. See User Guide

<cb:transactionName>

Required. This contains the higher-level local name for the transaction. For the New York Fed, CouponPurchase represents one of three types of permanent open market operations conducted. The value is identical to the third field of the title. See User Guide


<cb:transactionTerm>

Optional. This contains the term of the transaction and should be concatenated to the transaction name in the title. At the New York Fed, 1day is the transaction term and repo is the is the transaction name in the following example:

 US: $8.750B 1day-repo 2007-04-24 NYFed temporary open market operations

<cb:value>

Required. This contains the value of the observation, expressed as a decimal. The value is identical to the second field of the title. See User Guide

unit_mult attribute

Optional. This contains an exponent of 10. The default is 0, for stating the baseCurrency in terms of 1 unit. See User Guide.

decimals attribute

This contains the value of the decimal places used to express the value of the transaction. See User Guide

units attribute

This string contains a description of the units of the datum. It can be a text string with blanks or a value from the enumerated values in a code list. See User Guide

<cb:country>

Required. This contains the ISO [4] value for the country responsible for the transaction. The value is identical to the first field of the title, without the colon. See User Guide.

<cb:institutionAbbrev>

Required. This contains the abbreviation that signifies the identity of the institution. It contains no blanks. It is identical to the fifth field of the title.

<cb:application>

Required. Set to the value statistics. See User Guide

General guidelines for other types of data

While interest rates and exchange rates are obvious common products, central banks produce other data that consumers may wish to receive through RSS. One of the most watched statistics from the Federal Reserve Board, for example, is the Industrial Production index for the manufacturing sector of the US economy. These general guidelines use this release as an example of how a single data point may be presented to an aggregator. The Federal Reserve Board also publishes weekly data on commercial paper outstandings as well as commercial paper rates. Like the transactions data, neither the IP indexes and the outstandings measures fit into the rate mold mentioned previously, so slightly different fields are necessary to correctly represent these data.

Sample RSS-CB commercial paper outstandings feed

<?xml version="1.0" encoding="UTF-8"?> 
<rdf:RDF 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
   xmlns="http://purl.org/rss/1.0/" 
   xmlns:dc="http://purl.org/dc/elements/1.1/" 
   xmlns:dcterms="http://purl.org/dc/terms/" 
   xmlns:cb="http://www.centralbanks.org/cb/1.0/" 
   xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance" 
   xsi:schemaLocation="http://www.w3c.org/1999/02/22-rdf-syntax-ns#rdf.xsd"> 
<channel rdf:about="http://www.federalreserve.gov/releases/cp"> 
   <title>FRB:Data:CP Foreign nonfinancial outstanding, NSA </title> 
   <link>http://www.federalreserve.gov/releases/cp/about.htm</link> 
   <description> Data on Commerical Paper outstanding from the Federal Reserve are derived 
from data supplied by The Depository Trust Company.</description> 
   <items> 
     <rdf:Seq> 
       <rdf:li rdf:resource="http://www.federalreserve.gov/releases/cp/outstandings.htm#1" /> 
     </rdf:Seq> 
   </items> 
   <dc:language>en</dc:language> 
   <dc:date>2007-05-09T11:30:00-05:00</dc:date> 
   <dc:publisher>Board of Governors of the Federal Reserve</dc:publisher> 
</channel> 

<item rdf:about = "http://www.federalreserve.gov/releases/cp/outstandings.htm#1">
  <title> US: CP 26.0 2007-05-02 FRB Foreign nonfinancial NSA outstanding </title>
  <link> http://www.federalreserve.gov/releases/cp/outstandings.htm#1</link>
  <description>Amount of foreign nonfinancial commercial paper outstanding, 
not seasonally adjusted, billions of US dollars. </description> 
  <dc:language>en</dc:language> 
  <cb:country>US</cb:country>
  <cb:publicationDate> 2007-05-09</cb:publicationDate> 
  <cb:topic>CP</cb:topic> 
  <cb:dataType>Not seasonally adjusted</cb:dataType> 
  <cb:coverage>Foreign nonfinancial</cb:coverage> 
  <cb:value frequency = "weekly" decimals = "1" units = "Billions of US dollars"> 
26.0  </cb:value> 
  <cb:institutionAbbrev>FRB</cb:institutionAbbrev>
  <cb:application>statistics</cb:application> 
</item>
</rdf:RDF> 

<title>

Required. As discussed previously, some RSS readers display only the <title> for each <item> in a feed and some readers will truncate this field around 50 characters. Therefore it is important that all of the essential information about any datum be expressed within the first 50 characters of <title>.

In the case of the CP outstanding measure mentioned above, RSS readers would display:

 US: CP 26.0 2007-05-02 FRB Foreign nonfinancial NSA outstanding
Field separation

In the case of non-rate data, there may be more than 5 fields needed and they may contain special characters.

Field order

To meet the needs of human users, the <title> has the more significant information before the less significant. The suggested order is:
Country, topic, observation, date of observation, institution, and coverage
There may be some additional geographic or regional indicators necessary as well.

In order to meet the needs of the automated processes, each piece of the title is expressed as a separate tagged element in fields that are likely to be ignored by most RSS readers. The following elements are applicable to general data feeds, in addition to the required <title> and <link> elements.

<description>

Required:Another field that should be used to provide additional information to the human reader. The content of this text field is left to the discretion of the publishing institution.


<dc:language>

Optional: Indicates language of the content described by the item. Use the standard found in ISO 3066


<cb:country>

Required:This contains the ISO 3166-1 country code of the country reporting the rate, followed by a colon. In the schema for exchange rates, the value will be limited to the enumerated values in a code list. The value is identical to the first field of the title.

<cb:publicationDate>

Required: A string representing the stated date for the publication, not necessarily the date of the feed. For some observations, this will be some month-year representation; for others it may be a quarterly or semi-annual indicator. For example "2006H1, "2008Q1", "2004-5"

<cb:topic>

Required:A string representing the economic area to which the data belong. These can be institution specific. Abbreviations are acceptable as long as they can be easily interpreted from information provided in other fields or draw from established code lists. The value is identical to the second field of the title.

<cb:dataType>

Recommended:A string containing additional information about the datum provided. Indications of measure, seasonal adjustment, change calculations should be indicated here. This field is especially important to include if an institution is publishing feeds for data with similar coverage, topic, etc. but that differ only in one specific attribute.

<cb: coverage>

Recommended:A string indicating the sector, industry or region to which the datum is applicable. The information here is likely represented in the text at the end of the title. Italic text

<cb:value>

Required: This contains the value of the observation. The value will be identical to the third field in the title. For data that are not clearly represented by rates, there are three required attributes

frequency attribute

Required: This contains the value of the frequency. The value maybe limited to the enumerated values in a code list.

decimals attribute

Required: This contains the number of decimal places used to express the value.

units attribute

Required: This string contains a description of the units of the datum. It can be a text string with blanks or a value from the enumerated values in a code list.

<cb:institutionAbbrev>

Required. This contains the abbreviation that signifies the identity of the institution. It contains no blanks. It is identical to the fifth field of the title.

<cb:application>

Required. Set to the value statistics. See User Guide