In this article we introduce model to describe the behavior of a multinational company (MNC) that operates transfer pricing and debt shifting, with the purpose of incrementing its value, intended as the sum of equity and debt. We compute, in a stochastic environment and under default risk, the optimal shares of profit and debt to be shifted and show how they are a effected by exogenous features of the market. In addition, by means of a numerical analysis, we simulate and quantify the benefit arising from the exploitation of tax avoidance practices and study the corresponding impact on MNC's fundamental indicators. A wide sensitivity analysis on model's parameters is also provided.