It doesn't renew as such, it simply rolls on month by month so you should be able to move away at any point once the initial 18 months has expired.
Your contract is with O2 rather than CPW, so you would only need to inform O2. If you want to do this ahead of time, then you can, but it wouldn't actually achieve anything - they'll still wait to be told by you when you want your number transferred etc.
To be honest, you're better off taking a diary note for a fortnight beforehand, doing your research and decision making then, and making sure you switch before incurring any further months' bills.
Hope this helps.
mr tom.