By Martha Kearney
Presenter, BBC Radio 4's World at One
Gordon Brown's political fortunes have bounced up and down this week more violently than the FTSE - and of course the two are linked.
The week proved uncomfortable for Mr Miliband (right)
The economic crisis meant the Labour conference, which could have been overwhelmed by the rebel MPs demanding a leadership contest, was (until late on Tuesday night) beneficial to the prime minister
His speech was well received with a more personal and conversational tone than usual. Sarah Brown's introduction added a human touch.
The line about the country not needing a novice served well as an attack on the two Davids threatening his position.
The Miliband one did not have a good week. I got a strong sense of how touchy the leadership issue is for him when I attempted to ask him a few questions about it at The World At One/RSA fringe.
He denounced me for being frivolous and the loyal Labour audience started to shout me down - among them his special adviser at the back of the room. I got a taste of what politicians must face all the time.
It is interesting that the media are now being blamed for many of Labour's problems, just as we were in the darkest days for the Conservatives.
Politicians are constantly drawing parallels with their opponents. David Cameron's "project" is heavily influenced by the rise of New Labour. Now Labour politicians have been closely studying the demise of Margaret Thatcher to see how to get rid of a leader.
One cabinet minister brought up the subject of a Geoffrey Howe-style resignation.
There was of course David Miliband's remark in the lift about a Heseltine moment. He must be only too aware of the risks of appearing disloyal.
Lord Heseltine himself reminded me on Tuesday's programme of the saying he coined: "He who wields the knife never wears the crown."
I wonder what wielding a banana means? Perhaps only Mr Miliband, who was pictured with one, knows.
The leader's crown did seem firmly lodged on Mr Brown's head until Newsnight on Tuesday when Labour's civil war erupted again.
David Grossman broke the story that a Number 10 source had said that Ruth Kelly was about to resign.
That led to an emergency 3am briefing in the Midland Hotel to confirm it.
Hang on for a bit of Westminster Village Kremlinology. It was not unexpected that she was planning on leaving. But the fact that the story had come from Number 10 - were they briefing against her?
Then came Nick Robinson's story that she had been approached by rebels to use the resignation to precipitate a coup.
My guess is that the news of the resignation was not deliberately planted, but such is the bitter atmosphere that both sides immediately blamed each other.
World at One got the only interview with Ms Kelly on that day. She did seem genuinely surprised and insisted her decision "was not about the political direction of the party. This decision was based on what I thought was right for me and the family."
But she did not deny that she had been approached by the rebels.
Ms Kelly's departure means Mr Brown has more scope for his reshuffle. It is always risky to make predictions but here goes.
I think it is unlikely he will move around the big jobs. A Number 10 source told us Environment Secretary Hilary Benn was unlikely to stay as he had not made a big enough impact.
A whip predicted privately that Des Browne would lose not just Scotland but defence too.
Could Jim Knight be coming into the cabinet? He was praised in Mr Brown's speech.
The next hurdle will be the first meeting of the Parliamentary Labour Party, which one Miliband ally told me would be a difficult time for Mr Brown.
Then there is the Glenrothes by-election. But, according to one Blairite cabinet minister, June and the European elections will be the real time to assess the leadership. Although who knows what will happen between now and then?
If you are attending the Conservative conference, do join us for our fringe meeting - with the chairman of the party's policy review, Oliver Letwin, at the Symphony Hall on Sunday from 1830BST.