spreads               package:fSeries               R Documentation

_C_a_l_c_u_l_a_t_i_o_n_s _o_f _s_p_r_e_a_d_s _a_n_d _m_i_d _q_u_o_t_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Functions to calculate spreds and midquotes from price streams.

_U_s_a_g_e:

       
     spreads(x, which = c("Bid", "Ask"), tickSize = NULL)    
     midquotes(x, which = c("Bid", "Ask"))

     midquoteSeries(...)
     spreadSeries(...)

_A_r_g_u_m_e_n_t_s:

tickSize: the default is NULL to simply compute price changes in
          original  price levels. If ticksize is supplied, the price
          changes will be  divided by the value of 'inTicksOfSize' to
          compute price changes in ticks. 

   which: a vector with two character strings naming the column names
          of the time series from which to compute the mid quotes and
          spreads. By default these are bid and ask prices with column
          names 'c("Bid", "Ask")'. 

       x: an object of class 'timeSeries'. 

     ...: arguments to be passed. 

_V_a_l_u_e:

     all functions return an object of class 'timeSeries'.

_N_o_t_e:

     The functions 'returnSeries', 'getReturns',  'midquoteSeries',
     'spreadSeries' are synonymes for 'returns', 'midquotes', and
     'spreads'.

_A_u_t_h_o_r(_s):

     Diethelm Wuertz for the Rmetrics R-port.

_E_x_a_m_p_l_e_s:

     ## data -  
        # Microsoft Data: 
        myFinCenter <<- "GMT"
        MSFT = as.timeSeries(data(msft.dat))[1:10, 1:4]
        head(MSFT)

     ## midquotes -

     ## spreads -

