Asset allocation with a derivative security is studied in a hidden, Markovian regime-switching, economy using filtering theory and the martingale approach. A generalized delta-hedged ratio and a generalized elasticity of an option are introduced to accommodate the presence of the information state process and the derivative security. Malliavin calculus is applied to derive a solution for a general utility function which includes an exponential utility, a power utility, and a logarithmic utility. A compact solution is obtained for a logarithmic utility. Some economic implications of the solutions are discussed.