Description Usage Arguments Details
price_impact calculates the price impact for a certain lead x.
1  | price_impact(indicator, price, price_lead)
 | 
indicator | 
 an integer vector or numeric vector for t.  | 
price | 
 a numeric vector holding the prices for t.  | 
price_lead | 
 a numeric vector holding the leading prices for t+x.  | 
This function takes intraday data from a financial exchange and calculates the price impact defined PI = \frac{1}{T}∑_{t=1}^Tq_t(m_{t+x}-m_t) , where q_t is the price indicator at time t , m_t is the midquote at time t and x is a certain time interval, e.g. 1 or 5 minutes. So, the indicator time always corresponds to the starting midquote m_t . All price impacts are calculated in US $-Cents.
The function uses internally makes use of mean and excluding all 
NA values (making use of its input argument na.rm = TRUE). Note that 
the user has to prepare the time series data, i.e. calculate for the price 
data with index t the corresponding price_lead with index t+x.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.