Be very careful investing with loans that aren't cleared in bankruptcy. If you misbalance a portfolio and get overexposed to a downturn you might be throwing away your entire financial future. Restarting from $0 in bankruptcy is very different than restarting in lots of debt with high interest. Even if this is sometimes +EV it seems worthwhile to pay off the student loan just like it's sometimes worthwhile to buy insurance.