NEW YORK (TheStreet) -- The world's major powers are nearing a deal with Iran over its nuclear program. If they secure an agreement by June 30, relief from international sanctions against Iran could start by the end of this year. Such an accomplishment in global diplomacy after three and half decades of conflict would be wonderfully bullish for the U.S. stock market.

(To be sure, a deal isn't secure and is looking less likely now that U.S. Congress will have a say. Investors should watch closely.)

Effect on Interest Rates and Budget Deficit

Reducing conflict with a major enemy removes a major geopolitical uncertainty for the stock market. 

There would be one less industrialized military threat and this would allow the U.S. to decrease military spending. According to the Stockholm International Peace Research Institute, military expenses totaled $610 billion or 3.5% of U.S. gross domestic product in 2014. All the while, U.S. tax revenue is projected to scale new highs this year. A powerful combination of reduced military spending and more cash in Uncle Sam's wallet could lead to less Treasury debt issuance and a reduced budget deficit. Less debt issuance could strengthen the dollar while falling interest rates could support economic growth.

Economic research has found there's a correlation between interest rates and budget deficits. However, how much deficits affect interest rates exactly is up for debate. When the forecasted deficit-to-GDP ratio climbs by one percentage point, long-term interest rates rise by roughly 25 basis points, studies by Thomas Laubach, an economist and director on the Board of Governors of the Federal Reserve System, found. Research by economists R. Glenn Hubbard and Eric Engen has found that when government debt jumps by 1% of GDP, interest rates lift by about two basis points. These studies suggest that a balanced budget potentially reduces interest rates somewhere between 10 basis points and one percentage point.

Oil Price Impact

The European Union and U.S. relieving sanctions against Iran could lower oil prices by opening the floodgates to an underutilized source of crude oil exports. The country of 80 million people is home to the planet's fourth-largest known crude reserves and second-largest natural gas reserves. Iran holds nearly 13% of OPEC crude oil reserves and 10% of the globe's crude reserves, according to the U.S. Energy Information Administration. It is estimated that Iran has at least 30 million barrels in storage. Iran is expected to ramp up production capacity by 700,000 barrels a day by the end of 2016. It will take considerable time for Iran's output and distribution to accelerate so prices won't crash overnight. Unless the flood of new supply isn't tempered by cuts elsewhere, the expected new supply should dampen any crude oil rallies.

Cheap oil is both good and bad for the U.S. On one hand, lower pump prices gives consumers -- who account for 70% of GDP -- more cash to spend somewhere else. Gas on average makes up 5% of total household spending. The average American household is projected to spend about $550 less on gasoline in 2015 than in 2014, according to the EIA. Yearly consumer spending on gasoline is on track to drop to its lowest level in 11 years owing to cheap gas and increased fuel efficiency in cars.

On the other hand, cheap oil squeezes the energy sector's profits and sales. As a result, companies have to lay off workers and reduce capital investments, which is especially painful for oil-dependent states like North Dakota and Texas. According to FactSet, the energy sector's first-quarter earnings are expected to drop by 65% year-over-year -- the largest decline among the 10 S&P sectors. If the energy sector is excluded, the forecasted earnings growth rate for the S&P 500 would increase to 3.3% from a negative 4.8%, FactSet wrote in an April 10 report. The energy sector's first-quarter sales are seen collapsing by 39% year-over-year. If energy were excluded, total S&P revenue would jump 3% versus drop 3% for the first quarter. Overall, the good should outweigh the bad given that energy makes up 5.9% of U.S. GDP compared with 70% for consumer spending.

Investment Risks

The U.S. still views Iran an active state sponsor of terrorism. The result of the negotiations is very much a wildcard. There's no knowing what kind of deal will be achieved. Even if a final deal is made, members of Congress could oppose removing U.S. sanctions. But U.S. corporations could pressure Congress members to do away with sanctions if they see their counterparts in Europe profiting from getting business from Iran. Should the negotiations with Iran fall apart, the stock markets are likely to give back increases from a rally that springs following the initial signing.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.