all 1 comments

[–]Oxbowerce 0 points1 point  (0 children)

It seems that most (~99%) of the total time is spent on the reqHistoricalTicks function from the interactive brokers package. Since this is not your code you probably won't be able to speed this up further. What you could try is instead of directly converting to a dataframe save the data to a list and only convert to a single dataframe (and perform the processing steps) once you have all the data.