User:Dr vulpes/code

Code that I use when working on articles.

Stock Market
Generate closing stock prices with the R packages quantmod and tidyquant



getSymbols(c("PACW"),                src = "yahoo",                 from = '2023-03-01',                 to = '2023-05-10') # Colors set to blue and red to improve accessability for people who are colorblind chartCandlestick <- chartSeries(        PACW,        type = "candlestick",        name = "PacWest Bancorp",        theme = chartTheme( 'white', up.col = '#1A85FF', dn.col = '#D41159' )     )

chartLine <- chartSeries(        PACW,        type = "line",        name = "PacWest Bancorp",        theme = chartTheme( 'white', up.col = '#1A85FF', dn.col = '#D41159' )     )      chartMatchsticks  <- chartSeries(        PACW,        type = "matchsticks",        name = "PacWest Bancorp",        theme = chartTheme( 'white', up.col = '#1A85FF', dn.col = '#D41159' )     )