estimate_hs: Estimates the model of Huang & Stoll (1997)

Description Usage Arguments Details Value References

View source: R/HS.R

Description

Estimates the model of Huang & Stoll (1997)

Usage

1
estimate_hs(price_diff, price, indicator, indicator_lag, midquote)

Arguments

price_diff

a numeric vector containing the series of first price differences.

price

a numeric vector containing the price series.

indicator

an integer vector containing the trade direction with a buy as 1 and a sell as -1.

indicator_lag

an integer vector containing the first lag of the indicator series.

midquote

a numeric vector with the midquote price series.

Details

The function estimates for given data the trade indicator model of Huang & Stoll (1997). For estimation an OLS approach is used similar to the one desribed in the paper of the two authors. For application the lm-function is used together with NeweyWest for NeweyWest standard errors. For details it is referred to the NeweyWest-function.

Value

A data.frame with the following values:

n

the number of observation used in estimation.

beta1

the effective half-spread.

beta1_std

the standard deviation of the effective half-spread.

beta1_t

the t-value of the effective half-spread.

beta1_p

the p-value of the effective half-spread.

beta2

the part of the spread due to adverse selection and inventory.

beta2_std

the standard deviation of the adverse selection and inventory
spread component.

beta2_t

the t-value of the adverse selection and inventory
spread component.

beta2_p

the p-value of the adverse selection and inventory
spread component.

r2

the coefficient of determination.

r2_adj

the adjusted coefficient of determination.

f_stat

the value of the F-statistic.

f_pval

the p-value of the F-statistic.

spread_eff_est

the effective spread estimated from the model using the formula 2(θ+φ).

spread_eff_std

the standard deviation of the effective spread, calculated via the delta method.

spread_eff_emp

the empirical effective spread, calculated directly from the data by the arithmetic mean of the series q_t(p_t-m_t), where q_t is the trade direction, p_t the transaction price, and m_t the price midquote series.

spread_eff_emp_std

the standard deviation of the empirical effective spread calculated as the standard deviation of the series q_t(p_t-m_t).

spread_eff_emp_se

the standard error of the estimated empirical effective spread using the formula SE=STD/√ n.

spread_eff_emp_med

the median of the empirical effective spread calculated as the median of the series q_t(p_t-m_t).

References

Huang & Stoll (1997), "The Component of the Bif-Ask Spread: A General Approach," The Review of Financial Studies, Vol. 10, Issue 4., pp. 995-1034.


simonsays1980/tim documentation built on July 19, 2019, 7:35 a.m.