Implementation of optimisation analytics for constructing and backtesting optimal portfolios in Python