An asset allocation problem of a member of a defined contribution (DC) pension fund is discussed in a hidden, Markov regime-switching, economy using backward stochastic differential equations, (BSDEs). A risk-based approach is considered, where the member selects an optimal asset mix with a view to minimizing the risk described by a convex risk measure of his/her terminal wealth. Firstly, filtering theory is adopted to transform the hidden, Markov regime-switching, economy into one with complete observations and to develop, (robust), filters for the hidden Markov chain. Then the optimal asset allocation problem of the member is formulated as a two-person, zero-sum stochastic differential game between the member and the market in the economy with complete observations. The BSDE approach is then used to solve the game problem and to characterize the saddle point of the game problem. An explicit expression for the optimal asset mix is obtained in the case of a convex risk measure with quadratic penalty and it can be considered a generalized version of the Merton ratio. An explicit expression for the optimal strategy of the market is also obtained, which leads to a risk-neutral wealth dynamic and may provide some insights into asset pricing in the economy with inflation risk and regime-switching risk. Numerical examples are provided to illustrate financial implications of the BSDE solution.