I have the following budget constraints for an agent. In the first period of his life, he only can get loans (he doesn't "earn" income). With the loans (L) he needs to decide between first period consumption (C1) and investment (I). The amount invested will allow him to get a second period income Y with probability P which is increasing in I (therefore, P(I)), In case of success and the person obtain Y, the individual should use Y to repay the loan (L) that he requested in the first period and consume in the second period (C2). However, with probability 1 - P(I), the person don't get Y and therefore only consume C1. Note that if the individual only invest the loan (L=I) and don't obtain Y, he can't consume anything. That motivates him not to invest the whole loan and keep part of the loan in order to warrant at least first period consumption. Therefore, considering B the parameter for the time preference the problem would be: max U=ln(C1) + Bln(C2) s.t: L = I + C1 Y = L(1+r) + C2 with Probability P(I) or s.t: L = I + C1 with probability 1 - P(I) Have you ever seen something like this? If yes, how to proceed?