Plano-based J.C. Penney Co. has won clearance from its lenders to sell billions of dollars in stock and debt if needed as it struggles to complete a turnaround.The retailer has posted five consecutive quarters of losses as CEO Ronald Johnson seeks to transform the chain by creating in-store boutiques and reducing reliance on coupons and sales events.Penney moved to block efforts by a group of bondholders to declare a default over a provision in the original credit line."If you consider the fact that J.C. Penney has been losing money heavily and its strategy is based on revamping the stores over a three-year period, there is a need for cash," said Bernard Sosnick, an analyst at New York-based Gilford Securities.Penney's shares (ticker: JCP) were up as much as 7 percent Friday before finishing 4.3 percent higher at $22.47. The stock jumped 6.7 percent Thursday.Company spokesman Joey Thomas said in an emailed statement that the amended agreement "further strengthened the company's liquidity position as we continue to execute our strategic plan."J.C. Penney has lost almost half its stock market value in the past year, making it the fourth-worst performer in the Standard & Poor's 500.Its filing with the Securities and Exchange Commission shows new terms that give J.C. Penney leeway to raise money through a stock sale underwritten by a financial institution.It affirms that this type of equity offering won't trigger change-of-control provisions in the credit line that authorize lenders to force repayment of borrowings.Penney can also obtain up to $1.75 billion in new loans by pledging real estate and other fixed assets as collateral, said Judah Frogel, an analyst at Covenant Review Llc. in New York.