Title: | Fetch and plot financial stress index and component data. |
Version: | 1.0.0 |
Date: | 2014-06-29 |
Author: | Matt Barry <mrb@softisms.com> |
Maintainer: | Matt Barry <mrb@softisms.com> |
Description: | Forms queries to submit to the Cleveland Federal Reserve Bank web site's financial stress index data site. Provides query functions for both the composite stress index and the components data. By default the download includes daily time series data starting September 25, 1991. The functions return a class of either type easing or cfsi which contain a list of items related to the query and its graphical presentation. The list includes the time series data as an xts object. The package provides four lattice time series plots to render the time series data in a manner similar to the bank's own presentation. |
License: | MIT + file LICENSE |
URL: | https://github.com/mrbcuda/stressr |
BugReports: | https://github.com/mrbcuda/stressr/issues |
Imports: | xts, XML, lattice, latticeExtra |
Suggests: | testthat |
Packaged: | 2014-06-30 03:33:30 UTC; mrb |
NeedsCompilation: | no |
Repository: | CRAN |
Date/Publication: | 2014-06-30 10:59:21 |
Financial stress index component data.
Description
Fetches financial stress index component data as time series and provides plots.
Details
Downloads the financial stress index component daily data in its original XLS format from the Federal Reserve Bank of Cleveland's web site, and then translates that data into an xts
time series object with stress component value histories as columns. Provides custom lattice
line and area plot functions for data presentation.
Author(s)
Matt Barry mrb@softisms.com
References
Federal Reserve Bank of Cleveland research data site http://www.clevelandfed.org/research/data/financial_stress_index/index.cfm
Get stress components summary
Description
Downloads FRB financial stress index component data.
Usage
getComponentSummary(s = NULL)
Arguments
s |
the list of class |
Details
Downloads the Cleveland FRB data products for financial stress index components daily time series. Component values include
foreign exchange markets
credit markets
interbank markets
equity markets
real estate market
securitization market
Value
A list of class stress
See Also
getStressData getEquityMarkets getFundingMarkets getCreditMarkets getForeignExchangeMarkets getRealEstateMarkets getSecuritizationMarkets
Examples
## Not run:
getEquityMarkets()
## End(Not run)
Get credit markets stress components
Description
Downloads FRB financial stress index component data.
Usage
getCreditMarkets(s = NULL)
Arguments
s |
the list of class |
Details
Downloads the Cleveland FRB data products for financial stress index components daily time series. Component values include
liquidity spread
covered interest spread
commercial paper - t-bill spread
treasury yield curve spread
coporate bond spread
Value
A list of class stress
See Also
getStressData getEquityMarkets getFundingMarkets getForeignExchangeMarkets getRealEstateMarkets getSecuritizationMarkets
Examples
## Not run:
getCreditMarkets()
## End(Not run)
Get equity markets stress components
Description
Downloads FRB financial stress index component data.
Usage
getEquityMarkets(s = NULL)
Arguments
s |
the list of class |
Details
Downloads the Cleveland FRB data products for financial stress index components daily time series. Component values include
stock market crashes
Value
A list of class stress
See Also
getStressData getEquityMarkets getFundingMarkets getCreditMarkets getForeignExchangeMarkets getRealEstateMarkets getSecuritizationMarkets
Examples
## Not run:
getEquityMarkets()
## End(Not run)
Get foreign exchange markets stress components
Description
Downloads FRB financial stress index component data.
Usage
getForeignExchangeMarkets(s = NULL)
Arguments
s |
the list of class |
Details
Downloads the Cleveland FRB data products for financial stress index components daily time series. Component values include
weighted dollar crashes
Value
A list of class stress
See Also
getStressData getEquityMarkets getCreditMarkets getFundingMarkets getRealEstateMarkets getSecuritizationMarkets
Examples
## Not run:
getForeignExchangeMarkets()
## End(Not run)
Get funding markets stress components
Description
Downloads FRB financial stress index component data.
Usage
getFundingMarkets(s = NULL)
Arguments
s |
the list of class |
Details
Downloads the Cleveland FRB data products for financial stress index components daily time series. Component values include
financial beta
interbank cost of borrowing
bank bond spread
interbank liquidity spread
Value
A list of class stress
See Also
getStressData getEquityMarkets getCreditMarkets getForeignExchangeMarkets getRealEstateMarkets getSecuritizationMarkets
Examples
## Not run:
getFundingMarkets()
## End(Not run)
Get foreign exchange markets stress components
Description
Downloads FRB financial stress index component data.
Usage
getRealEstateMarkets(s = NULL)
Arguments
s |
the list of class |
Details
Downloads the Cleveland FRB data products for financial stress index components daily time series. Component values include
commecial real estate spread
residential real estate spread
Value
A list of class stress
See Also
getStressData getEquityMarkets getCreditMarkets getFundingMarkets getForeignExchangeMarkets getSecuritizationMarkets
Examples
## Not run:
getRealEstateMarkets()
## End(Not run)
Get securitization markets stress components
Description
Downloads FRB financial stress index component data.
Usage
getSecuritizationMarkets(s = NULL)
Arguments
s |
the list of class |
Details
Downloads the Cleveland FRB data products for financial stress index components daily time series. Component values include
residential MBS spread
commercial MBS spread
asset-backed security spread
Value
A list of class stress
See Also
getStressData getEquityMarkets getCreditMarkets getFundingMarkets getForeignExchangeMarkets getRealEstateMarkets
Examples
## Not run:
getSecuritizationMarkets()
## End(Not run)
Get financial stress index component data.
Description
Downloads Cleveland FRB financial stress index data.
Usage
getStressComponents(verbose = FALSE)
Arguments
verbose |
whether to print progress messages, default FALSE |
Details
Transforms the HTML into a data frame, transforms the character date into Date
objects, and then an xts
object.
Value
List of class type stress
containing xts
time history object df
, plot colors array colors
, default plot main title main
, and default plot y-axis label ylab
.
Note
Meant for internal use by the other, more specific, query functions.
References
http://www.clevelandfed.org/research/data/financial_stress_index/index.cfm
See Also
getStressIndex
Examples
## Not run:
getStressComponents()
## End(Not run)
Get financial stress index data.
Description
Downloads Cleveland FRB financial stress index data.
Usage
getStressIndex(verbose = FALSE)
Arguments
verbose |
whether to print progress messages, default FALSE |
Details
Transforms the HTML into a data frame, transforms the character date into Date
objects, and then an xts
object.
Value
List of class type cfsi
containing xts
time history object df
, plot colors array colors
, default plot main title main
, and default plot y-axis label ylab
.
References
http://www.clevelandfed.org/research/data/financial_stress_index/index.cfm
See Also
getStressComponents
Examples
## Not run:
getStressIndex()
## End(Not run)
Financial stress component data as a stacked area chart.
Description
Provides a convenience function for passing a stress
object to xyplot
to render a sand (stacked area) chart.
Usage
stressAreaChart(e, range = NA)
Arguments
e |
an object of class |
range |
a range string as used by |
Details
Provides several assumptions about the display of the stress
data to correspond to similar presentations at the Cleveland Fed's data site. To implement the stacked area chart the function first computes the column-wise value accumulations, then passes these values to the latticeExtra
xyarea
polygon rendering tools. Plots the columns in reverse stacking order to show the desired overlaps.
See Also
xyplot.stress stressLineChart getStressComponents getComponentSummary getEquityMarkets getFundingMarkets getCreditMarkets getForeignExchangeMarkets getRealEstateMarkets getSecuritizationMarkets
Examples
## Not run:
es <- getEquityStress()
stressAreaChart(es)
## End(Not run)
Financial stress index data line chart with regions.
Description
Provides a convenience function for passing a cfsi
object to xyplot
with attributes as presented by the source.
Usage
stressIndexChart(e, range = NA, showGradeRegions = TRUE)
Arguments
e |
an object of class |
range |
a range string as used by |
showGradeRegions |
whether to show the stress grade regions and labels |
Details
Provides several assumptions about the display of the cfsi
data to correspond to similar presentations at the Cleveland Fed's data site.
See Also
xyplot.cfsi getStressIndex
Examples
## Not run:
idx <- getStressIndex()
stressIndexChart(idx)
## End(Not run)
Financial stress component data as an unstacked line chart.
Description
Provides a convenience function for passing a stress
object to xyplot
.
Usage
stressLineChart(e, range = NA)
Arguments
e |
an object of class |
range |
a range string as used by |
Details
Provides several assumptions about the display of the stress
data to correspond to similar presentations at the Cleveland Fed's data site.
See Also
xyplot.stress stressAreaChart getStressComponents getComponentSummary getEquityMarkets getFundingMarkets getCreditMarkets getForeignExchangeMarkets getRealEstateMarkets getSecuritizationMarkets
Examples
## Not run:
es <- getEqityStress()
stressLineChart(es,"2007/2009)
## End(Not run)
Financial stress index component data xyplot
Description
Provides a convenience function for passing an cfsi
object to xyplot
.
Usage
## S3 method for class 'cfsi'
xyplot(x, ...)
Arguments
x |
an object of class |
... |
other parameters passed to |
See Also
stressLineChart stressAreaChart getStressIndex xyplot.stress
Examples
## Not run:
ci = getStressIndex()
xyplot(ci)
## End(Not run)
Financial stress index component data xyplot
Description
Provides a convenience function for passing an stress
object to xyplot
.
Usage
## S3 method for class 'stress'
xyplot(x, ...)
Arguments
x |
an object of class |
... |
other parameters passed to |
See Also
stressLineChart stressAreaChart getStressComponents xyplot.cfsi
Examples
## Not run:
require(lattice)
fs <- getFundingStress()
xyplot(fs)
## End(Not run)