This paper solves and estimates astochastic model of optimal inter-temporal behavior toassess how changes in the design of the income protectionand pension systems in Brazil could affect savings rates,the share of time that individuals spend outside of theformal sector, and retirement decisions. Dynamics depend onfive main parameters: preferences regarding consumption andleisure, preferences regarding formal Vs. informal work,attitudes towards risks, the rate of time preference, andthe distributions of two exogenous shocks that affectmovements in and out of the social security system(independently of individual decisions). The yearlyhousehold survey is used to create a pseudo panel byage-cohorts and estimate the joint distribution of modelparameters based on a generalized version of the Gibbssampler. The model does a good job in replicating thedistribution of the members of the cohort across states (inor out of them social security / active or retired). Becausethe parameters are related to individual preferences orexogenous shocks, the joint distribution is unlikely tochange when the social insurance system changes. Thus, themodel is used to explore how alternative policyinterventions could affect behaviors and through thischannel benefit levels and fiscal costs. The results fromvarious simulations provide three main insights: (i) theBrazilian SI system today might generate unnecessarydistortions (lower savings rates, less formal employment,and more early retirement) that increase the costs of thesystem and might generate regressive redistribution; (ii)there are important interactions between the incomeprotection and pension systems, which calls for joint policyanalysis when considering reforms; and (iii) currentdistortions could be reduced by creating an actuarial linkbetween contributions and benefits and then giving matchingcontributions or matching capital to individuals withlimited savings capacity, which requires having individualsavings accounts that can be funded or notional.