Two trade groups made their case in court Tuesday to end the Federal Reserve rule governing how mortgage loan officers are compensated. And two consumer groups also made an opposite case at the same time. A ruling is expected by the end of the week. The National Association of Mortgage Brokers and the National Association of Independent Housing Professionals filed briefs with the U.S. Court of Appeals for the District of Columbia Tuesday. Last week, the groups won a stay on the rule to hear the case. They said the Federal Reserve Board of Governors did not have "limitless authority to regulate the entire real estate industry, both creditors and noncreditors, as well as any aspect of any industry where a federally related mortgage loan is involved." Under the final rule, announced in August, a loan originator is prohibited from receiving compensation based on the interest rate or other loan terms. The rule is also required under the Dodd-Frank Act. The idea is to crack down on the practice of paying originators more when a borrower accepts a higher interest rate mortgage — known as the yield spread premium. The move is meant to prevent borrowers being steered into higher-cost mortgage products than the lender requires. The rule also ends of the practice of mortgage originators receiving payments directly from the borrower and the lender simultaneously. "The new rule seeks to ensure that consumers who agree to pay the originator directly do not also pay the originator indirectly through a higher interest rate, thereby paying more in total compensation than they realize," the Fed said when the rule was announced. However, the trade groups claim that previous legislation, the Home Ownership and Equity Protection Act (HOEPA) and the Truth in Lending Act (TILA) constrict the Fed's ability to make this rule to only loans that are "high-cost mortgages," not every loan. The trade groups also argue that the YSP has actually been disclosed to the consumer for roughly the past 20 years, and that mortgage brokers have revealed all of their compensation through various forms that the borrower signs and turns in, even those mandated by the states and individual lenders. "Mortgage brokers are the most transparent in the industry," said NAIHP President Mark Savitt. "We disclose to consumers the mortgage loan origination agreement in addition to compensation and the nature of the relationship with the consumer as an independent contractor. We spell it out. The consumer is fully aware of every aspect of dealing with the mortgage broker well before they consummate the loan." Mike Anderson, the director of government affairs at NAMB, said giving the Fed the authority to oversee the entire mortgage market "opened Pandora's box." "We're cautiously optimistic," Anderson said. " You never know until they rule, but we have very strong arguments. I think our attorneys did a very strong job." But the Center for Responsible Lending and the National Consumer Law Center jointly filed a brief with the court in support of the Fed's rule. They said that what threatens the plaintiffs' profession is not the "long-studied and long-overdue reform." "But if an existential threat exists to Plaintiff's profession, it is the macroeconomic environment, not this one small step toward reform. The fact is, the credit and housing bubbles burst, and as discussed herein, it was the absence of a rule like this that was in part to blame," the consumer groups said. The groups also claim Congress wanted the Fed to act promptly gave it ample authority to make the rule under Dodd-Frank. Savitt said the court has a lot of research to pour through in deciding a case. Until a ruling comes down, the Fed's rule is stayed. "We're very confident," Savitt said. "Our case is very clear and not ambiguous in any way shape or form." Write to Jon Prior. Follow him on Twitter @JonAPrior.