Giancarlo Stanton was not in the lineup for the Yankees’ 4-1 loss to the Astros in Game 3 of the ALCS on Tuesday at Yankee Stadium. Aaron Boone remains optimistic about his left fielder returning from a strained right quadriceps, but he wasn’t sure it would be for the next two games.

“I would say it’s up in the air,’’ Boone said about Stanton being available for Games 4 and 5 against the Astros. “But I wouldn’t frame that as me not being optimistic.’’

Stanton suffered a strain in the smaller muscle in the quadriceps while running to first on an infield single in Game 1. He remained in the game — and later slugged a homer — until Cameron Maybin replaced him for defensive purposes in the eighth inning of the 7-0 Yankees victory.

Stanton wasn’t in the lineup for Game 2. Maybin started in left field and went 1-for-2 with a walk in the 3-2, 11-inning loss. Maybin joined Stanton on the bench for Game 3 when Boone inserted Aaron Hicks in center field and moved Brett Gardner from center to left. The previous big-league game Hicks started was Aug. 3, but he went 0-for-2 and worked two walks Tuesday. Hicks missed the rest of the regular season with a flexor tendon problem in his right elbow.

Stanton took ground balls in left field on Tuesday before the Yankees took batting practice and took measured steps. Boone said Stanton would take batting practice, possibly indoors in the cage. Asked how he felt after the fielding session, Stanton said he has been better.

“I’m not the best, but I’m able to hit so we are at least that far right now. Time is not on my side right now. I’m doing what I can,’’ he said. “Outfield is the biggest question. Those are the same steps as the baseline. So that is going to be a hurdle right now.’’

Stanton has checked the weather report for Wednesday, which calls for a lot of rain, and that might work in his favor if Game 4 is moved to Thursday.

“Not sure if we are gonna have a game [Wednesday]. I have to move around more and see what I got,’’ Stanton said. “I just moved around for the first time, so gonna be a game-time decision.”

Stanton and Boone were encouraged by Tuesday’s workout.

“He’s better. I spoke to him this morning when he got here, but kind of made the decision overnight, this morning, that regardless he wasn’t going to be in the lineup,’’ Boone said. “I do think he’s feeling better. We view him as probably a hitter off the bench.’’

As for Stanton’s long-term availability, Boone wasn’t going one way or the other for a player who participated in just 18 regular-season games due to multiple injuries, the last one a sprained right knee that sidelined him from June 26 to Sept. 17. Beginning Sept. 18, Stanton played in nine games, hitting .286 (8-for-28) with two homers and six RBIs.

“I’m optimistic, that hasn’t changed,’’ Boone said. “We will just see where we are going into [Wednesday].’’

If the Yankees take Stanton off the ALCS roster and replace him, he wouldn’t be eligible for the World Series if the Yankees get there. Luke Voit and Tyler Wade, each of whom were on the ALDS roster against the Twins, are candidates if Stanton is deleted, as is Mike Tauchman, who has been nursing a calf injury.

“Obviously if we make the move then he’s down,’’ Boone said. “Trying to strike that balance. Feel we are in a good spot lineup-wise. It’s tougher the further you go, especially when you have a three-man bench anyway, so those are things we have to consider.”