For some, a great mortgage may mean getting a low interest rate. For others, a lower down payment may be attractive, even if it means an incrementally higher interest rate.

No matter what a good mortgage means to you, to boost your chances of getting the kind of mortgage you need, start planning now.

“If you wait to focus on your finances until a few weeks before you apply for a mortgage, there’s not a lot you can do to improve your application,” says Jack Pritchard, chief operating officer of the Mortgage Professor website. “But with months to go, there is plenty you can do to strengthen your position.”

Here’s how to make yourself into a better candidate before the bank reviews your application:

Spend less. Keeping your credit card balances as low as possible is a key part of landing the lowest mortgage rate. You don’t want to head into early 2017 with a spending hangover. “Any time your outstanding credit card balances are more than 30 percent of your total credit limit on all your cards, it’s going to pull down your credit score,” advises Joe Parsons, branch manager for Caliber Home Loans in Dublin, Calif. Your credit score will be a major factor in whether you qualify for a mortgage and get the best terms.

If your debt-to-credit limit is already above 30 percent, whittle down your balances over the next few months, Parsons says. That’s where redirecting holiday spending into paying down credit card balances comes into play. Another good idea: Call up each of your card issuers and ask for your credit limit to be raised. As long as you don’t use any of that credit, it will help reduce your overall usage ratio.

Lower your debt-to-income ratio. Lenders will also be laser-focused on how much of your gross monthly income goes to paying off your ongoing debts, which include credit card balances (the minimum payment due), student loans, car payments, child support, and alimony. As a general rule, the upper maximum debt-to-income ratio to get approved for a mortgage is 45 percent. Mortgage-data firm Ellie Mae reports that for conventional mortgages in September, the average debt-to-income ratio for approved new home-purchase mortgages was 34 percent for so-called conventional loans and 42 percent for FHA-insured loans.

If your ratio is too high, you can’t do much to change the income part of the equation. Even if you got a part-time job quickly, lenders typically average your income over the past 24 months. Instead, focus on reducing your debt or see whether you can get an existing loan, such as a car payment, paid off before you apply for a mortgage.

Shoot for a higher credit score. Mortgage terms are often based on the credit score “band” you fall into. Bands are 20-point increments, such as 680-719 and 720-739. The higher the band that you are in, the more likely it is that you will qualify for the lowest mortgage rate.

The best possible mortgage terms are reserved for applicants with a FICO credit score of at least 740. “Your credit score is the easiest part of your application that you can improve in a short period of time,” says Pritchard.

There are many ways you can boost your credit score. Any time you apply for credit—be it a credit card or a loan—the lender will check your credit score. These so-called inquiries can temporarily ding your credit score. Pritchard recommends avoiding them for the six months leading up to your mortgage application.

Parsons says that lenders typically check your credit score from each of the three credit bureaus—Equifax, Experian, and TransUnion—and will typically use the score in the middle of the three when assessing your mortgage application. For couples, however, they often use the middle score of the spouse who has the lower credit score. 

Consider a higher down payment. It’s possible to be approved for a mortgage with a low down payment, but it typically ends up costing you more because your lender will require that you purchase mortgage insurance any time you have less than 20 percent equity.

Even if you need to do that, you can limit the cost by increasing your down payment. Mortgage-insurance pricing is divided into “notch points” that are set in 5-percentage-point intervals. For example, insurance for a loan with a 5 percent down payment will cost more than if you made a 10 percent down payment. Aim for the next highest 5 percentage point notch. “It makes me a little crazy when I see someone with a 13 percent down payment,” says Pritchard. “If they had managed to come up with another 2 percent, they would have qualified for a better deal.” That’s something you can aim for if you start getting your finances into shape months before you hit the open houses.