How the zero - phase filter without filtered signal truncation at the end can be implemented? I mean what for the window FIR filter the filtered signal is truncated at the end because impulse response of the filter is symmetric. For example the code from here (in python) (lowpass FIR filter) gives the next results:

color meanings: 
blue - input signal
green - shifted filtered signal
red arrow - the end of the filtered signal



The red arrow shows where the filtered signal is ended. How can I implement the zero - phase or nearly zero - phase filter so what the filtered signal would end at the same point in time as the original one? The end of the filtered signal is of most significance.

Thanks.
You can either gather more data at the end than you need for output, or zero pad past the end of your data with at least half the length of your zero-phase filter.  

If you can’t get data past the “ends”, and don’t like the artifacts from zero-padding, then you might try other reasonable assumptions (circularity, continuity, etc.) depending on your model.