Learn R Programming

eventstudies (version 1.2.2)

get.clusters.formatted: Get formatted clusters to perform extreme event study analysis (ees)

Description

The functions formats extreme event dates, dealing with clusters in the event frame.

Usage

get.clusters.formatted(event.series,
                       response.series,
                       probvalue = 5,
                       event.value = "nonreturns",
                       response.value = "nonreturns")

Arguments

event.series

a zoo matrix of ‘event’ series.

response.series

a zoo matrix of ‘response’ series.

probvalue

The value (in percent) on the probability distribution to define a tail event.

event.value

a ‘character’ scalar specifying if the ‘event.series’ is to be converted to ‘returns’ or left as ‘nonreturns’

response.value

a ‘character’ scalar specifying the if the ‘response.series’ is to be converted to ‘returns’ or left as ‘nonreturns’

Value

A zoo object is returned with formatted ‘event.series’ and ‘response.series’. It also has separate columns to identify tail events, named ‘left.tail’ and ‘right.tail’, with binary outcome (1 equals tail event). Finally, the object has column named ‘cluster.pattern’ which identifies the length of the cluster in the event series.

Details

Tail (Rare) events are often the object of interest in finance. These events are defined as those that have a low probability of occurrence. This function identifies such events based on ‘probvalue’ mentioned by the user and generates summary statistics about the events. If ‘probvalue’ is 2.5%, events below 2.5% (lower tail) and above 97.5% (upper tail) of the distribution are identified as extreme events.

Once the extreme events are defined, this function further formats the events. The extreme event functionality is muddled if we have another event occurring in the event time frame. Following the methodology of Patnaik. Shah and Singh (2013), we handle clustered events. Clustered events are handled in following ways:

  • Clustered events which are defined as consecutive events, are fused into a single event and respective returns of response series are also fused.

  • Mixed clusters are the left and right tail events occurring on consecutive days. These are identified and discarded from the analysis.

References

Ila Patnaik, Nirvikar Singh and Ajay Shah (2013). Foreign Investors under stress: Evidence from India. International Finance, 16(2), 213-244. http://onlinelibrary.wiley.com/doi/10.1111/j.1468-2362.2013.12032.x/abstract http://macrofinance.nipfp.org.in/releases/PatnaikShahSingh2013_Foreign_Investors.html

Examples

Run this code
# NOT RUN {
data(OtherReturns)

gcf <- get.clusters.formatted(event.series = OtherReturns$SP500, 
       			      response.series = OtherReturns$NiftyIndex)

str(gcf, max.level = 2)
# }

Run the code above in your browser using DataLab