Reinsurance is a risk management tool for insurance companies, as it allows for transferring some of the insurance risk to reinsurance companies. From the insurer's perspective, a reinsurance contract may lead to more stable results and lower solvency capital requirements, but it also reduces net premium income. Hence, the optimal proportion of risk to retain is an important issue. In this thesis, optimal limited stop-loss reinsurance contracts have been examined for the property, motor and group life lines of business. The thesis provides a practical study of the historical data from the portfolios of the Norwegian insurance group Oslo Pensjonsforsikring, where the objective is to obtain specific estimates of the optimal retention limit for stop-loss reinsurance contracts, subject to a fixed upper limit. The optimization is done subject to the trade-off between minimum reserve and maximum expected gain. The underlying risk measure is the VaR, and the applied confidence level of risk is consistent with the stress scenarios in Solvency II. Both the insurer and the reinsurer are assumed to charge the expected value premium with an assigned premium margin. It is shown that there is a negative correlation between the premium margin of the cedent and the optimal retention limit, for a fixed value of the reinsurer's premium margin. For increasing values of the reinsurer's premium margin, the retention limit shifts upward as the gap between the premium margins increases. The proportion of retained risk varies between the different lines of business and is lowest for the most heavy-tailed claim distribution. When reducing the values of the upper limit of the contracts, the optimal retention limit increases and the proportion of released risk decreases. This means that the cedent is better off transferring the upper part of its portfolio risk to the reinsurer.