A generalized clark representation formula, with application to optimal portfolios | Synapse