I am building software for an investment manager. The investment manager invests money on behalf of his clients.
The investment manager has a model portfolio, of say 20 stocks, each with certain weightage.
Eg: His model portfolio can look like this:
{GOOG: .03, AAPL: 0.4, MSFT: 0.25, TESLA: 0.5, IBM: 0.1, .....} Now lets say the investment manager has one client, who holds all of the stocks, the total of which is worth, say USD50,000, but with slightly different weightage:
{GOOG: .0295, AAPL: 0.415, MSFT: 0.232, TESLA: 0.1, IBM: 0.2, .....} Now the client wants to invest a lumpsum, lets say USD10,000.
Now, the investment manager wants to split this USD10,000 across 20 stocks, so that he gets closest to the model portfolio. i.e. I want the resultant USD60,000 to be split in a way that is closest to the ratios maintained in the model portfolio.
A limitation here is that, I can buy or sell a minimum of 1 stock; I cannot deal in fractions of stocks.
Is there a name for this kind of problem? I am pretty sure this has been solved by someone, so do not want to reinvent the wheel.
I do not know what I should google for, or where to start from.
I want the chosen allocation to have the least deviation from the model portfolio, measured by $L_2$ distance (sum of squared differences). Also, the investor keeps investing periodically, so there is a chance his portfolio might deviate further and further, so the idea is to keep these "tracking errors" to a minimum, so that it the investor's portfolio is as close to the model portfolio as possible.