```
risk_free_rate = .02
def neg_sharpe_ratio(weights, log_returns, cov_matrix, risk_free_rate):
return -sharpe_ratio(weights, log_returns, cov_matrix, risk_free_rate)
constraints = {'type': 'eq', 'fun': lambda weights: np.sum(weights) - 1}
bounds = [(0, 0.4) for _ in range(len(tickers))]
initial_weights = np.array([1/len(tickers)]*len(tickers))
optimized_results = minimize(neg_sharpe_ratio, initial_weights, args=(log_returns, cov_matrix, risk_free_rate), method='SLSQP', constraints=constraints, bounds=bounds)
```