Shares of Redfin (RDFN 8.49%) were moving higher Tuesday after the online real estate brokerage announced a financing deal with Apollo Captial Management. The move will help Redfin build capital during a tough time in the real estate market, and investors applauded the increased liquidity.

As a result, the stock was up 6% as of 2:35 p.m. ET after having gained as much as 14.5% earlier in the session.

A Redfin for sale sign in front of a house

Image source: Redfin.

Redfin teams up with Apollo

Redfin said that Apollo, a private equity firm, had agreed to commit as much as $250 million in financing, with Redfin borrowing half of that sum on Oct. 20 and taking the remainder over the next 12 months.

The online real estate brokerage also plans to use cash on its balance sheet to repurchase some of its existing convertible notes, which will extend its debt maturities until 2028. Redfin will pay the secured overnight financing rate (SOFR) plus 525 to 575 basis points, depending on the timing, which means that the interest rate would currently be more than 10%.

Why investors are cheering

Redfin has been struggling since the real estate market started to tank over a year ago. The company was forced to shutter its home-flipping Redfin Now business, and transactions have fallen sharply as well.

With those challenges, the company is also seeing its cash pile dwindle. It finished the second quarter with $118.8 million in cash and equivalents on the books, down from $232 million at the start of the year.

Redfin has nearly $1 billion in convertible notes on its balance sheet, and paying those down will improve its financial flexibility and protect shareholders from dilution over the long run if the stock bounces back, though it comes at a steep cost with interest rates where they are.

The deal with Apollo isn't a game-changer, but increasing a company's financial flexibility during tough times is usually a smart move.