As the energy sector pivots to biofuels, producers are presented with new business opportunities and financial challenges. This thesis investigates cost-efficient hedging strategies to mitigate commodity price risk for the Swedish hydrotreated vegetable oil (HVO) refiner Preem. The biofuel market is characterized by high volatility and a forward market with low liquidity and major implied transaction costs. This study aims to hedge future cash flows by using financial contracts, while accounting for transaction costs. A comprehensive method is applied, including the construction of forward price curves by measuring the term structure of convenience yield through a generalized optimization framework proposed by Blomvall (2017), stochastic modeling of commodity prices using mean-reverting models similar to those proposed by Schwartz (1997), and implementation of Monte Carlo simulations for scenario analysis. Two stochastic programming (SP) models are implemented and compared to a naive hedging approach that hedges the future physical volumes. The two SP models respectively minimize a weighting between variance in profits and transaction costs, and maximize logarithmic profits after transaction costs with a constraint on expected shortfall, similar to the models proposed by Blomvall and Ekblom (2018). The different hedging models are compared using efficient frontiers. The term structure measurements indicate that the biofuel market can quickly shift between strong backwardation and contango. The hedging results show that the SP models significantly reduce both the variance and the expected shortfall of the operations compared to the naive hedging approach.