Optimal dynamic allocation between taxable and nontaxable assets