But a really, really good idea that is cheap and almost legal is to use one of those solar-powered garden lights for an anchor light. You need to change the Ni Cad battery for NiMh (I think that's correct) of high capacity. If you do this, the light will work fine even after a couple of cloudy days. Now you can't see them from a mile off, I realise, but you can see them at a good distance, and you never forget to switch them on and you can leave them on your moored boat and feel happier about people sailing into her. Fantail has a pulpit and now that I no longer have bits of cloth flapping about round there, I have secured my lamp in place there, so it's in the right part of the boat. Even more important, if you are using an LED light for an anchor light, it is down at boat level and not up at the top of the mast masquerading as a star or planet. In reality, how often does anyone need to see your boat at a distance of over a mile, anyway? In this case better illegally lit than not lit at all, which seems to be a very common choice.
And if my cheap option for t'other lights had worked, I'd of been OK. Pout.