TORONTO, Oct 20 (Reuters) - Chris Hohn's hedge fund firm TCI Fund Management rose over 17% in the first nine months of year, a source close to the firm told Reuters on Wednesday, as the activist investor benefited from its stake in Canadian National Railway Co.

TCI, which owns a 5% stake in CN, has been agitating for change at Canada's biggest rail road operator since August after it entered into a bidding war with Canadian Pacific Railway Ltd for U.S. rail operator Kansas City Southern. CP finally clinched the $27 billion deal for Kansas last month after CN bowed out.

On Tuesday, CN's Chief Executive Officer Jean-Jacques Ruest announced he would retire at the end of January after facing consistent pressure from TCI.

TCI's double-digit returns exceeded the average hedge fund gains of 9.8% over the same period, according to data from Hedge Fund Research. TCI managed $40 billion in assets under management at end-June.

The source declined to be identified as the information is not public.

Shares in CN have risen 16.2% since TCI first suggested a change of senior management and a shake-up of the board, advocating for former Union Pacific executive Jim Vena to helm the company.

But TCI on Tuesday said despite the success of the campaign, the firm will continue to advocate for further changes.

The hedge fund had also advocated for more railroad experience on the board, suggesting former Illinois Central Railroad Chairman Gilbert H. Lamphere be appointed as director.

While TCI has held a position in CN since 2018, the campaign marks the hedge fund's first foray into shareholder activism in Canada.

A spokesman for TCI declined to comment. (Reporting by Maiya Keidan; editing by Diane Craft)