portfolio.model function

Create a portfolio.model instance (or fix an existing one)