If you cant deduct the interest yearly on your taxes, you would think it would offset some of the capital gains if money is made on the sale. If not, that is stupid. The interest on the investment is increasing your basis in the property just like any improvement

I would definitely check with an accountant or just call the IRS. My first thought was yes until some other folks said you couldn't.

Go here and read the section on Interest Expenses and the sections that follow. Very briefly looking at it sounds like you can, but I would ask the folks who know for sure.

https://www.irs.gov/publications/p550/ch03.html#en_US_2015_publink100010207