Making a custom upgrade ROM Is it possible to make a custom ROM to upgrade the current version of android that is installed on your phone?

For example, making a 5.1 ROM to put on an pretty much unsupported phone that only has 4.4.2.

I've seen many posts on how to port ROMs between devices, or making your own custom ROM, but all of the ones I've seen require you to stay on the same version of android.  

I'm just wondering if I can take a stock ROM, or a cm 12.1 rom or something and port it onto my device. (Which is a LGD393 in case that helps).
Firstly . It is possible to make a custom ROM to upgrade the current version of android that is installed on your phone

Secondly you can't port roms of other devices to your phone . But  you can take the stock rom of your device and make some modifications to upgrade the version of android.

For custom rom development refer here.

http://forum.xda-developers.com/showthread.php?t=2069130