Scraps Le Boursier's and gets the historical prices for the specified companies.
stock(x) stocks(...)
x, ... | Company name as returned by the |
---|
Returns a data.frame
containing all the historical data for the specified stock.
date
: the date of the given record.
open
: the opening price of the stock on date
.
high
: the highest price.
low
: the lowest price.
close
: the closing price.
volume
: Volume of stocks traded on date
.
If the plural variant is used it'll add a symbol
column that'll contain the name of the company.
if( bcr:::check_internet() ) { head(stock("Wafa Assur"), 20) head(stock(), 20) # same as runing stock("MASI") head(stock("MADEX"), 20) }#> date open high low close volume #> 1 2016-06-10 7940.68 7969.00 7932.80 7963.51 NA #> 2 2016-06-13 7933.76 7938.27 7904.95 7904.95 NA #> 3 2016-06-14 7909.30 7922.12 7890.45 7900.03 NA #> 4 2016-06-15 7885.39 7906.25 7861.63 7902.36 NA #> 5 2016-06-16 7893.67 7917.88 7867.76 7867.76 NA #> 6 2016-06-17 7881.02 7893.62 7852.20 7879.46 NA #> 7 2016-06-20 7871.48 7871.54 7829.88 7838.30 NA #> 8 2016-06-21 7843.11 7867.84 7821.43 7867.84 NA #> 9 2016-06-22 7867.81 7867.81 7796.25 7796.25 NA #> 10 2016-06-23 7791.60 7825.92 7756.30 7825.92 NA #> 11 2016-06-24 7811.02 7854.44 7768.21 7854.44 NA #> 12 2016-06-27 7772.15 7780.52 7739.07 7758.82 NA #> 13 2016-06-28 7742.88 7804.10 7735.94 7804.10 NA #> 14 2016-06-29 7803.12 7803.12 7724.54 7764.79 NA #> 15 2016-06-30 7765.32 7769.31 7699.42 7765.84 NA #> 16 2016-07-01 7765.84 7771.52 7724.85 7771.52 NA #> 17 2016-07-04 7761.95 7821.00 7761.95 7821.00 NA #> 18 2016-07-05 7820.94 7861.41 7799.38 7861.41 NA #> 19 2016-07-11 7867.31 7867.31 7815.89 7828.77 NA #> 20 2016-07-12 7825.83 7859.46 7800.78 7849.99 NA#> date open high low close volume symbol #> 1 2016-06-10 9732.59 9759.88 9723.56 9753.40 NA MASI #> 2 2016-06-13 9718.45 9723.75 9680.85 9680.85 NA MASI #> 3 2016-06-14 9686.33 9701.39 9664.03 9674.38 NA MASI #> 4 2016-06-15 9657.20 9684.29 9628.65 9679.73 NA MASI #> 5 2016-06-16 9669.51 9696.22 9637.54 9637.60 NA MASI #> 6 2016-06-17 9653.17 9667.98 9619.08 9649.60 NA MASI #> 7 2016-06-20 9640.20 9640.27 9591.54 9601.36 NA MASI #> 8 2016-06-21 9607.01 9632.82 9577.42 9632.82 NA MASI #> 9 2016-06-22 9632.79 9632.79 9540.31 9540.38 NA MASI #> 10 2016-06-23 9534.92 9572.36 9489.25 9570.06 NA MASI #> 11 2016-06-24 9552.55 9603.16 9501.82 9603.16 NA MASI #> 12 2016-06-27 9505.45 9516.53 9467.83 9491.13 NA MASI #> 13 2016-06-28 9472.39 9545.95 9464.25 9545.11 NA MASI #> 14 2016-06-29 9543.96 9543.96 9452.34 9501.78 NA MASI #> 15 2016-06-30 9502.39 9506.34 9427.34 9505.98 NA MASI #> 16 2016-07-01 9505.98 9512.71 9457.48 9512.71 NA MASI #> 17 2016-07-04 9501.46 9573.62 9501.46 9573.62 NA MASI #> 18 2016-07-05 9573.97 9620.44 9548.61 9620.44 NA MASI #> 19 2016-07-11 9627.37 9627.37 9569.02 9584.16 NA MASI #> 20 2016-07-12 9580.70 9620.64 9551.28 9609.12 NA MASI