The recent decision of a federal appeals court against BP (NYSE:BP) could have an adverse effect on the company's financial situation in the future. Despite the potential ramifications this court ruling may have on BP, the company's situation isn't dire, and its stock is likely to continue its rally. Let's see why.  

The 5th U.S. Circuit Court of Appeals ruling regarding BP's 2010 Gulf of Mexico oil spill approves Judge Carl Barbier's original settlement, in which businesses and residents who claim to be affected by the 2010 oil spill won't need to show direct losses from the oil spill and could sue BP for compensation. BP is likely to fight this ruling; the ruling could trump up the amount of funds BP will need to compensate for the Deepwater Horizon oil spill disaster. Up to now, BP has allocated roughly $42.5 billion for cleaning the oil spill, paying fines, and compensating businesses and residents that suffered direct damages. If BP ends up paying more than it had initially expected, this could cut down the company's valuation. But the situation won't be as dire as you might expect.  

Originally BP estimated the settlement at $7.8 billion for individual and business; since then BP pushed this estimate up to $9.2 billion. BP already recognized in its third quarter earning report that this amount is likely to be higher than expected. For the sake of argument, let's assume a worst case scenario, in which the settlement for individuals and business will come to an additional $10 billion -- nearly double BP's latest estimate; BP will be able to pay this additional sum from its share repurchase program and dividends.

During the first nine months of 2013, BP paid nearly $4.2 billion in dividends. For the entire year, the payment is likely to reach around $5.3 billion. This means, within two years the company could save $10 billion in dividend payments just to pay the additional settlement. Nonetheless, BP's management is likely to pull this trigger as a last resort, because this type of measurement might not go well by BP's investors. 

For now, BP continues to offer very hefty dividends, coming to an annual yield of 4.5%. In comparison, ExxonMobil (NYSE:XOM) offers a yearly dividend yield of 2.6%; Chevron (NYSE:CVX) pays an annual dividend of $4 per share, which comes to a yearly yield of 3.3%.   

Another way to finance this additional settlement payment is by cutting down BP's shares repurchase program, which currently stands on buying back $8 billion worth of stock within a year and a half. Up to now, the company has repurchased $3.3 billion worth of shares. The repurchase program and dividend payment benefit BP's shareholders but could be reallocated toward the businesses and residents settlement.  

This only goes to show that in the worst case scenario, BP is capable of coming up with additional funds for the oil spill relief program. Thus, the potential risk associated with the oil spill is small, and the company's stock is likely to further rally.

Besides the oil spill issue, BP's fundamentals continue to slowly improve as the company has outperformed its leading competitors. During the first nine months of 2013, BP's net revenue rose by 1.2% year over year. In comparison, ExxonMobil's net sales fell by 10.5% during the first three quarter of 2013, while Chevron's net sales decreased by 4.8% year over year . For 2014, BP estimates its capital expenditure will remain around $25 billion -- similar to 2013. This could mean that BP will maintain its moderate growth in revenue in 2014. 

Foolish bottom line
The recent court ruling could have some adverse effect on BP's valuation, but the company has the means to make these payments within the coming years. It's still unclear how much BP will eventually have to pay toward the oil spill relief fund, but this doesn't mean the rally is over for BP shares.