The objective of this document is to find out if the Firefly Algorithm (FA), a nature-inspired metaheuristic optimization algorithm, can be used to find effective optimized trading rules and compare the results to a simple Buy and Hold strategy. FA is one of the most recent evolutionary computing models and was studied by several researchers who concluded that it is an optimal and powerful algorithm to resolve complex problems. Despite the fact that some algorithms like Genetic Algorithm or Particle Swarm Optimization proved in the last decades to be optimal metaheuristics to find the fittest parameter for a trading rule, it was found out with limits and gaps such as the frequent transaction costs. This paper is to show if FA can be used to find optimal technical trading rules and see if it can resolve the limits of the other algorithms. We use the FA to find out effective optimized trading rules and use them firstly for the testing phase with daily prices of the S&P500 index during the last recession period and compare it with an upward period for our training phase to be able to prove the effectiveness of the algorithm. After that, we compare it with a benchmark used in most litteratures, the Buy and Hold (B&H) strategy. After transaction costs, FA produced higher results compared to the B&H strategy during the training period. However, during the out-of-sample tests, it showed contrary results. On one side, FA gained a simulated out-of- sample profit of over 4% for the chosen periods when daily transaction costs were taken into account. On the other side, FA could not outperform the benchmark when monthly transactions were taken into account. This is probably due to the selected and predefined trading system. However, globally FA demonstrated to be a more efficient metaheuristic algorithm than the PSO.