In the traditional financial asset investment market, the emergence of foam economy is inevitable, and the collapse of foam economy will have a great impact on the investment market, and even seriously affect the overall operation of the national economy. Professor Sornette, a geophysicist, summarized the log periodic power law model (LPPL), which can be used to model and predict financial foam and anti foam. The traditional LPPL model usually only focuses on the extreme risk of the financial market, and attempts to use machine learning methods to improve the LPPL model's foam economy early warning effect. The traditional LPPL model has multiple parameters, and the parameter estimation method adopted will have an impact on the prediction accuracy. The Tabu search algorithm is easy to fall into local optimal solution and is not suitable for small data. The parameter estimation algorithm originally used in the model is improved to genetic algorithm, which can overcome the trap of falling into local minima and improve the accuracy of LPPL model for financial foam early warning, The model is successfully verified to be applicable to the foam prediction of Bitcoin through an example.