Optimal execution of portfolio transaction with linear cost model