This paper investigates the optimal risk management strategies in a dynamic setting by allowing the insurance company to invest a risky asset whose price process is perturbed by a geometric Brownian motion under the force of interest . In addition, we allow this company to buy quota-share reinsurance. The financial market in which the company buys quota-share reinsurance consists of two cases: One is that the insurance company allows to buy quota-share reinsurance with a riskless asset that earns the force of interest , and the other is that the company allows to buy quota-share reinsurance together with its capital which invests a risky asset simultaneously. Our focus is on the possibility for the insurance company to rely on optimal controls and study the optimization problem on the infinite time ruin probability in the financial market using differential equations and boundary conditions. We will show that the correlated risk model with risky assets and claim process has an important role in the assessment of ruin probability when there is quota-share reinsurance and a risky asset simultaneously in the insurance portfolio. Finally, we demonstrate the results of this paper with a numerical example using a common set of parameters for the insurance and financial markets.