lppl.find_crashtime: lppl.find_crashtime

Description Usage Arguments Details References Examples

View source: R/find_crashtime.R

Description

This is the summation to find the critical point in the entered world thermal data.

Usage

1
2
3
4
5
6
7
8
lppl.find_crashtime(
  tradedate,
  price,
  Left_days = 262,
  Right_days = 60,
  Right_scale = 0.8,
  showplot = TRUE
)

Arguments

tradedate

Use a "Date" type vector as the transaction date.

price

Closing price numeric data vector

Left_days

The peak of critical time is higher than any peak prior to 262 days (Default : 262)

Right_days

It implements that the peak should drop by 25% during the right_days (60 days) period, and the default value is 60.

Right_scale

set the percentage of drop price from peak price. (Default : 0.8)

Details

There are three conditions at the critical point. During the 262 days prior to the first critical point, the highest price must be less than the current price. Prices must drop by 25% or more within 60 days prior to the second critical point. Third, there should be no price higher than the serial price for 60 days after the critical point.

References

D.S. Brée and N. L. Joseph, “Testing for financial crashes using the log-periodic power law model,” International Review of Financial Analysis, vol. 30, pp. 287–297, 2013.

Examples

1
2
3
4
5
6
library(lppl)

tradedate <- lppl::NASDAQ$Date
price <- lppl::NASDAQ$Close

dfCRASH <- lppl.find_crashtime(tradedate =tradedate, price = price)

mcgyver3/lppl documentation built on Jan. 1, 2021, 9:23 a.m.