We use a rich lifecycle portfolio choice model to analyze how tax incentives shape household indebtedness, portfolio allocation and macroprudential risks. We gauge the effects of tax incentives by exploiting the fact that homeownership rates and credit supply conditions are similar in Germany and Switzerland, whereas tax incentives for amortising mortgage debt and voluntary pension contributions differ. We find that tax incentives have quantitatively strong effects on mortgage incidence and portfolio allocation, although their impact on aggregate tax revenue is negligible. Tax deductions for mortgage interest payments, which exist in many developed economies, shift the tax burden from the young and indebted to the old and wealthy homeowners. At the same time, more generous tax deductions for voluntary pension contributions shift the portfolio towards less liquid pension savings. The macroprudential implication, considering a bust with a house price correction of 20%, is that the consumption slump in the economy with tax deductions is 0.34 percentage points (pp) smaller on average, relative to the decrease of 6.3% in the benchmark economy. The average hides heterogeneity across age groups: for young homeowners the consumption slump is 1.24 pp smaller whereas it is 0.44 pp larger for homeowners close to retirement.