That makes sense, but you can relatively easily do this in the script. Use the Correlation function to get a correlation matrix, then sum up for any asset its correlations to the other assets, and divide the investment by the result.