> For the complete documentation index, see [llms.txt](https://lijeffrey39.gitbook.io/sentiment-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lijeffrey39.gitbook.io/sentiment-ai/prediction/backtesting/parameter-optimization.md).

# Parameter Optimization

Many parameters within the backtesting algorithm are weights that and used for calculating the theoretical returns. The goal of this optimization problem is maximize both accuracy and return.  Currently, a strategy called Sequential Least Squares Programming (SLSQP) is being used optimize a provided a set of parameter weights. This functionality is built into `scipy` and can called using `scipy.minimize`.
