Start of folding stock market solver