Import and cleaning data

library(casabourse)
atw <- daily.data('atw',from = '01-01-2017', to = '19-02-2022')
Ouverture <- atw$Value
Ouverture <- append(Ouverture,0,0)
Ouverture <- Ouverture[-length(Ouverture)]
atw$Ouverture <- Ouverture
atw$Date <- lubridate::dmy(rownames(atw))
atw <- atw[-1,] |> dplyr::relocate(Date, .before = Value)
tibble::tibble(atw)
## # A tibble: 1,243 × 7
##    Date       Value Minimum Maximum Variation Volume Ouverture
##    <date>     <dbl>   <dbl>   <dbl>     <dbl>  <dbl>     <dbl>
##  1 2017-02-17  425.    425.    430.     -1.14   6148      430 
##  2 2017-02-20  425     425     430      -0.02   2650      425.
##  3 2017-02-21  428     426     428       0.71   1635      425 
##  4 2017-02-22  414     414     422      -3.27  34164      428 
##  5 2017-02-23  409     403     420      -1.21  52513      414 
##  6 2017-02-24  415     400     415       1.47  12127      409 
##  7 2017-02-27  412     412     424      -0.72  12667      415 
##  8 2017-02-28  415     412     420.      0.73  73013      412 
##  9 2017-03-01  420.    415.    420.      1.24  32518      415 
## 10 2017-03-02  425     421     425       1.15  36172      420.
## # … with 1,233 more rows

Interactive Visualization with {plotly}

library(plotly)
fig <- atw %>% plot_ly(x=~Date, type = "candlestick",
                      open =~Ouverture, close =~Value,
                      high =~Maximum, low =~Minimum)
fig <- fig %>% layout(title = 'Chandeliers japonais (ATW)')
fig

Visualization with {ggplot2} and {tidyquant}