Hi, and welcome!
Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers.
The code
is not enough; the data
is essential. Doesn't have to be the actual tickers you're using or more than just a few. Without the data the trade is a DK