Sounds like you need all records for a given stock type to be able to link to a record for the same stock type in the "model" portfolio.
Don't know how you've organized your portfolios and your model portfolios.
How can you tell from your records to what portfolio a given stock transaction belongs?
How have you documented the "model" values? Same table(s) or different?
I managed to solve it!
I created a field in the table which holds all the trades which defined the "model portfolio". Once I had done this, I could link this field to another copy of the trades table linking this field with the account nos. i.e. one account is the "model portfolio"