NEW YORK (Reuters) - Over the last seven trading days, investors have more than doubled the amount of cash invested in a key financial sector fund, in a bet that second-quarter bank earnings will be robust.

Traders work on the floor of the New York Stock Exchange (NYSE) in New York City, NY, U.S. May 18, 2017. REUTERS/Brendan McDermid

Big U.S. banks start reporting quarterly results on Friday and according to data from State Street, the Financial Select Sector SPDR Fund XLF.P, which tracks the S&P 500 Financials sector .SPSY, has pulled in a net $662 million of inflows, bringing the year-to-date inflows to nearly $1.5 billion.

Year-to-date, the Financial Select ETF is up 7.6 percent to $25.01.

“There is good reason for investors to be optimistic about the financial sector,” said Randy Frederick, vice president of trading and derivatives for Charles Schwab in Austin, Texas.

“We just had two rounds of stress tests that every single bank passed with flying colors. In general, the banking industry is in very good shape right now,” he said.

Shares in the biggest U.S. banks rose at the end of June after they unveiled buyback and dividend plans that topped analyst expectations after the U.S. Federal Reserve approved capital proposals in its annual stress test program.

Some of the fund's top holdings, JPMorgan Chase & Co JPM.N, Citigroup Inc C.N and Wells Fargo & Co WFC.N, report results on Friday and others, including Goldman Sachs Group Inc GS.N, Morgan Stanley MS.N and Bank of America Corp BAC.N will post results next week.

Analysts estimate second-quarter earnings for S&P 500 financial companies rose 7 percent, the third-best growth for a sector after energy and technology, according to Thomson Reuters data.

“The financial earnings are going to probably be better-than-expected because we have seen a tick up in the yield curve, and that is going to be better for net interest income,” said Karyn Cavanaugh, senior market strategist at Voya Investment Management in Charleston, South Carolina.

Longer-dated Treasury yields have jumped so far this month while shorter-dated yields have either inched higher or fallen, resulting in a so-called “steepening” of the yield curve.

A steeper yield curve benefits bank profitability since it allows banks to borrow at lower short-term rates and lend at higher long-term rates.

“Financials have managed to make money no matter what gets thrown at them. Regulations, zero interest rates, they still come through. So I think that we’re going to see a positive surprise,” Cavanaugh said.

Traders in the options market appear to expect the fund’s shares to rise in the near term.

For XLF options contracts expiring on July 21, which will cover results from the largest banks, there are 1.2 calls open for each open put. For contracts expiring after this date, the measure stands at 0.77 calls per open put, a significantly more defensive stance.

Calls convey the right to buy shares at a fixed price in the future and usually are used to place bets on shares rising, while put options give the right to sell shares at a certain price in the future.

Options on the SPDR S&P Bank ETF KBE.P and individual bank stocks including Bank of America Corp also show a similar bullish bias in near-term contracts.

On Thursday, trading in XLF’s options leaned toward bullish bets, according to options analytics firm Trade Alert.