Research in finance and lots of other areas often encounter large-scale complex optimization problems that are hard to find solutions. Classic heuristic algorithms often have limitations from the objectives that they are trying to mimic, leading to drawbacks such as lacking memory-efficiency, trapping in local optimal solutions, unstable performances, etc. This work considers imitating market competition behavior (MCB) and develops a novel heuristic algorithm accordingly, which combines characteristics of searching-efficiency, memory-efficiency, conflict avoidance, recombination, mutation and elimination mechanism. In searching space, the MCB algorithm updates solution dots according to the inertia and gravity rule, avoids falling into local optimal solution by introducing new enterprises while ruling out of the old enterprises at each iteration, and recombines velocity vector to speed up solution searching efficiency. This algorithm is capable of solving large-scale complex optimization model of large input dimension, including Over Lapping Generation Models, and can be easily applied to solve for other complex financial models. As a sample case, MCB algorithm is applied to a hybrid investment optimization model on R&D, riskless and risky assets over a continuous time period.