get ubci index data from source. Source is here.

ubci_index(index = "UBMI", from, to)

Arguments

index

default is UBMI.

from

Optional for various time series. A character string representing a start date in YYYY-MM-DD format.

to

Optional for various time series. A character string representing an end date in YYYY-MM-DD format.

Value

Return type is tibble has columes contain index, date, open, high, low, close.

Examples

index <- ubci_index(index = "UBMI") index
#> # A tibble: 262 x 6 #> index date open high low close #> <chr> <date> <dbl> <dbl> <dbl> <dbl> #> 1 UBMI 2018-06-19 1718. 1787. 1709. 1754. #> 2 UBMI 2018-06-18 1666. 1737. 1641. 1718. #> 3 UBMI 2018-06-17 1678. 1694. 1661. 1665. #> 4 UBMI 2018-06-16 1660. 1690. 1641. 1678. #> 5 UBMI 2018-06-15 1722. 1726. 1655. 1660. #> 6 UBMI 2018-06-14 1621. 1729. 1602. 1721. #> 7 UBMI 2018-06-13 1698. 1704. 1575. 1621. #> 8 UBMI 2018-06-12 1796. 1810. 1672. 1697. #> 9 UBMI 2018-06-11 1780. 1800. 1718. 1795. #> 10 UBMI 2018-06-10 1970. 1970. 1722. 1779. #> # ... with 252 more rows
ubci_index(index = "UBMI", from="2018-05-15")
#> # A tibble: 36 x 6 #> index date open high low close #> <chr> <date> <dbl> <dbl> <dbl> <dbl> #> 1 UBMI 2018-06-19 1718. 1787. 1709. 1754. #> 2 UBMI 2018-06-18 1666. 1737. 1641. 1718. #> 3 UBMI 2018-06-17 1678. 1694. 1661. 1665. #> 4 UBMI 2018-06-16 1660. 1690. 1641. 1678. #> 5 UBMI 2018-06-15 1722. 1726. 1655. 1660. #> 6 UBMI 2018-06-14 1621. 1729. 1602. 1721. #> 7 UBMI 2018-06-13 1698. 1704. 1575. 1621. #> 8 UBMI 2018-06-12 1796. 1810. 1672. 1697. #> 9 UBMI 2018-06-11 1780. 1800. 1718. 1795. #> 10 UBMI 2018-06-10 1970. 1970. 1722. 1779. #> # ... with 26 more rows
ubci_index(index = "UBMI", to="2018-05-15")
#> # A tibble: 227 x 6 #> index date open high low close #> <chr> <date> <dbl> <dbl> <dbl> <dbl> #> 1 UBMI 2018-05-15 2419. 2439. 2301. 2317. #> 2 UBMI 2018-05-14 2431. 2456. 2305. 2417. #> 3 UBMI 2018-05-13 2313. 2445. 2274. 2430. #> 4 UBMI 2018-05-12 2206. 2356. 2138. 2313. #> 5 UBMI 2018-05-11 2446. 2465. 2088. 2239. #> 6 UBMI 2018-05-10 2598. 2608. 2431. 2446. #> 7 UBMI 2018-05-09 2549. 2594. 2441. 2583. #> 8 UBMI 2018-05-08 2618. 2644. 2521. 2567. #> 9 UBMI 2018-05-07 2700. 2700. 2538. 2612. #> 10 UBMI 2018-05-06 2699. 2699. 2699. 2699. #> # ... with 217 more rows