calculate_AR: Calculate abnormal return by factor model

Description Usage Arguments Value

View source: R/calculate_AR.R

Description

calculate_AR() calculates abnormal return by factor model.

Usage

1
2
3
calculate_AR(data, estimation_window_start, estimation_window_end,
  least_valid_days, estimation_window_start_type = "day",
  estimation_window_end_type = "day", factor_number = 3L)

Arguments

data

A data frame.

The first column is the trading date whose class is "Date". The second column is the return. The others are factors.

estimation_window_start

A positive integer giving the start time point of beta estimation window.

estimation_window_end

A positive integer giving the end time point of beta estimation window.

least_valid_days

A positive integer giving the least vaild trading days in the estimation window.

estimation_window_start_type

A character.

"day" means the start time point is the nunmber of days. "month" means the start time point is the number of months. "year" means the start time point is the number of years.

estimation_window_end_type

A character.

"day" means the end time point is the number of days. "month" means the end time point is the number of months. "year" means the end time point is the number of years.

factor_number

A positive integer.

1 means there is 1 factor. 3 means there are 3 factors. 4 means there are 4 factors. 5 means there are 5 factors.

Value

A double vector.


ylwpaopao/cnquant documentation built on Dec. 2, 2019, 10:39 p.m.