tidyquant
tidyquant copied to clipboard
Speed Bottle Neck on tq_portfolio?
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?