tidyquant icon indicating copy to clipboard operation
tidyquant copied to clipboard

Speed Bottle Neck on tq_portfolio?

Open dylanjm opened this issue 7 years ago • 0 comments

Hello,

I'm currently building an efficient frontier / portfolio optimization shiny app using tidyquant and am running into a serious slow down when creating 500 simulated portfolios with randomized weights.

I'm essentially performing a monte carlo simulation without a explicit for-loop. I understand you may not have built the function to handle this many simulations but I'm assuming the slow down happens when reaching the left_join():

data_weights <- left_join(data_nested, weights_nested, by = setNames(x, y))

Do you guys suggest a way around this without having to build the matrix algebra by scratch in code?

dylanjm avatar Nov 30 '17 18:11 dylanjm