In March 1918, with the German army camped outside Paris, the young British economist John Maynard Keynes heard that a remarkable auction was about to take place in the City of Light. The estate of the late artist Edgar Degas was selling off his vast collection of pieces by France’s most celebrated 19th-century painters.

Keynes promptly embarked on an insane adventure. First, he persuaded the chancellor of the exchequer to release £20,000 for purchasing art. The sum would be millions in today’s terms, and it was a curious extravagance four years into fighting a devastating war, but Keynes’s arguments prevailed.

Then, escorted by destroyers and a silver airship overhead, Keynes crossed to France with the director of the National Gallery, Sir Charles Holmes, who had donned spectacles and shaved his moustache to disguise his identity. With German shells raining down on Paris, the English pair snapped up bargains before carrying them back across the Channel.

“My picture coup was a whirlwind affair,” Keynes later wrote. Quite so; it took to the extreme the old investors’ maxim, “Be greedy when others are fearful.” But Keynes had a knack for making his risks pay off. When he died in 1946, he owned £400,000 in stocks and securities, the original manuscript of Newton’s Principia Mathematica, a first edition of Paradise Lost and works by Braque, Picasso, Seurat, Matisse, Sickert and Degas.

I have been pondering the investment lessons one might learn from Keynes. I’ve consulted two books on the subject — by John Wasik and by Justyn Walsh — and academic research by financial economists David Chambers, Elroy Dimson and others.

The most obvious lesson is that failure is a good teacher. Eighteen months after the Paris adventure, Keynes was speculating in the volatile postwar currency markets. Things went very well indeed for a while, and Keynes turned a profit of £6,000 in a few months — relative to the wages of the time, about £1m today.

He wrote with evident satisfaction to his mother: “Money is a funny thing . . . As the fruit of a little extra knowledge and experience of a special kind, it simply (and undeservedly in any absolute sense) comes rolling in.”

All too easy — and, of course, it wasn’t as easy as it looked. A few months later, Keynes had been wiped out. He managed to borrow more and get back into profitability, but the lesson, learnt in his late thirties, was invaluable. In 1929, when the Wall Street Crash began, Keynes was as blindsided as anybody but far quicker than many to react.

A second lesson emerged as I tried to make sense of Keynes’s strategy: don’t expect consistency. Keynes began with outrageously impulsive adventures in art and currency, switched to cyclical equity investments on the theory that he could forecast the business cycle and, finally, abandoned cyclical forecasting in favour of the kind of long-term value investing made famous by Benjamin Graham and Warren Buffett.

Keynes even used these apparently contradictory tactics simultaneously: the economist Eleonora Sanfilippo notes that during the market crash of 1937, Keynes stuck to a “buy and hold” strategy on behalf of King’s College, Cambridge, whose investment funds he managed, while selling much of his own portfolio in the teeth of the bear market. This may reflect his own financial constraints, or the fact that his personal portfolio had been faster-growing and less diversified and he was keen to lock in the gains.

No wonder it is hard to draw easy conclusions about Keynes’s approach. Wasik provides a list of what he argues are Keynes’s essential investment principles. They include “Don’t move with the crowd” but also “Invest passively”. If that sounds like a contradiction to you, you are not alone.

But then Wasik is inspired by a man who wrote, “My central principle of investment is to go contrary to general opinion,” but also, “It is generally a good rule for an investor, having settled on the class of security he prefers . . . to buy only the best within that category.”

In his 1936 General Theory Keynes wrote that, “Our basis of knowledge for estimating the yield 10 years hence of a railway, a copper mine . . . a building in the City of London amounts to little and sometimes to nothing”, but in 1942 he explained, “I am generally trying to look a long way ahead and am prepared to ignore immediate fluctuations.”

I am not sure that studying biographies of Keynes has made me a better investor. He was a man of contradictions, typified by the quip: “When my information changes, I change my course of action. What do you do?” Keynes, of course, never said those words. He does seem to have lived them.

Being willing to change your mind is an invaluable virtue. Then again, at times, so is having the courage of your convictions. At the art auction in Paris, Keynes couldn’t persuade Holmes to spend all the funds that the Treasury had provided, despite the quality of the pictures and the low prices.

So Keynes himself picked up Cézanne’s still life “Apples”. The National Gallery missed out, and today “Apples” hangs in the Fitzwilliam Museum in Cambridge.

Tim Harford’s ‘How to Make The World Add Up’ is published in UK paperback on May 6

Follow on Twitter to find out about our latest stories first.