Purpose An appropriate space allocation among different residence types gives higher profitability and liquidity for cash flow management in real estate projects for developers. Thereby, a balance between debt and equity should be kept for capital formation in developers where high level of cost, profit and risk exists. The purpose of this paper is to provide cash flow optimization under debt and equity financing while providing an appropriate space allocation of residence types via synchronous consideration of profitability and liquidity. Design/methodology/approach A novel optimization methodology that includes project financing, optimization and experimental design modules is proposed. The first module, project financing, considers the flexibility of utilizing one or both of debt financing and equity financing when making capital. The optimization module addresses space allocation among different residence types for a construction while maximizing profitability and liquidity using two mixed-integer linear programming models in a pre-emptive manner. The experimental design module assesses the effects of decisive parameters within the methodology via multivariate analysis of variance (MANOVA). Findings The proposed methodology is applied to a real-life residential project in Istanbul. The optimization module yielded 42.5% profitability via the first linear programming model and 2.2% trade-off between liquidity and profitability while minimizing the payback period by the second linear programming model. Meanwhile, MANOVA results showed that profit per square meter and sale rate trends are the most prominent factors considering their significant effects on net present value and payback period. Originality/value To the best knowledge of the author, related papers focused only on profitability under equity financing. Liquidity (as an objective) and equity financing (as a financing method) have not been handled. Hence, this paper not only performs profitability and liquidity-oriented cash flow optimization under debt and equity financing but also optimizes space allocation of residences for the first time.