There are not really any advantages gained by investing your money in an S-corp because all earnings pass through. Also, IRS Sec. 1375 imposes an additional tax on S corporations that have passive investment income
when the corporation has (1) accumulated earnings and profits (E&P)
at the close of a tax year; and (2) gross receipts, more than 25% of
which are PII (i.e., royalties, rents, dividends, interest, annuities
and net gains on sales or exchanges of stock in securities).
So your investment income must be lower than 25% of gross receipts and it has to be paid out at the end of the year to avoid any additonal taxes.