DeutscheBank           package:pendensity           R Documentation

_D_a_i_l_y _f_i_n_a_l _p_r_i_c_e_s (_D_A_X) _o_f _t_h_e _G_e_r_m_a_n _s_t_o_c_k _D_e_u_t_s_c_h_e _B_a_n_k _i_n _t_h_e _y_e_a_r_s _2_0_0_6 _a_n_d _2_0_0_7

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

     Containing the daily final prices of the German stock Deutsche
     Bank in the years 2006 and 2007.

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

     data(DeutscheBank)

_F_o_r_m_a_t:

     A data frame with 507 observations of the following 2 variables.

     '_D_a_t_u_m' Data

     '_S_c_h_l_u_s_s' final price

_S_o_u_r_c_e:

     www.handelsblatt.de

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

     data(DeutscheBank)

     form<-'%d.%m.%y %H:%M'

     time.DeutscheBank <- strptime(DeutscheBank[,1],form)

     #looking for all dates in 2006
     data.DeutscheBank <- DeutscheBank[which(time.DeutscheBank$year==106),2]

     #building differences of first order
     DeutscheBank1 <- c()
     for(i in 2:length(data.DeutscheBank)) DeutscheBank1[i-1] <- data.DeutscheBank[i]-data.DeutscheBank[i-1]

     #estimating the density
     density.DeutscheBank <- pendensity(DeutscheBank1~1)
     plot(density.DeutscheBank)

