This document discusses using simulated annealing (SA) as an algorithm to optimize portfolios by finding optimal combinations of risk and return. SA is presented as an alternative to gradient search methods which tend to get stuck in local optima. The SA algorithm begins with a random portfolio and iteratively explores neighboring portfolios to search for better risk-return metrics. It allows for some probability of accepting worse portfolios to avoid local optima. Step-by-step instructions are provided for implementing an SA algorithm along with an example application to optimizing a credit default swap portfolio. The SA approach is shown to outperform a greedy search algorithm in finding superior risk-return portfolios.