A method for optimising the security value of an investment portfolio