After months of taking a beating in the markets, renewable energy companies suddenly seemed to be on firmer footing this week, as lawmakers proposed extending important tax credits in exchange for lifting the decades-old ban on exporting American crude oil.

But even as renewable energy stocks rallied — SolarCity’s shares surged more than 40 percent — and advocates and executives cheered, some sectors of the industry appeared to benefit more than others.

The solar and wind industries got much of what they wanted, energy specialists said, while some technologies, like fuel cell storage and geothermal, were largely left off the table. Biofuels were somewhere in the middle.

For the solar industry, the proposed extension, up for action in Congress this week, is better than many executives and analysts had expected. For example, the investment tax credit for solar projects, which was to fall to 10 percent at the end of 2016, is to stay at 30 percent until 2019, then gradually decline to 10 percent by 2022. And, in another gain, projects will be required only to begin construction, rather than operation, as is the case now, to qualify for the credit.