Optimize a portfolio containing a list of companies

You select 4 companies you want to invest into. Find the ratio of investment allocations for maximum Sharpe ratio.