  Backward stochastic partial differential equations of parabolic type in
bounded domains are studied in the setting where the coercivity condition is
not necessary satisfied and the equation can be degenerate. Some generalized
solutions based on the representation theorem are suggested. In addition to
problems with a standard Cauchy condition at the terminal time, problems with
special non-local boundary conditions are considered. These non-local
conditions connect the terminal value of the solution with a functional over
the entire past solution. Uniqueness, solvability and regularity results are
obtained. Some applications to portfolio selection problem are considered.
