An actively managed portfolio almost never beats the market in the long term. Thus, many investors often resort to passively managed portfolios whose aim is to follow a certain financial index. The task of building such passive portfolios aiming also to minimize the transaction costs is called Index Tracking (IT), where the goal is to track the index by holding only a small subset of assets in the index. As such, it is an NP-hard problem and becomes unfeasible to solve exactly for indices with more than 100 assets. In this work, we present a novel hybrid simulated annealing method that can efficiently solve the IT problem for large indices and is flexible enough to adapt to financially relevant constraints. By tracking the S&P-500 index between the years 2011 and 2018 we show that our algorithm is capable of finding optimal solutions in the in-sample period of past returns and can be tuned to provide optimal returns in the out-of-sample period of future returns. Finally, we focus on the task of holding an IT portfolio during one year and rebalancing the portfolio every month. Here, our hybrid simulated annealing algorithm is capable of producing financially optimal portfolios already for small subsets of assets and using reasonable computational resources, making it an appropriate tool for financial managers.